<local:KolorPage
    x:Class="Kolory_UWP.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Kolory_UWP"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        <local:ByteToDoubleConverter x:Key="byte2double" />
        <local:NativeColorConverter x:Key="native2color" />
    </Page.Resources>
    
    <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Rectangle Name="rectangle" Margin="10,10,10,10" Height="400" Fill="{Binding Kolor, Converter={StaticResource native2color}, Mode=OneWay}" />
        <StackPanel Orientation="Horizontal">
            <TextBlock Margin="10" Text="{Binding R, Mode=OneWay}" Width="50" />
            <Slider Name="sliderR" Margin="10" Width="300" Maximum="255" Value="{Binding R, Mode=TwoWay, Converter={StaticResource byte2double}}" />
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Margin="10" Text="{Binding G, Mode=OneWay}" Width="50" />
            <Slider Name="sliderG" Margin="10" Width="300" Maximum="255" Value="{Binding G, Mode=TwoWay, Converter={StaticResource byte2double}}" />
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <TextBlock Margin="10" Text="{Binding B, Mode=OneWay}" Width="50" />
            <Slider Name="sliderB" Margin="10" Width="300" Maximum="255" Value="{Binding B, Mode=TwoWay, Converter={StaticResource byte2double}}" />
        </StackPanel>
    </StackPanel>
</local:KolorPage>
