<Window x:Class="R10_Style2.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:R10_Style2"
        mc:Ignorable="d"
        Title="Testujemy style (wersja 2)" Height="180" Width="550">
    <Grid>
        <WrapPanel>
            <WrapPanel.Resources>
                <Style x:Key="stylElementow">
                    <Setter Property="Control.Margin" Value="10"/>
                    <Setter Property="Control.Padding" Value="10"/>
                    <Setter Property="Control.FontSize" Value="12"/>
                    <Setter Property="Control.FontWeight" Value="Bold"/>
                    <Setter Property="Control.FontStyle" Value="Italic"/>
                    <Setter Property="Control.BorderBrush" Value="Black"/>
                    <Setter Property="Control.BorderThickness" Value="2"/>
                    <Setter Property="Control.Background">
                        <Setter.Value>
                            <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="Gray" Offset="1"/>
                            </LinearGradientBrush>
                        </Setter.Value>
                    </Setter>
                </Style>
            </WrapPanel.Resources>
            <Button Content="Przycisk" Style="{StaticResource stylElementow}"/>
            <TextBox Text="Pole tekstowe" Style="{StaticResource stylElementow}"/>
            <TextBlock Text="TextBlock. A tu nie ma tła zdefiniowanego w stylu" Style="{StaticResource stylElementow}"/>
        </WrapPanel>
    </Grid>
</Window>
