Tired of the usual look of your buttons in WPF? Do you want a glossy-looking button with glass shine and glow effect as soon as you move the mouse cursor over the button?
Its just six easy steps away …
Follow the tutorial below and give a fresh look to your apps.
Tools used :
1. Create a new WPF Application
2. Create a Canvas
3. Create the Basecoat
4. Create the Glow
The brush transform will be used to adjust the positioning of the gradient.
5. Create the Glass Effect
6. Code a little
Don’t get confused with the pink color. I just changed the background color for testing.
The double clicking caused the xaml code of the window and the method headers to be automatically generated for the events.
private void button_MouseEnter(object sender, MouseEventArgs e)
glow.Opacity = 100;
private void button_MouseLeave(object sender, MouseEventArgs e)
glow.Opacity = 0;
And you are done 😀
Your queries are always welcome!