Skip to content

Commit 8fc11b3

Browse files
authored
Merge branch 'main' into bugfix/format-code
2 parents 902e54d + 1b892e3 commit 8fc11b3

26 files changed

+1445
-78
lines changed

src/Wpf.Ui.Gallery/Controls/GalleryNavigationPresenter.xaml

+12-14
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414
<Setter.Value>
1515
<ControlTemplate TargetType="{x:Type controls:GalleryNavigationPresenter}">
1616
<ItemsControl ItemsSource="{TemplateBinding ItemsSource}">
17+
<ItemsControl.ItemsPanel>
18+
<ItemsPanelTemplate>
19+
<WrapPanel Orientation="Horizontal" />
20+
</ItemsPanelTemplate>
21+
</ItemsControl.ItemsPanel>
1722
<ItemsControl.ItemTemplate>
1823
<DataTemplate DataType="{x:Type models:NavigationCard}">
1924
<ui:CardAction
25+
Width="320"
26+
Height="90"
2027
Margin="4"
21-
HorizontalAlignment="Stretch"
28+
HorizontalAlignment="Left"
2229
VerticalAlignment="Stretch"
2330
Command="{Binding TemplateButtonCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=controls:GalleryNavigationPresenter}, Mode=OneWay}"
2431
CommandParameter="{Binding PageType, Mode=OneTime}"
@@ -31,30 +38,21 @@
3138
</ui:CardAction.Icon>
3239
<StackPanel>
3340
<ui:TextBlock
34-
Margin="0"
3541
FontTypography="BodyStrong"
3642
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
3743
Text="{Binding Name, Mode=OneTime}"
38-
TextWrapping="WrapWithOverflow" />
44+
TextWrapping="Wrap"
45+
FontSize="16"/>
3946
<ui:TextBlock
4047
Appearance="Secondary"
4148
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
4249
Text="{Binding Description, Mode=OneTime}"
43-
TextWrapping="WrapWithOverflow" />
50+
TextWrapping="Wrap"
51+
FontSize="12"/>
4452
</StackPanel>
4553
</ui:CardAction>
4654
</DataTemplate>
4755
</ItemsControl.ItemTemplate>
48-
<ItemsControl.ItemsPanel>
49-
<ItemsPanelTemplate>
50-
<ui:VirtualizingWrapPanel
51-
IsItemsHost="True"
52-
ItemSize="290,80"
53-
Orientation="Vertical"
54-
SpacingMode="Uniform"
55-
StretchItems="True" />
56-
</ItemsPanelTemplate>
57-
</ItemsControl.ItemsPanel>
5856
</ItemsControl>
5957
</ControlTemplate>
6058
</Setter.Value>
+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
// This Source Code Form is subject to the terms of the MIT License.
2+
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
3+
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
4+
// All Rights Reserved.
5+
6+
using System.Windows.Shapes;
7+
8+
namespace Wpf.Ui.Gallery.Effects;
9+
10+
/// <summary>
11+
/// Snowflake data model
12+
/// </summary>
13+
internal class SnowFlake
14+
{
15+
private Ellipse? _shape;
16+
private double _x;
17+
private double _y;
18+
private double _size;
19+
private double _speed;
20+
private double _opacity;
21+
private double _velX;
22+
private double _velY;
23+
private double _stepSize;
24+
private double _step;
25+
private double _angle;
26+
private TranslateTransform? _transform;
27+
28+
/// <summary>
29+
/// Gets or sets shape of the snowflake
30+
/// </summary>
31+
public Ellipse? Shape
32+
{
33+
get => _shape;
34+
set => _shape = value;
35+
}
36+
37+
/// <summary>Gets or sets x position</summary>
38+
public double X
39+
{
40+
get => _x;
41+
set => _x = value;
42+
}
43+
44+
/// <summary>Gets or sets Y position</summary>
45+
public double Y
46+
{
47+
get => _y;
48+
set => _y = value;
49+
}
50+
51+
/// <summary>Gets or sets Size</summary>
52+
public double Size
53+
{
54+
get => _size;
55+
set => _size = value;
56+
}
57+
58+
/// <summary>Gets or sets Falling speed</summary>
59+
public double Speed
60+
{
61+
get => _speed;
62+
set => _speed = value;
63+
}
64+
65+
/// <summary>Gets or sets Opacity</summary>
66+
public double Opacity
67+
{
68+
get => _opacity;
69+
set => _opacity = value;
70+
}
71+
72+
/// <summary>Gets or sets Horizontal velocity</summary>
73+
public double VelX
74+
{
75+
get => _velX;
76+
set => _velX = value;
77+
}
78+
79+
/// <summary>Gets or sets Vertical velocity</summary>
80+
public double VelY
81+
{
82+
get => _velY;
83+
set => _velY = value;
84+
}
85+
86+
/// <summary>Gets or sets Step size</summary>
87+
public double StepSize
88+
{
89+
get => _stepSize;
90+
set => _stepSize = value;
91+
}
92+
93+
/// <summary>Gets or sets Step</summary>
94+
public double Step
95+
{
96+
get => _step;
97+
set => _step = value;
98+
}
99+
100+
/// <summary>Gets or sets Angle</summary>
101+
public double Angle
102+
{
103+
get => _angle;
104+
set => _angle = value;
105+
}
106+
107+
/// <summary>Gets or sets 2D coordinate transformation</summary>
108+
public TranslateTransform? Transform
109+
{
110+
get => _transform;
111+
set => _transform = value;
112+
}
113+
}

0 commit comments

Comments
 (0)