Skip to content

Commit

Permalink
Fix wrong property
Browse files Browse the repository at this point in the history
  • Loading branch information
Poker-sang authored and Arlodotexe committed Mar 25, 2024
1 parent 38babd0 commit a42b421
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions components/Primitives/samples/StaggeredLayoutSample.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public class ColorItem
{
public int Index { get; internal set; }

public int Width { get; internal set; }

public int Height { get; internal set; }

public Color Color { get; internal set; }
Expand Down
11 changes: 5 additions & 6 deletions components/Primitives/samples/StaggeredPanelSample.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@
x:Name="ThisSamplePage">

<Page.Resources>
<DataTemplate x:Key="StaggeredTemplate">
<DataTemplate x:Key="StaggeredTemplate" x:DataType="local:ColorItem">
<Grid Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
CornerRadius="{StaticResource ControlCornerRadius}">
<Border Width="{Binding Width}"
Height="{Binding Height}"
<Border Width="{x:Bind Width}"
Height="{x:Bind Height}"
Margin="4"
CornerRadius="{StaticResource ControlCornerRadius}">
<Border.Background>
<SolidColorBrush Color="{Binding Color}" />
<SolidColorBrush Color="{x:Bind Color}" />
</Border.Background>
<TextBlock Margin="6,4,4,4"
FontSize="16"
Text="{Binding Index}" />
Text="{x:Bind Index}" />
</Border>
</Grid>

</DataTemplate>
</Page.Resources>

Expand Down
2 changes: 1 addition & 1 deletion components/Primitives/samples/StaggeredPanelSample.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace PrimitivesExperiment.Samples;
[ToolkitSampleNumericOption("ColumnSpacing", initial: 5, min: 0, max: 50, step: 1, Title = "ColumnSpacing")]
[ToolkitSampleNumericOption("RowSpacing", initial: 5, min: 0, max: 50, step: 1, Title = "RowSpacing")]

[ToolkitSample(id: nameof(StaggeredPanelSample), "WrapPanel", description: $"A sample for showing how to create and use a {nameof(StaggeredPanel)}.")]
[ToolkitSample(id: nameof(StaggeredPanelSample), "StaggeredPanel", description: $"A sample for showing how to create and use a {nameof(StaggeredPanel)}.")]
public sealed partial class StaggeredPanelSample : Page
{
public ObservableCollection<ColorItem> ColorsCollection = new();
Expand Down

0 comments on commit a42b421

Please sign in to comment.