Follow these steps to create a logical resource and use it inside the application window:
- Open the MainWindow.xaml file and replace the Grid with a horizontal StackPanel.
- Insert a Border control inside the StackPanel. Set its Height and Width properties to 80 and 150, respectively:
<Border Height="80" Width="150" Margin="8"> </Border>
- Let's add a background color to the Border control. We will be using a linear gradient brush to decorate the background color. Let's modify it as shared here:
<Border Height="80" Width="150" Margin="8"> <Border.Background> <LinearGradientBrush> <GradientStop Offset="0" Color="LightYellow"/> <GradientStop Offset="0.2" Color="Yellow"/> <GradientStop...