<Window x:Class="R11_KonwerterTest.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:R11_KonwerterTest"
        mc:Ignorable="d"
        Title="Testujemy konwerter" Height="150" Width="500">
    <Window.Resources>
        <local:ColorPlToColorEnConverter x:Key="colorPlToColorEnConverter"/>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Label Grid.Row ="0" Grid.Column ="0" Content="Kolor" Margin="5"/>
        <ComboBox x:Name="cmbKolor" Grid.Row ="0" Grid.Column ="1" SelectedIndex="0" HorizontalAlignment="Left" Width="145" Margin="5">
            <ComboBoxItem Content="Czarny"></ComboBoxItem>
            <ComboBoxItem Content="Czerwony"></ComboBoxItem>
            <ComboBoxItem Content="Żółty"></ComboBoxItem>
            <ComboBoxItem Content="Zielony"></ComboBoxItem>
            <ComboBoxItem Content="Niebieski"></ComboBoxItem>
        </ComboBox>
        
        <TextBlock Grid.Row ="1" Grid.Column ="0" Grid.ColumnSpan="2" Margin="5" 
                   Text="Testujemy konwerter wartości" FontSize="30"
                   Foreground="{Binding Path=SelectedItem.Content, ElementName=cmbKolor, Converter={StaticResource colorPlToColorEnConverter} }"/>
    </Grid>
</Window>
