WPF custom button templates
I’ve had a bit of a play with WPF for the first time today. I decided to create my own button template. The idea of a template is that you can redefine the visual elements that make up the control. Create a new WPF application Now add a button within the grid like so <Grid> <Button Content="Click me" Width="150" Height="50"/> </Grid> So that we can see what we are designing add a gradient background to the window. Within the <Window> node add <Window.Background> <LinearGradientBrush> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="White" Offset="1"/> </LinearGradientBrush> </Window.Background> Now to start designing the button template. Within the <Window> node add <Window.Resources> </Window.Resources> this i...