-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Hi @Youssef1313
after #156 is resolved, I came across another similiar binding issue.
Would you mind having a look? :)
The binding in the following DataTemplate does not work.
Currently reflection based binding is used, but I also tried it with x:Bind in combination with specifying x:DataType, which didn't work eighter.
Codebreaker.Xaml/src/Codebreaker.Uno/CodebreakerUno/Views/Templates/CodeBreakerTemplates.xaml
Lines 9 to 58 in 56a2a76
| <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> |
Kind regards,
Sebastian

