file360

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
<UserControl
    x:Class="File360.ColorPicker"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:File360"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <UserControl.Resources>
        <DataTemplate x:Name="ColorsTemplate">
            <StackPanel Height="60" Width="60">
                <Rectangle Width="50" Height="50" Fill="{Binding Color}"/>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>
    <StackPanel x:Name="stackPanel" Height="50">
        <ToggleButton Style="{StaticResource DefaultToggleButton}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Unchecked="ButtonUncheck" Checked="ButtonCheck">
            <Grid Height="50">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <TextBlock x:Name="ColorProperty" Text="app Accent" VerticalAlignment="Center" FontFamily="Assets/Font/Custom/HelveticaNeue-Thin.otf#Helvetica Neue" FontSize="20" FontWeight="Normal"/>
                <Rectangle x:Name="RectangleFill" Margin="5,5,5,5" Grid.Column="1" HorizontalAlignment="Right" Height="40" Width="40" Fill="{ThemeResource PhoneAccentBrush}" Stroke="White"/>
            </Grid>
        </ToggleButton>
        <TextBlock Margin="10,0,0,0" Text="choose color" FontSize="20"/>
        <GridView x:Name="ColorContainer" ItemTemplate="{StaticResource ColorsTemplate}" 
              SelectionChanged="ColorContainer_SelectionChanged" 
              Height="245"/>
    </StackPanel>
</UserControl>