-
Notifications
You must be signed in to change notification settings - Fork 1
/
CodeBreakerTemplates.xaml
59 lines (56 loc) · 3.07 KB
/
CodeBreakerTemplates.xaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="using:CodeBreaker.Uno.Converters">
<conv:ColornameToBrushConverter x:Key="ColorConverter" />
<conv:IntToEnumerableConverter x:Key="IntToEnumerableConverter" />
<DataTemplate x:Key="PegsTemplate" x:Name="PegsTemplate">
<Grid
Margin="-13,0"
Background="{ThemeResource CardBackgroundFillColorDefault}"
CornerRadius="{ThemeResource ControlCornerRadius}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Path=MoveNumber, Mode=OneTime}" FontSize="{ThemeResource LargeFontSize}" Margin="48,0,10,0" VerticalAlignment="Center" />
<Border Grid.Column="1" Margin="20,0,0,0" Padding="7" x:Name="ShadowTarget">
<ItemsControl ItemsSource="{Binding Path=GuessPegs, Mode=OneTime}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Spacing="27" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid>
<Ellipse Width="68" Height="68" Margin="12,4" Fill="{Binding Mode=OneTime, Converter={StaticResource ColorConverter}}" Stroke="{ThemeResource TextBoxBorderThemeBrush}" StrokeThickness="1" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
<Border Grid.Column="2" Padding="30,7" Margin="12,0,0,0" MinWidth="130">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<ItemsControl Grid.Row="0" ItemsSource="{Binding Path=KeyPegs, Mode=OneTime}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Spacing="20" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Ellipse Width="25" Height="25" Fill="{Binding Mode=OneTime, Converter={StaticResource ColorConverter}}" Stroke="{ThemeResource TextBoxBorderThemeBrush}" StrokeThickness="1" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</Border>
</Grid>
</DataTemplate>
</ResourceDictionary>