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
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
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!
@@CSharpDesignPro I would really appreciate that! You got yourself a sub.
@@toufikboulahtari6711 Thanks!
Damn, His work is so fluent, it's unbelievable.
Thank you for putting in a lot of effort. Thank you very much.
Thank you a lot!!🥐
@poduvanchik4839 - I'm glad it was helpful. Thanks!
Thanks man! :)
+Aleksandar Borisavljevic - You're welcome bro! Thanks for watching:)
Hola!
Puedo hacer la misma acción pero pasar de un botón con imagen a solo texto?
Hola! Sí, es posible!
@@CSharpDesignPro thank you¡¡
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
Yes, that's possible.
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
I did the same as you did, but my picture didn’t appear, I didn’t use the grid, is it mandatory?
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.
@@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 ☹️😞
@Максим Фодеев - 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.