<Page
    x:Class="Kolory.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Kolory"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mw="using:Kolory.ModelWidoku"
    mc:Ignorable="d">
    <Page.DataContext>
        <mw:EdycjaKoloru />
    </Page.DataContext>
    <Page.Resources>
        <local:ByteToDouble x:Key="byte2double" />
        <local:EdytorKoloruToBrush x:Key="mw2brush" />
    </Page.Resources>
    <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Rectangle Name="rectangle" Margin="10,10,10,10" Height="400" Fill="{Binding Path=This, Converter={StaticResource mw2brush}}" />
        <StackPanel Orientation="Horizontal">
            <!--<TextBlock Name="tbColorHexCode" Text="{Binding ColorHexCode, StringFormat=HEX: {0}}" Margin="10,10,10,10" Width="100" VerticalAlignment="Center" />-->
            <Button Content="Kopiuj do schowka" Margin="10,10,10,10" Height="35" Command="{Binding Kopiuj}" />
            <TextBlock Name="tbVersion" Text="Wersja: 0.0.0.0" Margin="10,10,10,10" VerticalAlignment="Center" />
            <Button Content="Resetuj" Margin="10,10,10,10" Command="{Binding Resetuj, Mode=OneWay}" />
        </StackPanel>
        <Slider Name="sliderR" Margin="10,10,10,10" Maximum="255" SmallChange="1" Value="{Binding R, Mode=TwoWay, Converter={StaticResource byte2double}}" />
        <Slider Name="sliderG" Margin="10,0,10,10" Maximum="255" SmallChange="1" Value="{Binding G, Mode=TwoWay, Converter={StaticResource byte2double}}" />
        <Slider Name="sliderB" Margin="10,0,10,10" Maximum="255" SmallChange="1" Value="{Binding B, Mode=TwoWay, Converter={StaticResource byte2double}}" />
    </StackPanel>
</Page>
