You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
919 B

<Window x:Class="ResourceSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ResourceSample"
mc:Ignorable="d"
Title="MainWindow" Height="200" Width="250">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button x:Name="btnStatic" Grid.Row="0" Height="50" Background="{StaticResource CustomRed}" Content="I'm Static Button!"/>
<Button x:Name="btnDynamic" Grid.Row="1" Height="50" Background="{DynamicResource CustomEventColor}" Content="I'm Dynamic Button!" Click="btnDynamic_Click"/>
</Grid>
</Window>