<Window x:Class="StaticResource_DynamicResource.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:StaticResource_DynamicResource"
        mc:Ignorable="d"
       Title="MainWindow" Height="120" Width="450" FontSize="14">
    <Window.Background>
        <LinearGradientBrush EndPoint="1,1" StartPoint="0,0">
            <GradientStop Color="Black" Offset="0"/>
            <GradientStop Color="White" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    <Window.Resources>
        <SolidColorBrush x:Key="txtBground" Color="WhiteSmoke" />
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <TextBox Background="{StaticResource txtBground}" Margin="10">Statische Ressource</TextBox>
        <TextBox Grid.Row="1" Background="{DynamicResource txtBground}" Margin="10 0 10 10">Dynamische Ressource</TextBox>
        <Button Grid.Column="1" Name="btnChange" Click="btnChange_Click" Margin="10">Ressource ändern</Button>
        <Button Grid.Column="1" Grid.Row="1" Name="btnNew" Click="btnNew_Click" Margin="10 0 10 10">Ressource neu erstellen</Button>
    </Grid>
</Window>

