file360

Log | Files | Refs

ColorPicker.xaml (1826B)


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