From a8aa937465216ee37ffdd4890b42cb32a289be51 Mon Sep 17 00:00:00 2001
From: WantToBeeMe <93130991+WantToBeeMe@users.noreply.github.com>
Date: Fri, 27 Jun 2025 23:22:51 +0200
Subject: [PATCH 01/14] Trails work
---
WheelWizard/Views/App.axaml | 1 +
.../Components/WhWzLibrary/WheelTrail.axaml | 35 +++++++++++
.../WhWzLibrary/WheelTrail.axaml.cs | 63 +++++++++++++++++++
WheelWizard/Views/Layout.axaml | 8 ++-
WheelWizard/Views/Pages/HomePage.axaml | 20 +++++-
5 files changed, 122 insertions(+), 5 deletions(-)
create mode 100644 WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml
create mode 100644 WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs
diff --git a/WheelWizard/Views/App.axaml b/WheelWizard/Views/App.axaml
index 6c44826f..c8b10f02 100644
--- a/WheelWizard/Views/App.axaml
+++ b/WheelWizard/Views/App.axaml
@@ -68,5 +68,6 @@
+
\ No newline at end of file
diff --git a/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml
new file mode 100644
index 00000000..00c78d67
--- /dev/null
+++ b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs
new file mode 100644
index 00000000..20c70a18
--- /dev/null
+++ b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs
@@ -0,0 +1,63 @@
+using Avalonia;
+using Avalonia.Controls.Primitives;
+using Avalonia.Media;
+
+namespace WheelWizard.Views.Components
+{
+ public class WheelTrail : TemplatedControl
+ {
+ public static readonly StyledProperty AngleProperty = AvaloniaProperty.Register(nameof(Angle));
+
+ public double Angle
+ {
+ get => GetValue(AngleProperty);
+ set => SetValue(AngleProperty, value);
+ }
+
+ public static readonly StyledProperty XProperty = AvaloniaProperty.Register(nameof(X));
+
+ public double X
+ {
+ get => GetValue(XProperty);
+ set => SetValue(XProperty, value);
+ }
+
+ public static readonly StyledProperty YProperty = AvaloniaProperty.Register(nameof(Y));
+
+ public double Y
+ {
+ get => GetValue(YProperty);
+ set => SetValue(YProperty, value);
+ }
+
+ private readonly RotateTransform _rotateTransform = new RotateTransform { CenterX = 0.5, CenterY = 0.5 };
+ private readonly TranslateTransform _translateTransform = new TranslateTransform { X = 0, Y = 0 };
+
+ public WheelTrail()
+ {
+ var group = new TransformGroup();
+ group.Children.Add(_rotateTransform);
+ group.Children.Add(_translateTransform);
+ this.RenderTransform = group;
+ }
+
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ {
+ base.OnPropertyChanged(change);
+
+ if (change.Property == AngleProperty)
+ {
+ _rotateTransform.Angle = (double)(change.NewValue ?? 0.0);
+ }
+
+ if (change.Property == XProperty)
+ {
+ _translateTransform.X = (double)(change.NewValue ?? 0.0);
+ }
+ if (change.Property == YProperty)
+ {
+ _translateTransform.Y = (double)(change.NewValue ?? 0.0);
+ }
+ }
+ }
+}
diff --git a/WheelWizard/Views/Layout.axaml b/WheelWizard/Views/Layout.axaml
index 9c331224..db31cd3a 100644
--- a/WheelWizard/Views/Layout.axaml
+++ b/WheelWizard/Views/Layout.axaml
@@ -56,9 +56,11 @@
-
-
+
+
+
+
-
+
+
+
+
+
-
+
+
+
From 16833fc1b62a6575672053ffd76daec1e453f4f3 Mon Sep 17 00:00:00 2001
From: WantToBeeMe <93130991+WantToBeeMe@users.noreply.github.com>
Date: Fri, 27 Jun 2025 23:35:29 +0200
Subject: [PATCH 02/14] extended Height property which can be used for
animating later
---
.../Views/Components/WhWzLibrary/WheelTrail.axaml | 6 ++++--
.../Components/WhWzLibrary/WheelTrail.axaml.cs | 10 ++++++++++
.../Views/Converters/DoubleToThicknessConverters.cs | 13 +++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 WheelWizard/Views/Converters/DoubleToThicknessConverters.cs
diff --git a/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml
index 00c78d67..4ecc1824 100644
--- a/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml
+++ b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml
@@ -1,12 +1,13 @@
-
+
@@ -19,7 +20,8 @@
+ CornerRadius="100000,100000,0,0" Height="10000" VerticalAlignment="Top"
+ Margin="{TemplateBinding ExtendedHeight, Converter={x:Static conv:DoubleToThicknessConverters.DoubleToTop}}">
diff --git a/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs
index 20c70a18..917597d7 100644
--- a/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs
+++ b/WheelWizard/Views/Components/WhWzLibrary/WheelTrail.axaml.cs
@@ -30,6 +30,16 @@ public double Y
set => SetValue(YProperty, value);
}
+ public static readonly StyledProperty ExtendedHeightProperty = AvaloniaProperty.Register(
+ nameof(ExtendedHeight)
+ );
+
+ public double ExtendedHeight
+ {
+ get => GetValue(ExtendedHeightProperty);
+ set => SetValue(ExtendedHeightProperty, value);
+ }
+
private readonly RotateTransform _rotateTransform = new RotateTransform { CenterX = 0.5, CenterY = 0.5 };
private readonly TranslateTransform _translateTransform = new TranslateTransform { X = 0, Y = 0 };
diff --git a/WheelWizard/Views/Converters/DoubleToThicknessConverters.cs b/WheelWizard/Views/Converters/DoubleToThicknessConverters.cs
new file mode 100644
index 00000000..c84853fc
--- /dev/null
+++ b/WheelWizard/Views/Converters/DoubleToThicknessConverters.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Data.Converters;
+using Avalonia.Media;
+
+namespace WheelWizard.Views.Converters;
+
+public class DoubleToThicknessConverters
+{
+ public static readonly IValueConverter DoubleToTop = new FuncValueConverter(x => new Thickness(0, x, 0, 0));
+ public static readonly IValueConverter DoubleToBottom = new FuncValueConverter(x => new Thickness(0, 0, 0, x));
+ public static readonly IValueConverter DoubleToLeft = new FuncValueConverter(x => new Thickness(x, 0, 0, 0));
+ public static readonly IValueConverter DoubleToRight = new FuncValueConverter(x => new Thickness(0, 0, x, 0));
+}
From 3f967c115425a7a5c322963ddb97673815021a23 Mon Sep 17 00:00:00 2001
From: WantToBeeMe <93130991+WantToBeeMe@users.noreply.github.com>
Date: Fri, 27 Jun 2025 23:53:04 +0200
Subject: [PATCH 03/14] this is so satisfying
---
WheelWizard/Views/Pages/HomePage.axaml | 37 ++++++++++++++++++++------
1 file changed, 29 insertions(+), 8 deletions(-)
diff --git a/WheelWizard/Views/Pages/HomePage.axaml b/WheelWizard/Views/Pages/HomePage.axaml
index c9479bd4..481a934b 100644
--- a/WheelWizard/Views/Pages/HomePage.axaml
+++ b/WheelWizard/Views/Pages/HomePage.axaml
@@ -8,6 +8,22 @@
mc:Ignorable="d" d:DesignWidth="656" d:DesignHeight="876"
ClipToBounds="False"
x:Class="WheelWizard.Views.Pages.HomePage">
+
+
+
@@ -35,14 +51,15 @@
+ Width="137" Angle="45" Y="-60" X="-20" Classes="EntranceTrail" ExtendedHeight="700"
+ Background="{StaticResource Primary400}" Foreground="{StaticResource Primary700}"/>
+
+ Width="137" Angle="45" Y="-40" X="170" Classes="EntranceTrail" ExtendedHeight="700"
+ Background="{StaticResource Primary600}" Foreground="{StaticResource Primary800}"/>
+ Width="137" Angle="45" Y="150" X="190" Classes="EntranceTrail" ExtendedHeight="700"
+ Background="{StaticResource Primary200}" Foreground="{StaticResource Primary600}"/>
@@ -58,10 +75,10 @@
-->
@@ -88,5 +105,9 @@
Click="DolphinButton_OnClick"
Width="100" Margin="0,6,0,0" />
+
+
+
+
\ No newline at end of file
From f7309aeaee7a3efc00918fed0bcf20fbde5471e6 Mon Sep 17 00:00:00 2001
From: WantToBeeMe <93130991+WantToBeeMe@users.noreply.github.com>
Date: Sat, 28 Jun 2025 00:17:21 +0200
Subject: [PATCH 04/14] this is soo satisfying
---
WheelWizard/Views/Pages/HomePage.axaml | 22 +++++++++++-----------
WheelWizard/Views/Pages/HomePage.axaml.cs | 22 ++++++++++++++++++++++
2 files changed, 33 insertions(+), 11 deletions(-)
diff --git a/WheelWizard/Views/Pages/HomePage.axaml b/WheelWizard/Views/Pages/HomePage.axaml
index 481a934b..0bca5685 100644
--- a/WheelWizard/Views/Pages/HomePage.axaml
+++ b/WheelWizard/Views/Pages/HomePage.axaml
@@ -12,7 +12,7 @@
+
+
+
+
+
+
+
+
+
@@ -26,31 +78,54 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
diff --git a/WheelWizard/Views/Converters/BrushColorConverters.cs b/WheelWizard/Views/Converters/BrushColorConverters.cs
new file mode 100644
index 00000000..120ae5f8
--- /dev/null
+++ b/WheelWizard/Views/Converters/BrushColorConverters.cs
@@ -0,0 +1,28 @@
+using Avalonia.Data.Converters;
+using Avalonia.Media;
+
+namespace WheelWizard.Views.Converters;
+
+// Note that this is static, which means you dont have to add it as a converter
+public static class BrushColorConverters
+{
+ public static readonly IValueConverter TransparentColor = new FuncValueConverter