WPF - Change the Button Image on Mouse Over / Hover | UI Design | XAML | C# | Tutorial

Поделиться
HTML-код
  • Опубликовано: 4 окт 2019
  • [ Skill Level : Beginner ]
    Hi, this video demonstrates a simple method to assign an image source to a button on Mouse Over/Hover using a "Copy" of the default "ControlTemplate" of the button.
    Subscription Link for more WPF videos and updates :
    ruclips.net/user/cdesignproarunmut...
    Playlist : • WPF - Navigation Drawe...
    Download the Complete Source Code from Github Repository.
    Link : github.com/CSharpDesignPro/Bu...
    Channel Link: / cdesignpro_arunmutharasu
    [ How to Change Button Image ] Code starts at 17:43
    Tools Used :
    Microsoft Visual Studio Community Edition 2019
    Icon Credits :
    Link : icons8.com/icons
    Thank you!
    Have a great day!
    For Business Inquiries : arun.enterprises.co@gmail.com

Комментарии • 20

  • @toufikboulahtari6711
    @toufikboulahtari6711 4 года назад +2

    i Just logged in to thank you man looked everywhere for a Detailed UI Tutorial for WPF C# thanks man. I would like to ask you something is it possible to make a Custom Scrollbar because im trying to make a Little rpg game where i want to change the UI layout for the standard windows Icon like the button you just showed scrollbar cursor etc. thanks again for this tutorial

    • @CSharpDesignPro
      @CSharpDesignPro  4 года назад +1

      Hi, Thank you so much for the appreciation! I am glad the video was helpful. I'll try to make a video based on your request in one of my upcoming videos. Don't miss the notifications!

    • @toufikboulahtari6711
      @toufikboulahtari6711 4 года назад +1

      @@CSharpDesignPro I would really appreciate that! You got yourself a sub.

    • @CSharpDesignPro
      @CSharpDesignPro  4 года назад

      @@toufikboulahtari6711 Thanks!

  • @boiplaying2647
    @boiplaying2647 3 года назад +2

    Damn, His work is so fluent, it's unbelievable.

  • @user-sd4hd1jp2r
    @user-sd4hd1jp2r 2 года назад +1

    Thank you for putting in a lot of effort. Thank you very much.

  • @poduvanchik4839
    @poduvanchik4839 Год назад +1

    Thank you a lot!!🥐

    • @CSharpDesignPro
      @CSharpDesignPro  11 месяцев назад +1

      @poduvanchik4839 - I'm glad it was helpful. Thanks!

  • @napstericious
    @napstericious 4 года назад +1

    Thanks man! :)

    • @CSharpDesignPro
      @CSharpDesignPro  4 года назад

      +Aleksandar Borisavljevic - You're welcome bro! Thanks for watching:)

  • @allygasai
    @allygasai 4 года назад +1

    Hola!
    Puedo hacer la misma acción pero pasar de un botón con imagen a solo texto?

  • @eligeghiasi7758
    @eligeghiasi7758 3 года назад +1

    so this for mouse enter and mouse leave
    are this possiable for mouse click ?
    i mean when you click on button , background change to img3 and after 50ms it back normal background

    • @CSharpDesignPro
      @CSharpDesignPro  3 года назад

      Yes, that's possible.

    • @eligeghiasi7758
      @eligeghiasi7758 3 года назад +1

      thank you i found it. it's really hard work with xaml very setting and alot of codes! it good if we able to set setting in propertis

  • @novchek
    @novchek 4 года назад +1

    I did the same as you did, but my picture didn’t appear, I didn’t use the grid, is it mandatory?

    • @CSharpDesignPro
      @CSharpDesignPro  4 года назад

      No, the grid isn't mandatory. You can also use a canvas or a stack panel. The problem with the image not appearing could be due to the misalignment of buttons. Check the ImageSource if possible.

    • @novchek
      @novchek 4 года назад

      @@CSharpDesignPro I have a grid, but when I try to add a picture to Image Source, nothing happens, that is, the picture exists, it is in the folder that I created (I just have a lot of pictures in the project) but nothing happens to the button, like it was without text and image, it remains ☹️😞

    • @CSharpDesignPro
      @CSharpDesignPro  4 года назад

      @Максим Фодеев - Make sure that you are using the right image format. There is a possibility that the images could be in .jpeg format. If so, then change the image extension at ImageSource to .jpg / .jpeg as opposed to the .png extension used in this tutorial. I hope this helps.