use style

This commit is contained in:
2023-07-26 17:14:47 +09:00
parent 1a15ebc427
commit 1381578890
22 changed files with 397 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
<Window x:Class="StaticResourceSample.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:StaticResourceSample"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Window.Resources>
<SolidColorBrush Color="Tomato" x:Key="rscWindow"/>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Content="window resource" Background="{StaticResource rscWindow}"/>
<Button Grid.Row="1" Content="app resource" Background="{StaticResource rscApp}"/>
<Button Grid.Row="2" Content="dynamic resource" Background="{DynamicResource rscDynamic}"
Click="Button_Click"/>
</Grid>
</Window>