<Window x:Class="XamlWPF.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:XamlWPF"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <LinearGradientBrush x:Key="NiebieskiGradient" StartPoint="0,0.5" EndPoint="1,0.5">
            <GradientStop Color="Blue" Offset="0.0" />
            <GradientStop Color="Navy" Offset="1.0" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="FioletowyGradient" StartPoint="0,0.5" EndPoint="1,0.5">
            <GradientStop Color="Blue" Offset="0.0" />
            <GradientStop Color="BlueViolet" Offset="1.0" />
        </LinearGradientBrush>
        <!--
        <Style x:Key="StylNiebieski" TargetType="Control">
            <Setter Property="Foreground" Value="White" />
            <Setter Property="Background" Value="{StaticResource NiebieskiGradient}" />
        </Style>
        -->
        <Style x:Key="StylNiebieski">
            <Setter Property="Control.Foreground" Value="White" />
            <Setter Property="Control.Background" Value="{StaticResource NiebieskiGradient}" />            
            <Setter Property="TextBlock.Foreground" Value="White" />
            <Setter Property="TextBlock.Background" Value="{StaticResource NiebieskiGradient}" />
            <Setter Property="Shape.Fill" Value="{StaticResource NiebieskiGradient}" />
            <Style.Triggers>
                <Trigger Property="UIElement.IsMouseOver" Value="True">
                    <Setter Property="Control.Background" Value="{StaticResource FioletowyGradient}" />
                    <Setter Property="TextBlock.Background" Value="{StaticResource FioletowyGradient}" />
                    <Setter Property="Shape.Fill" Value="{StaticResource FioletowyGradient}" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250" />
            <ColumnDefinition Width="2*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="1*" />
            <RowDefinition Height="1*" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Button x:Name="button" Grid.Column="0" Grid.Row="0"
                HorizontalAlignment="Center" VerticalAlignment="Center" 
                Width="200" Height="100"                
                Style="{StaticResource StylNiebieski}">
            <StackPanel Orientation="Horizontal">
                <Image Width ="70" Height="70" Source="logo.gif" />
                <Rectangle Width="10" />
                <TextBlock FontSize="16">
                    <Run Foreground="Yellow">Uniwersystet</Run><LineBreak/>
                    Mikołaja<LineBreak/>
                    Kopernika
                </TextBlock>
            </StackPanel>
        </Button>        
        <TextBox Grid.Column="0" Grid.Row="1" Text="Pole edycyjne" Margin="10,10,10,10"
                 Style="{StaticResource StylNiebieski}" />
        <TextBlock Grid.Column="0" Grid.Row="2" Text="Etykieta" Margin="10,10,10,10"
                   Style="{StaticResource StylNiebieski}" />
        <Button Grid.Column="1" Grid.Row="0" Content="Przycisk" Margin="10,10,10,10"
                Style="{StaticResource StylNiebieski}" />
        <Button Grid.Column="1" Grid.Row="1" Content="Przycisk" Margin="10,10,10,10"
                Style="{StaticResource StylNiebieski}" />
        <Rectangle Grid.Column="1" Grid.Row="2" Margin="10,10,10,10"
                   Style="{StaticResource StylNiebieski}" />
    </Grid>
</Window>
