diff --git a/Avalonia.slnx b/Avalonia.slnx
index 80b4042e7a..b702b0464d 100644
--- a/Avalonia.slnx
+++ b/Avalonia.slnx
@@ -155,6 +155,7 @@
+
diff --git a/src/Avalonia.Themes.Fluent2/Accents/BaseColorsPalette.xaml b/src/Avalonia.Themes.Fluent2/Accents/BaseColorsPalette.xaml
new file mode 100644
index 0000000000..620add9045
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Accents/BaseColorsPalette.xaml
@@ -0,0 +1,70 @@
+
+
+
+
+ #FFFFFFFF
+ #33FFFFFF
+ #99FFFFFF
+ #CCFFFFFF
+ #66FFFFFF
+ #FF000000
+ #33000000
+ #99000000
+ #CC000000
+ #66000000
+ #FF171717
+ #FF000000
+ #33000000
+ #66000000
+ #CC000000
+ #FFCCCCCC
+ #FF7A7A7A
+ #FFCCCCCC
+ #FFF2F2F2
+ #FFE6E6E6
+ #FFF2F2F2
+ #FFFFFFFF
+ #FF767676
+ #19000000
+ #33000000
+ #C50500
+ #FFFFFFFF
+ #17000000
+ #2E000000
+
+
+ #FF000000
+ #33000000
+ #99000000
+ #CC000000
+ #66000000
+ #FFFFFFFF
+ #33FFFFFF
+ #99FFFFFF
+ #CCFFFFFF
+ #66FFFFFF
+ #FFF2F2F2
+ #FF000000
+ #33000000
+ #66000000
+ #CC000000
+ #FF333333
+ #FF858585
+ #FF767676
+ #FF171717
+ #FF1F1F1F
+ #FF2B2B2B
+ #FFFFFFFF
+ #FF767676
+ #19FFFFFF
+ #33FFFFFF
+ #FFF000
+ #FF000000
+ #18FFFFFF
+ #30FFFFFF
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Accents/BaseResources.xaml b/src/Avalonia.Themes.Fluent2/Accents/BaseResources.xaml
new file mode 100644
index 0000000000..5328a71b3c
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Accents/BaseResources.xaml
@@ -0,0 +1,380 @@
+
+ fonts:Inter#Inter, $Default
+ 14
+
+
+ True
+ 1
+ 2
+ 10,6,6,5
+ 20
+ 20
+ 24
+ 8,5,8,6
+
+
+ 3
+ 5
+
+
+ scaleX(0.125) translateX(-2px)
+ scaleY(0.125) translateY(-2px)
+
+
+
+
+
+
+ 374
+ 0,2,0,2
+ 1
+ -1,0,-1,0
+ 32
+ 64
+ 456
+ 0
+ 1
+ 0
+
+ 12,11,12,12
+ 96
+ 40
+ 758
+
+
+ 0
+
+
+ 0,4,0,4
+
+
+ 12,0,12,0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Accents/FluentControlResources.xaml b/src/Avalonia.Themes.Fluent2/Accents/FluentControlResources.xaml
new file mode 100644
index 0000000000..80778a50db
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Accents/FluentControlResources.xaml
@@ -0,0 +1,1659 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+ 16
+ 0,4,0,12
+ 1
+
+
+
+
+
+ #FF681DA8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 64
+ 1
+ 1
+ 11,5,11,7
+ Normal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0,4,0,4
+
+
+ 0
+
+
+ 4
+ 0
+
+
+ 1
+ 32
+ 0,0
+ 12,0,0,0
+ 12,4,12,4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 11,9,11,10
+ 11,4,11,7
+
+
+ 1
+
+ 32
+ 2,0,2,0
+ 8,4,8,7
+
+
+
+
+
+
+
+
+
+
+ 0.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 20
+ 12
+ SemiBold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+ 2
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+ 1
+
+
+
+ 8,5,8,7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 24
+ 12,0,12,0
+ 12,0,12,0
+ SemiLight
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 16
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+ 16
+ 0,4,0,12
+ 1
+
+
+
+
+
+ #FFC58AF9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 64
+ 1
+ 1
+ 11,5,11,7
+ Normal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 0,4,0,4
+
+
+ 0
+
+
+ 4
+ 0
+
+
+ 1
+ 32
+ 0,0
+ 12,0,0,0
+ 12,4,12,4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 11,9,11,10
+ 11,4,11,7
+
+
+ 1
+
+ 32
+ 2,0,2,0
+ 8,4,8,7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 20
+ 12
+ SemiBold
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+ 2
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 12
+ 1
+
+
+
+ 8,5,8,7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 24
+ 12,0,12,0
+ 12,0,12,0
+ SemiLight
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 16
+ 8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs b/src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs
new file mode 100644
index 0000000000..aa1d9d7f88
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Accents/SystemAccentColors.cs
@@ -0,0 +1,160 @@
+using System;
+using Avalonia.Controls;
+using Avalonia.Media;
+using Avalonia.Platform;
+using Avalonia.Styling;
+using Avalonia.VisualTree;
+
+namespace Avalonia.Themes.Fluent2.Accents;
+
+internal sealed class SystemAccentColors : ResourceProvider
+{
+ public const string AccentKey = "SystemAccentColor";
+ public const string AccentDark1Key = "SystemAccentColorDark1";
+ public const string AccentDark2Key = "SystemAccentColorDark2";
+ public const string AccentDark3Key = "SystemAccentColorDark3";
+ public const string AccentLight1Key = "SystemAccentColorLight1";
+ public const string AccentLight2Key = "SystemAccentColorLight2";
+ public const string AccentLight3Key = "SystemAccentColorLight3";
+
+ private static readonly Color s_defaultSystemAccentColor = Color.FromRgb(0, 120, 215);
+ private bool _invalidateColors = true;
+ private Color _systemAccentColor;
+ private Color _systemAccentColorDark1, _systemAccentColorDark2, _systemAccentColorDark3;
+ private Color _systemAccentColorLight1, _systemAccentColorLight2, _systemAccentColorLight3;
+
+ public override bool HasResources => true;
+ public override bool TryGetResource(object key, ThemeVariant? theme, out object? value)
+ {
+ if (key is string strKey)
+ {
+ if (strKey.Equals(AccentKey, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColor;
+ return true;
+ }
+
+ if (strKey.Equals(AccentDark1Key, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColorDark1;
+ return true;
+ }
+
+ if (strKey.Equals(AccentDark2Key, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColorDark2;
+ return true;
+ }
+
+ if (strKey.Equals(AccentDark3Key, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColorDark3;
+ return true;
+ }
+
+ if (strKey.Equals(AccentLight1Key, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColorLight1;
+ return true;
+ }
+
+ if (strKey.Equals(AccentLight2Key, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColorLight2;
+ return true;
+ }
+
+ if (strKey.Equals(AccentLight3Key, StringComparison.InvariantCulture))
+ {
+ EnsureColors();
+ value = _systemAccentColorLight3;
+ return true;
+ }
+ }
+
+ value = null;
+ return false;
+ }
+
+ protected override void OnAddOwner(IResourceHost owner)
+ {
+ if (GetFromOwner(owner) is { } platformSettings)
+ {
+ platformSettings.ColorValuesChanged += PlatformSettingsOnColorValuesChanged;
+ }
+
+ _invalidateColors = true;
+ }
+
+ protected override void OnRemoveOwner(IResourceHost owner)
+ {
+ if (GetFromOwner(owner) is { } platformSettings)
+ {
+ platformSettings.ColorValuesChanged -= PlatformSettingsOnColorValuesChanged;
+ }
+
+ _invalidateColors = true;
+ }
+
+ private void EnsureColors()
+ {
+ if (_invalidateColors)
+ {
+ _invalidateColors = false;
+
+ var platformSettings = GetFromOwner(Owner);
+
+ _systemAccentColor = platformSettings?.GetColorValues().AccentColor1 ?? s_defaultSystemAccentColor;
+ (_systemAccentColorDark1,_systemAccentColorDark2, _systemAccentColorDark3,
+ _systemAccentColorLight1, _systemAccentColorLight2, _systemAccentColorLight3) = CalculateAccentShades(_systemAccentColor);
+ }
+ }
+
+ private static IPlatformSettings? GetFromOwner(IResourceHost? owner)
+ {
+ return owner switch
+ {
+ Application app => app.PlatformSettings,
+ Visual visual => visual.GetPlatformSettings(),
+ _ => null
+ };
+ }
+
+ public static (Color d1, Color d2, Color d3, Color l1, Color l2, Color l3) CalculateAccentShades(Color accentColor)
+ {
+ // dark1step = (hslAccent.L - SystemAccentColorDark1.L) * 255
+ const double dark1step = 28.5 / 255d;
+ const double dark2step = 49 / 255d;
+ const double dark3step = 74.5 / 255d;
+ // light1step = (SystemAccentColorLight1.L - hslAccent.L) * 255
+ const double light1step = 39 / 255d;
+ const double light2step = 70 / 255d;
+ const double light3step = 103 / 255d;
+
+ var hslAccent = accentColor.ToHsl();
+
+ return (
+ // Darker shades
+ new HslColor(hslAccent.A, hslAccent.H, hslAccent.S, hslAccent.L - dark1step).ToRgb(),
+ new HslColor(hslAccent.A, hslAccent.H, hslAccent.S, hslAccent.L - dark2step).ToRgb(),
+ new HslColor(hslAccent.A, hslAccent.H, hslAccent.S, hslAccent.L - dark3step).ToRgb(),
+
+ // Lighter shades
+ new HslColor(hslAccent.A, hslAccent.H, hslAccent.S, hslAccent.L + light1step).ToRgb(),
+ new HslColor(hslAccent.A, hslAccent.H, hslAccent.S, hslAccent.L + light2step).ToRgb(),
+ new HslColor(hslAccent.A, hslAccent.H, hslAccent.S, hslAccent.L + light3step).ToRgb()
+ );
+ }
+
+ private void PlatformSettingsOnColorValuesChanged(object? sender, PlatformColorValues e)
+ {
+ _invalidateColors = true;
+ Owner?.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Create());
+ }
+}
diff --git a/src/Avalonia.Themes.Fluent2/Avalonia.Themes.Fluent2.csproj b/src/Avalonia.Themes.Fluent2/Avalonia.Themes.Fluent2.csproj
new file mode 100644
index 0000000000..814be0eb2b
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Avalonia.Themes.Fluent2.csproj
@@ -0,0 +1,16 @@
+
+
+ $(AvsCurrentTargetFramework);$(AvsLegacyTargetFrameworks)
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs b/src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs
new file mode 100644
index 0000000000..bc2fe5bc06
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/ColorPaletteResources.Properties.cs
@@ -0,0 +1,158 @@
+using Avalonia.Media;
+
+namespace Avalonia.Themes.Fluent2;
+
+public partial class ColorPaletteResources
+{
+ private bool _hasAccentColor;
+ private Color _accentColor;
+ private Color _accentColorDark1, _accentColorDark2, _accentColorDark3;
+ private Color _accentColorLight1, _accentColorLight2, _accentColorLight3;
+
+ public static readonly DirectProperty AccentProperty
+ = AvaloniaProperty.RegisterDirect(nameof(Accent), r => r.Accent, (r, v) => r.Accent = v);
+
+ ///
+ /// Gets or sets the Accent color value.
+ ///
+ public Color Accent
+ {
+ get => _accentColor;
+ set => SetAndRaise(AccentProperty, ref _accentColor, value);
+ }
+
+ ///
+ /// Gets or sets the AltHigh color value.
+ ///
+ public Color AltHigh { get => GetColor("SystemAltHighColor"); set => SetColor("SystemAltHighColor", value); }
+
+ ///
+ /// Gets or sets the AltLow color value.
+ ///
+ public Color AltLow { get => GetColor("SystemAltLowColor"); set => SetColor("SystemAltLowColor", value); }
+
+ ///
+ /// Gets or sets the AltMedium color value.
+ ///
+ public Color AltMedium { get => GetColor("SystemAltMediumColor"); set => SetColor("SystemAltMediumColor", value); }
+
+ ///
+ /// Gets or sets the AltMediumHigh color value.
+ ///
+ public Color AltMediumHigh { get => GetColor("SystemAltMediumHighColor"); set => SetColor("SystemAltMediumHighColor", value); }
+
+ ///
+ /// Gets or sets the AltMediumLow color value.
+ ///
+ public Color AltMediumLow { get => GetColor("SystemAltMediumLowColor"); set => SetColor("SystemAltMediumLowColor", value); }
+
+ ///
+ /// Gets or sets the BaseHigh color value.
+ ///
+ public Color BaseHigh { get => GetColor("SystemBaseHighColor"); set => SetColor("SystemBaseHighColor", value); }
+
+ ///
+ /// Gets or sets the BaseLow color value.
+ ///
+ public Color BaseLow { get => GetColor("SystemBaseLowColor"); set => SetColor("SystemBaseLowColor", value); }
+
+ ///
+ /// Gets or sets the BaseMedium color value.
+ ///
+ public Color BaseMedium { get => GetColor("SystemBaseMediumColor"); set => SetColor("SystemBaseMediumColor", value); }
+
+ ///
+ /// Gets or sets the BaseMediumHigh color value.
+ ///
+ public Color BaseMediumHigh { get => GetColor("SystemBaseMediumHighColor"); set => SetColor("SystemBaseMediumHighColor", value); }
+
+ ///
+ /// Gets or sets the BaseMediumLow color value.
+ ///
+ public Color BaseMediumLow { get => GetColor("SystemBaseMediumLowColor"); set => SetColor("SystemBaseMediumLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeAltLow color value.
+ ///
+ public Color ChromeAltLow { get => GetColor("SystemChromeAltLowColor"); set => SetColor("SystemChromeAltLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeBlackHigh color value.
+ ///
+ public Color ChromeBlackHigh { get => GetColor("SystemChromeBlackHighColor"); set => SetColor("SystemChromeBlackHighColor", value); }
+
+ ///
+ /// Gets or sets the ChromeBlackLow color value.
+ ///
+ public Color ChromeBlackLow { get => GetColor("SystemChromeBlackLowColor"); set => SetColor("SystemChromeBlackLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeBlackMedium color value.
+ ///
+ public Color ChromeBlackMedium { get => GetColor("SystemChromeBlackMediumColor"); set => SetColor("SystemChromeBlackMediumColor", value); }
+
+ ///
+ /// Gets or sets the ChromeBlackMediumLow color value.
+ ///
+ public Color ChromeBlackMediumLow { get => GetColor("SystemChromeBlackMediumLowColor"); set => SetColor("SystemChromeBlackMediumLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeDisabledHigh color value.
+ ///
+ public Color ChromeDisabledHigh { get => GetColor("SystemChromeDisabledHighColor"); set => SetColor("SystemChromeDisabledHighColor", value); }
+
+ ///
+ /// Gets or sets the ChromeDisabledLow color value.
+ ///
+ public Color ChromeDisabledLow { get => GetColor("SystemChromeDisabledLowColor"); set => SetColor("SystemChromeDisabledLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeGray color value.
+ ///
+ public Color ChromeGray { get => GetColor("SystemChromeGrayColor"); set => SetColor("SystemChromeGrayColor", value); }
+
+ ///
+ /// Gets or sets the ChromeHigh color value.
+ ///
+ public Color ChromeHigh { get => GetColor("SystemChromeHighColor"); set => SetColor("SystemChromeHighColor", value); }
+
+ ///
+ /// Gets or sets the ChromeLow color value.
+ ///
+ public Color ChromeLow { get => GetColor("SystemChromeLowColor"); set => SetColor("SystemChromeLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeMedium color value.
+ ///
+ public Color ChromeMedium { get => GetColor("SystemChromeMediumColor"); set => SetColor("SystemChromeMediumColor", value); }
+
+ ///
+ /// Gets or sets the ChromeMediumLow color value.
+ ///
+ public Color ChromeMediumLow { get => GetColor("SystemChromeMediumLowColor"); set => SetColor("SystemChromeMediumLowColor", value); }
+
+ ///
+ /// Gets or sets the ChromeWhite color value.
+ ///
+ public Color ChromeWhite { get => GetColor("SystemChromeWhiteColor"); set => SetColor("SystemChromeWhiteColor", value); }
+
+ ///
+ /// Gets or sets the ErrorText color value.
+ ///
+ public Color ErrorText { get => GetColor("SystemErrorTextColor"); set => SetColor("SystemErrorTextColor", value); }
+
+ ///
+ /// Gets or sets the ListLow color value.
+ ///
+ public Color ListLow { get => GetColor("SystemListLowColor"); set => SetColor("SystemListLowColor", value); }
+
+ ///
+ /// Gets or sets the ListMedium color value.
+ ///
+ public Color ListMedium { get => GetColor("SystemListMediumColor"); set => SetColor("SystemListMediumColor", value); }
+
+ ///
+ /// Gets or sets the RegionColor color value.
+ ///
+ public Color RegionColor { get => GetColor("SystemRegionColor"); set => SetColor("SystemRegionColor", value); }
+}
diff --git a/src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs b/src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs
new file mode 100644
index 0000000000..1c87c9ed11
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/ColorPaletteResources.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Avalonia.Controls;
+using Avalonia.Media;
+using Avalonia.Styling;
+using Avalonia.Themes.Fluent2.Accents;
+
+namespace Avalonia.Themes.Fluent2;
+
+///
+/// Represents a specialized resource dictionary that contains color resources used by Fluent2Theme elements.
+///
+///
+/// This class can only be used in .
+///
+public partial class ColorPaletteResources : ResourceProvider
+{
+ private readonly Dictionary _colors = new(StringComparer.InvariantCulture);
+
+ public override bool HasResources => _hasAccentColor || _colors.Count > 0;
+
+ public override bool TryGetResource(object key, ThemeVariant? theme, out object? value)
+ {
+ if (key is string strKey)
+ {
+ if (strKey.Equals(SystemAccentColors.AccentKey, StringComparison.InvariantCulture))
+ {
+ value = _accentColor;
+ return _hasAccentColor;
+ }
+
+ if (strKey.Equals(SystemAccentColors.AccentDark1Key, StringComparison.InvariantCulture))
+ {
+ value = _accentColorDark1;
+ return _hasAccentColor;
+ }
+
+ if (strKey.Equals(SystemAccentColors.AccentDark2Key, StringComparison.InvariantCulture))
+ {
+ value = _accentColorDark2;
+ return _hasAccentColor;
+ }
+
+ if (strKey.Equals(SystemAccentColors.AccentDark3Key, StringComparison.InvariantCulture))
+ {
+ value = _accentColorDark3;
+ return _hasAccentColor;
+ }
+
+ if (strKey.Equals(SystemAccentColors.AccentLight1Key, StringComparison.InvariantCulture))
+ {
+ value = _accentColorLight1;
+ return _hasAccentColor;
+ }
+
+ if (strKey.Equals(SystemAccentColors.AccentLight2Key, StringComparison.InvariantCulture))
+ {
+ value = _accentColorLight2;
+ return _hasAccentColor;
+ }
+
+ if (strKey.Equals(SystemAccentColors.AccentLight3Key, StringComparison.InvariantCulture))
+ {
+ value = _accentColorLight3;
+ return _hasAccentColor;
+ }
+
+ if (_colors.TryGetValue(strKey, out var color))
+ {
+ value = color;
+ return true;
+ }
+ }
+
+ value = null;
+ return false;
+ }
+
+ private Color GetColor(string key)
+ {
+ if (_colors.TryGetValue(key, out var color))
+ {
+ return color;
+ }
+
+ return default;
+ }
+
+ private void SetColor(string key, Color value)
+ {
+ if (value == default)
+ {
+ _colors.Remove(key);
+ }
+ else
+ {
+ _colors[key] = value;
+ }
+ }
+
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ {
+ base.OnPropertyChanged(change);
+
+ if (change.Property == AccentProperty)
+ {
+ _hasAccentColor = _accentColor != default;
+
+ if (_hasAccentColor)
+ {
+ (_accentColorDark1, _accentColorDark2, _accentColorDark3,
+ _accentColorLight1, _accentColorLight2, _accentColorLight3) =
+ SystemAccentColors.CalculateAccentShades(_accentColor);
+ }
+ RaiseResourcesChanged();
+ }
+ }
+}
diff --git a/src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs b/src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs
new file mode 100644
index 0000000000..1587d8b33f
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/ColorPaletteResourcesCollection.cs
@@ -0,0 +1,148 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using Avalonia.Collections;
+using Avalonia.Controls;
+using Avalonia.Styling;
+
+namespace Avalonia.Themes.Fluent2;
+
+internal sealed class ColorPaletteResourcesCollection : ResourceProvider, IDictionary
+{
+ private readonly AvaloniaDictionary _inner;
+
+ public ColorPaletteResourcesCollection()
+ {
+ _inner = new AvaloniaDictionary(2);
+ _inner.ForEachItem(
+ (key, x) =>
+ {
+ if (Owner is not null)
+ {
+ ((IResourceProvider)x).AddOwner(Owner);
+ }
+
+ if (key != ThemeVariant.Dark && key != ThemeVariant.Light)
+ {
+ throw new InvalidOperationException(
+ $"{nameof(Fluent2Theme)}.{nameof(Fluent2Theme.Palettes)} only supports Light and Dark variants.");
+ }
+ },
+ (_, x) =>
+ {
+ if (Owner is not null)
+ {
+ ((IResourceProvider)x).RemoveOwner(Owner);
+ }
+ },
+ () => throw new NotSupportedException("Dictionary reset not supported"));
+ }
+
+ public override bool HasResources => _inner.Count > 0;
+ public override bool TryGetResource(object key, ThemeVariant? theme, out object? value)
+ {
+ if (theme == null || theme == ThemeVariant.Default)
+ {
+ theme = ThemeVariant.Light;
+ }
+
+ if (_inner.TryGetValue(theme, out var themePaletteResources)
+ && themePaletteResources.TryGetResource(key, theme, out value))
+ {
+ return true;
+ }
+
+ value = null;
+ return false;
+ }
+
+ protected override void OnAddOwner(IResourceHost owner)
+ {
+ base.OnAddOwner(owner);
+ foreach (var palette in _inner.Values)
+ {
+ ((IResourceProvider)palette).AddOwner(owner);
+ }
+ }
+
+ protected override void OnRemoveOwner(IResourceHost owner)
+ {
+ base.OnRemoveOwner(owner);
+ foreach (var palette in _inner.Values)
+ {
+ ((IResourceProvider)palette).RemoveOwner(owner);
+ }
+ }
+
+ IEnumerator> IEnumerable>.GetEnumerator()
+ {
+ return _inner.GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return ((IEnumerable)_inner).GetEnumerator();
+ }
+
+ void ICollection>.Add(KeyValuePair item)
+ {
+ ((ICollection>)_inner).Add(item);
+ }
+
+ void ICollection>.Clear()
+ {
+ _inner.Clear();
+ }
+
+ bool ICollection>.Contains(KeyValuePair item)
+ {
+ return ((ICollection>)_inner).Contains(item);
+ }
+
+ void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex)
+ {
+ _inner.CopyTo(array, arrayIndex);
+ }
+
+ bool ICollection>.Remove(KeyValuePair item)
+ {
+ return ((ICollection>)_inner).Remove(item);
+ }
+
+ int ICollection>.Count => _inner.Count;
+
+ bool ICollection>.IsReadOnly => _inner.IsReadOnly;
+
+ void IDictionary.Add(ThemeVariant key, ColorPaletteResources value)
+ {
+ _inner.Add(key, value);
+ }
+
+ bool IDictionary.ContainsKey(ThemeVariant key)
+ {
+ return _inner.ContainsKey(key);
+ }
+
+ bool IDictionary.Remove(ThemeVariant key)
+ {
+ return _inner.Remove(key);
+ }
+
+ bool IDictionary.TryGetValue(ThemeVariant key,
+ [MaybeNullWhen(false)]
+ out ColorPaletteResources value)
+ {
+ return _inner.TryGetValue(key, out value);
+ }
+
+ ColorPaletteResources IDictionary.this[ThemeVariant key]
+ {
+ get => _inner[key];
+ set => _inner[key] = value;
+ }
+
+ ICollection IDictionary.Keys => _inner.Keys;
+
+ ICollection IDictionary.Values => _inner.Values;
+}
diff --git a/src/Avalonia.Themes.Fluent2/Controls/AdornerLayer.xaml b/src/Avalonia.Themes.Fluent2/Controls/AdornerLayer.xaml
new file mode 100644
index 0000000000..fefa1ea055
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/AdornerLayer.xaml
@@ -0,0 +1,20 @@
+
+ 0
+ 2
+ 1
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/AutoCompleteBox.xaml b/src/Avalonia.Themes.Fluent2/Controls/AutoCompleteBox.xaml
new file mode 100644
index 0000000000..bd9c84af17
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/AutoCompleteBox.xaml
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+ Alabama
+ Alaska
+ Arizona
+ Arkansas
+ California
+ Colorado
+ Connecticut
+ Delaware
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Button.xaml b/src/Avalonia.Themes.Fluent2/Controls/Button.xaml
new file mode 100644
index 0000000000..7aea463352
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Button.xaml
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ButtonSpinner.xaml b/src/Avalonia.Themes.Fluent2/Controls/ButtonSpinner.xaml
new file mode 100644
index 0000000000..2e6c08a2f0
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ButtonSpinner.xaml
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error
+
+
+
+
+
+
+
+
+
+
+ M0,9 L10,0 20,9 19,10 10,2 1,10 z
+ M0,1 L10,10 20,1 19,0 10,8 1,0 z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Calendar.xaml b/src/Avalonia.Themes.Fluent2/Controls/Calendar.xaml
new file mode 100644
index 0000000000..713bff0091
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Calendar.xaml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CalendarButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/CalendarButton.xaml
new file mode 100644
index 0000000000..829871253b
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CalendarButton.xaml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CalendarDatePicker.xaml b/src/Avalonia.Themes.Fluent2/Controls/CalendarDatePicker.xaml
new file mode 100644
index 0000000000..395e2d514f
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CalendarDatePicker.xaml
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+ 12
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CalendarDayButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/CalendarDayButton.xaml
new file mode 100644
index 0000000000..6c419e4cc9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CalendarDayButton.xaml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CalendarItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/CalendarItem.xaml
new file mode 100644
index 0000000000..ac3ebadbb8
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CalendarItem.xaml
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+ 2000-01-01
+ 2000-01-05
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Carousel.xaml b/src/Avalonia.Themes.Fluent2/Controls/Carousel.xaml
new file mode 100644
index 0000000000..0ac46d00b2
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Carousel.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CarouselPage.xaml b/src/Avalonia.Themes.Fluent2/Controls/CarouselPage.xaml
new file mode 100644
index 0000000000..6415084dc9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CarouselPage.xaml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CheckBox.xaml b/src/Avalonia.Themes.Fluent2/Controls/CheckBox.xaml
new file mode 100644
index 0000000000..d12dfd6149
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CheckBox.xaml
@@ -0,0 +1,304 @@
+
+
+
+
+ Unchecked
+ Checked
+ Indeterminate
+ Checkbox should wrap its text
+
+
+
+
+ M5.5 10.586 1.707 6.793A1 1 0 0 0 .293 8.207l4.5 4.5a1 1 0 0 0 1.414 0l11-11A1 1 0 0 0 15.793.293L5.5 10.586Z
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ComboBox.xaml b/src/Avalonia.Themes.Fluent2/Controls/ComboBox.xaml
new file mode 100644
index 0000000000..4d83049928
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ComboBox.xaml
@@ -0,0 +1,260 @@
+
+
+
+
+
+ Item 1
+ Item 2
+
+
+ Item 1
+ Item 2
+
+
+
+
+
+
+ Error
+
+
+
+
+
+
+ Item A
+ Item b
+ Item c
+
+
+
+
+
+
+
+
+
+
+ Item A
+ Item b
+ Item c
+
+
+
+
+
+ 0,0,0,4
+ 15
+ 7
+
+ 12,5,0,7
+ 11,5,32,6
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Transparent
+ Transparent
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ComboBoxItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/ComboBoxItem.xaml
new file mode 100644
index 0000000000..ea55770a51
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ComboBoxItem.xaml
@@ -0,0 +1,87 @@
+
+
+
+
+
+ Item 1
+ Item 2 long
+ Item 3
+ Item 4
+ Item 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/CommandBar.xaml b/src/Avalonia.Themes.Fluent2/Controls/CommandBar.xaml
new file mode 100644
index 0000000000..c1f8c16a2d
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/CommandBar.xaml
@@ -0,0 +1,332 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ContentPage.xaml b/src/Avalonia.Themes.Fluent2/Controls/ContentPage.xaml
new file mode 100644
index 0000000000..5ccbe8cf38
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ContentPage.xaml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ContextMenu.xaml b/src/Avalonia.Themes.Fluent2/Controls/ContextMenu.xaml
new file mode 100644
index 0000000000..50f4844271
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ContextMenu.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0,4,0,4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/DataValidationErrors.xaml b/src/Avalonia.Themes.Fluent2/Controls/DataValidationErrors.xaml
new file mode 100644
index 0000000000..94f1d3cdda
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/DataValidationErrors.xaml
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/DatePicker.xaml b/src/Avalonia.Themes.Fluent2/Controls/DatePicker.xaml
new file mode 100644
index 0000000000..1acb160a17
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/DatePicker.xaml
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error
+
+
+
+
+
+
+
+
+ 40
+ 40
+ 41
+ 296
+ 456
+ 0,3,0,6
+ 9,3,0,6
+ 0,3,0,6
+ 9,3,0,6
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/DateTimePickerShared.xaml b/src/Avalonia.Themes.Fluent2/Controls/DateTimePickerShared.xaml
new file mode 100644
index 0000000000..23082f143e
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/DateTimePickerShared.xaml
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+ Standard Item
+ Month Item
+ Button
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/DrawerPage.xaml b/src/Avalonia.Themes.Fluent2/Controls/DrawerPage.xaml
new file mode 100644
index 0000000000..e93d6c9022
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/DrawerPage.xaml
@@ -0,0 +1,259 @@
+
+
+
+
+
+
+
+
+
+ M3 17h18a1 1 0 0 1 .117 1.993L21 19H3a1 1 0 0 1-.117-1.993L3 17h18H3Zm0-6 18-.002a1 1 0 0 1 .117 1.993l-.117.007L3 13a1 1 0 0 1-.117-1.993L3 11l18-.002L3 11Zm0-6h18a1 1 0 0 1 .117 1.993L21 7H3a1 1 0 0 1-.117-1.993L3 5h18H3Z
+
+ 48
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/DropDownButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/DropDownButton.xaml
new file mode 100644
index 0000000000..ca8cb9941b
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/DropDownButton.xaml
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/EmbeddableControlRoot.xaml b/src/Avalonia.Themes.Fluent2/Controls/EmbeddableControlRoot.xaml
new file mode 100644
index 0000000000..2ea83ec6a9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/EmbeddableControlRoot.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Expander.xaml b/src/Avalonia.Themes.Fluent2/Controls/Expander.xaml
new file mode 100644
index 0000000000..55ed424e09
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Expander.xaml
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+ Expanded content
+
+
+
+
+ Expanded content
+
+
+
+
+ Expanded content
+
+
+
+
+ Expanded content
+
+
+
+
+
+
+
+
+
+
+ Expanded content
+
+
+
+
+ Expanded content
+
+
+
+
+
+
+
+ 48
+
+
+ Stretch
+ Center
+ 16,0,0,0
+ 1
+ 0
+ 20,0,8,0
+ 32
+
+
+ 16
+ 1,1,0,1
+ 1,1,1,0
+ 0,1,1,1
+ 1,0,1,1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/FluentControls.xaml b/src/Avalonia.Themes.Fluent2/Controls/FluentControls.xaml
new file mode 100644
index 0000000000..45314f84ca
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/FluentControls.xaml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/FlyoutPresenter.xaml b/src/Avalonia.Themes.Fluent2/Controls/FlyoutPresenter.xaml
new file mode 100644
index 0000000000..42ff4c4055
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/FlyoutPresenter.xaml
@@ -0,0 +1,42 @@
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/GridSplitter.xaml b/src/Avalonia.Themes.Fluent2/Controls/GridSplitter.xaml
new file mode 100644
index 0000000000..fc08d6b0b6
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/GridSplitter.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/GroupBox.xaml b/src/Avalonia.Themes.Fluent2/Controls/GroupBox.xaml
new file mode 100644
index 0000000000..5b31fdb55c
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/GroupBox.xaml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/HeaderedContentControl.xaml b/src/Avalonia.Themes.Fluent2/Controls/HeaderedContentControl.xaml
new file mode 100644
index 0000000000..4474ac07ab
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/HeaderedContentControl.xaml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/HyperlinkButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/HyperlinkButton.xaml
new file mode 100644
index 0000000000..8b390a988a
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/HyperlinkButton.xaml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ItemsControl.xaml b/src/Avalonia.Themes.Fluent2/Controls/ItemsControl.xaml
new file mode 100644
index 0000000000..07327b530c
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ItemsControl.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Label.xaml b/src/Avalonia.Themes.Fluent2/Controls/Label.xaml
new file mode 100644
index 0000000000..daf38c2829
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Label.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ListBox.xaml b/src/Avalonia.Themes.Fluent2/Controls/ListBox.xaml
new file mode 100644
index 0000000000..d777520ecf
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ListBox.xaml
@@ -0,0 +1,50 @@
+
+
+
+
+ Test
+ Test
+ Test
+ Test
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ListBoxItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/ListBoxItem.xaml
new file mode 100644
index 0000000000..5388344b4f
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ListBoxItem.xaml
@@ -0,0 +1,78 @@
+
+
+
+
+ Disabled
+
+ Test
+
+ Test
+
+
+
+ 12,9,12,12
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ManagedFileChooser.xaml b/src/Avalonia.Themes.Fluent2/Controls/ManagedFileChooser.xaml
new file mode 100644
index 0000000000..c980135eca
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ManagedFileChooser.xaml
@@ -0,0 +1,389 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Menu.xaml b/src/Avalonia.Themes.Fluent2/Controls/Menu.xaml
new file mode 100644
index 0000000000..a0b0ce762f
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Menu.xaml
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/MenuFlyoutPresenter.xaml b/src/Avalonia.Themes.Fluent2/Controls/MenuFlyoutPresenter.xaml
new file mode 100644
index 0000000000..c12d4fcc4e
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/MenuFlyoutPresenter.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/MenuItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/MenuItem.xaml
new file mode 100644
index 0000000000..99dddf24a9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/MenuItem.xaml
@@ -0,0 +1,261 @@
+
+
+
+
+
+
+
+
+ 😊
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -4
+ 0,0,12,0
+ 24,0,0,0
+ M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/MenuScrollViewer.xaml b/src/Avalonia.Themes.Fluent2/Controls/MenuScrollViewer.xaml
new file mode 100644
index 0000000000..8badfa98eb
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/MenuScrollViewer.xaml
@@ -0,0 +1,93 @@
+
+
+
+
+
+ Item 1
+ Item 2
+ Item 3
+ Item 4
+ Item 5
+ Item 6
+ Item 7
+ Item 8
+ Item 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/NavigationPage.xaml b/src/Avalonia.Themes.Fluent2/Controls/NavigationPage.xaml
new file mode 100644
index 0000000000..cedf788e36
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/NavigationPage.xaml
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+
+ M3 17h18a1 1 0 0 1 .117 1.993L21 19H3a1 1 0 0 1-.117-1.993L3 17h18H3Zm0-6 18-.002a1 1 0 0 1 .117 1.993l-.117.007L3 13a1 1 0 0 1-.117-1.993L3 11l18-.002L3 11Zm0-6h18a1 1 0 0 1 .117 1.993L21 7H3a1 1 0 0 1-.117-1.993L3 5h18H3Z
+
+ M12.7347,4.20949 C13.0332,3.92233 13.508,3.93153 13.7952,4.23005 C14.0823,4.52857 14.0731,5.00335 13.7746,5.29051 L5.50039,13.25 L24.2532,13.25 C24.6674,13.25 25.0032,13.5858 25.0032,13.9999982 C25.0032,14.4142 24.6674,14.75 24.2532,14.75 L5.50137,14.75 L13.7746,22.7085 C14.0731,22.9957 14.0823,23.4705 13.7952,23.769 C13.508,24.0675 13.0332,24.0767 12.7347,23.7896 L3.30673,14.7202 C2.89776,14.3268 2.89776,13.6723 3.30673,13.2788 L12.7347,4.20949 Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/NotificationCard.xaml b/src/Avalonia.Themes.Fluent2/Controls/NotificationCard.xaml
new file mode 100644
index 0000000000..6e9277df09
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/NotificationCard.xaml
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/NumericUpDown.xaml b/src/Avalonia.Themes.Fluent2/Controls/NumericUpDown.xaml
new file mode 100644
index 0000000000..bcd486534d
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/NumericUpDown.xaml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/OverlayPopupHost.xaml b/src/Avalonia.Themes.Fluent2/Controls/OverlayPopupHost.xaml
new file mode 100644
index 0000000000..132400d859
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/OverlayPopupHost.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/PathIcon.xaml b/src/Avalonia.Themes.Fluent2/Controls/PathIcon.xaml
new file mode 100644
index 0000000000..2a817ccfcb
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/PathIcon.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+ M14 9.50006C11.5147 9.50006 9.5 11.5148 9.5 14.0001C9.5 16.4853 11.5147 18.5001 14 18.5001C15.3488 18.5001 16.559 17.9066 17.3838 16.9666C18.0787 16.1746 18.5 15.1365 18.5 14.0001C18.5 13.5401 18.431 13.0963 18.3028 12.6784C17.7382 10.8381 16.0253 9.50006 14 9.50006ZM11 14.0001C11 12.3432 12.3431 11.0001 14 11.0001C15.6569 11.0001 17 12.3432 17 14.0001C17 15.6569 15.6569 17.0001 14 17.0001C12.3431 17.0001 11 15.6569 11 14.0001Z M21.7093 22.3948L19.9818 21.6364C19.4876 21.4197 18.9071 21.4515 18.44 21.7219C17.9729 21.9924 17.675 22.4693 17.6157 23.0066L17.408 24.8855C17.3651 25.273 17.084 25.5917 16.7055 25.682C14.9263 26.1061 13.0725 26.1061 11.2933 25.682C10.9148 25.5917 10.6336 25.273 10.5908 24.8855L10.3834 23.0093C10.3225 22.4731 10.0112 21.9976 9.54452 21.7281C9.07783 21.4586 8.51117 21.4269 8.01859 21.6424L6.29071 22.4009C5.93281 22.558 5.51493 22.4718 5.24806 22.1859C4.00474 20.8536 3.07924 19.2561 2.54122 17.5137C2.42533 17.1384 2.55922 16.7307 2.8749 16.4977L4.40219 15.3703C4.83721 15.0501 5.09414 14.5415 5.09414 14.0007C5.09414 13.4598 4.83721 12.9512 4.40162 12.6306L2.87529 11.5051C2.55914 11.272 2.42513 10.8638 2.54142 10.4882C3.08038 8.74734 4.00637 7.15163 5.24971 5.82114C5.51684 5.53528 5.93492 5.44941 6.29276 5.60691L8.01296 6.36404C8.50793 6.58168 9.07696 6.54881 9.54617 6.27415C10.0133 6.00264 10.3244 5.52527 10.3844 4.98794L10.5933 3.11017C10.637 2.71803 10.9245 2.39704 11.3089 2.31138C12.19 2.11504 13.0891 2.01071 14.0131 2.00006C14.9147 2.01047 15.8128 2.11485 16.6928 2.31149C17.077 2.39734 17.3643 2.71823 17.4079 3.11017L17.617 4.98937C17.7116 5.85221 18.4387 6.50572 19.3055 6.50663C19.5385 6.507 19.769 6.45838 19.9843 6.36294L21.7048 5.60568C22.0626 5.44818 22.4807 5.53405 22.7478 5.81991C23.9912 7.1504 24.9172 8.74611 25.4561 10.487C25.5723 10.8623 25.4386 11.2703 25.1228 11.5035L23.5978 12.6297C23.1628 12.95 22.9 13.4586 22.9 13.9994C22.9 14.5403 23.1628 15.0489 23.5988 15.3698L25.1251 16.4965C25.441 16.7296 25.5748 17.1376 25.4586 17.5131C24.9198 19.2536 23.9944 20.8492 22.7517 22.1799C22.4849 22.4657 22.0671 22.5518 21.7093 22.3948ZM16.263 22.1966C16.4982 21.4685 16.9889 20.8288 17.6884 20.4238C18.5702 19.9132 19.6536 19.8547 20.5841 20.2627L21.9281 20.8526C22.791 19.8538 23.4593 18.7013 23.8981 17.4552L22.7095 16.5778L22.7086 16.5771C21.898 15.98 21.4 15.0277 21.4 13.9994C21.4 12.9719 21.8974 12.0195 22.7073 11.4227L22.7085 11.4218L23.8957 10.545C23.4567 9.2988 22.7881 8.14636 21.9248 7.1477L20.5922 7.73425L20.5899 7.73527C20.1844 7.91463 19.7472 8.00722 19.3039 8.00663C17.6715 8.00453 16.3046 6.77431 16.1261 5.15465L16.1259 5.15291L15.9635 3.69304C15.3202 3.57328 14.6677 3.50872 14.013 3.50017C13.3389 3.50891 12.6821 3.57367 12.0377 3.69328L11.8751 5.15452C11.7625 6.16272 11.1793 7.05909 10.3019 7.56986C9.41937 8.0856 8.34453 8.14844 7.40869 7.73694L6.07273 7.14893C5.20949 8.14751 4.54092 9.29983 4.10196 10.5459L5.29181 11.4233C6.11115 12.0269 6.59414 12.9837 6.59414 14.0007C6.59414 15.0173 6.11142 15.9742 5.29237 16.5776L4.10161 17.4566C4.54002 18.7044 5.2085 19.8585 6.07205 20.8587L7.41742 20.2682C8.34745 19.8613 9.41573 19.9215 10.2947 20.4292C11.174 20.937 11.7593 21.832 11.8738 22.84L11.8744 22.8445L12.0362 24.3088C13.3326 24.5638 14.6662 24.5638 15.9626 24.3088L16.1247 22.8418C16.1491 22.6217 16.1955 22.4055 16.263 22.1966Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/PipsPager.xaml b/src/Avalonia.Themes.Fluent2/Controls/PipsPager.xaml
new file mode 100644
index 0000000000..a331b63977
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/PipsPager.xaml
@@ -0,0 +1,351 @@
+
+
+
+
+
+
+
+ M 8.12,2.29 L 3.41,7.00 C 3.14,7.27 3.14,7.71 3.41,7.98 L 8.12,12.69 C 8.57,13.14 9.33,12.82 9.33,12.19 L 9.33,2.79 C 9.33,2.16 8.57,1.84 8.12,2.29 Z
+ M 3.88,2.29 L 8.59,7.00 C 8.86,7.27 8.86,7.71 8.59,7.98 L 3.88,12.69 C 3.43,13.14 2.67,12.82 2.67,12.19 L 2.67,2.79 C 2.67,2.16 3.43,1.84 3.88,2.29 Z
+
+
+ M 2.29,8.12 L 7.00,3.41 C 7.27,3.14 7.71,3.14 7.98,3.41 L 12.69,8.12 C 13.14,8.57 12.82,9.33 12.19,9.33 L 2.79,9.33 C 2.16,9.33 1.84,8.57 2.29,8.12 Z
+ M 2.29,3.88 L 7.00,8.59 C 7.27,8.86 7.71,8.86 7.98,8.59 L 12.69,3.88 C 13.14,3.43 12.82,2.67 12.19,2.67 L 2.79,2.67 C 2.16,2.67 1.84,3.43 2.29,3.88 Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/PopupRoot.xaml b/src/Avalonia.Themes.Fluent2/Controls/PopupRoot.xaml
new file mode 100644
index 0000000000..1ce4e63576
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/PopupRoot.xaml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ProgressBar.xaml b/src/Avalonia.Themes.Fluent2/Controls/ProgressBar.xaml
new file mode 100644
index 0000000000..adb8551ec3
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ProgressBar.xaml
@@ -0,0 +1,198 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/RadioButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/RadioButton.xaml
new file mode 100644
index 0000000000..e1609f5cc3
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/RadioButton.xaml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/RefreshContainer.xaml b/src/Avalonia.Themes.Fluent2/Controls/RefreshContainer.xaml
new file mode 100644
index 0000000000..b030acca30
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/RefreshContainer.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/RefreshVisualizer.xaml b/src/Avalonia.Themes.Fluent2/Controls/RefreshVisualizer.xaml
new file mode 100644
index 0000000000..c5f993bb0e
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/RefreshVisualizer.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/RepeatButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/RepeatButton.xaml
new file mode 100644
index 0000000000..2d19ec79ee
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/RepeatButton.xaml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ScrollBar.xaml b/src/Avalonia.Themes.Fluent2/Controls/ScrollBar.xaml
new file mode 100644
index 0000000000..8af22dd0b9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ScrollBar.xaml
@@ -0,0 +1,297 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ScrollViewer.xaml b/src/Avalonia.Themes.Fluent2/Controls/ScrollViewer.xaml
new file mode 100644
index 0000000000..611c7dc49b
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ScrollViewer.xaml
@@ -0,0 +1,71 @@
+
+
+
+
+ Item 1
+ Item 2
+ Item 3
+ Item 4
+ Item 5
+ Item 6
+ Item 7
+ Item 8
+ Item 9
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/SelectableTextBlock.xaml b/src/Avalonia.Themes.Fluent2/Controls/SelectableTextBlock.xaml
new file mode 100644
index 0000000000..8e5d7bdb1c
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/SelectableTextBlock.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Separator.xaml b/src/Avalonia.Themes.Fluent2/Controls/Separator.xaml
new file mode 100644
index 0000000000..3b4a111a58
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Separator.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Slider.xaml b/src/Avalonia.Themes.Fluent2/Controls/Slider.xaml
new file mode 100644
index 0000000000..c7e41e1a02
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Slider.xaml
@@ -0,0 +1,376 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0,0,0,4
+ 15
+ 15
+ 32
+ 32
+ 10
+ 20
+ 20
+ 20
+ 20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/SplitButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/SplitButton.xaml
new file mode 100644
index 0000000000..c62ad599d4
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/SplitButton.xaml
@@ -0,0 +1,206 @@
+
+
+
+
+
+
+ Hello
+
+
+
+
+ Hello
+
+
+ Disabled
+
+
+ Hello
+
+
+
+
+ Hello
+
+
+
+
+
+
+
+ 32
+ 32
+ 1
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/SplitView.xaml b/src/Avalonia.Themes.Fluent2/Controls/SplitView.xaml
new file mode 100644
index 0000000000..1298318e9e
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/SplitView.xaml
@@ -0,0 +1,455 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 320
+ 48
+ 00:00:00.2
+ 00:00:00.1
+ 0.1,0.9,0.2,1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TabControl.xaml b/src/Avalonia.Themes.Fluent2/Controls/TabControl.xaml
new file mode 100644
index 0000000000..123a1cff7d
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TabControl.xaml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0 0 0 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TabItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/TabItem.xaml
new file mode 100644
index 0000000000..7f7d71caed
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TabItem.xaml
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+
+
+
+
+
+ 48
+ 24
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TabStrip.xaml b/src/Avalonia.Themes.Fluent2/Controls/TabStrip.xaml
new file mode 100644
index 0000000000..ecaad94482
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TabStrip.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+ Item 1
+ Item 2
+ Disabled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TabStripItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/TabStripItem.xaml
new file mode 100644
index 0000000000..b9b0fc6026
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TabStripItem.xaml
@@ -0,0 +1,95 @@
+
+
+
+
+ Leaf
+ Arch
+ Background
+
+
+
+
+ 48
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TabbedPage.xaml b/src/Avalonia.Themes.Fluent2/Controls/TabbedPage.xaml
new file mode 100644
index 0000000000..d19f8937ee
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TabbedPage.xaml
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+ 18
+
+ 0
+ 0
+
+
+ 48
+ 0
+ 8,4
+ 0
+
+
+ 20
+ 12
+ 4
+
+
+
+ 0
+ 0
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TextBox.xaml b/src/Avalonia.Themes.Fluent2/Controls/TextBox.xaml
new file mode 100644
index 0000000000..da70caa5c6
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TextBox.xaml
@@ -0,0 +1,282 @@
+
+
+
+
+ Left
+ Center
+ Clear
+ Reveal Password
+ Password Revealed
+
+
+ Content
+
+
+
+
+ 0,0,0,4
+ M 11.416016,10 20,1.4160156 18.583984,0 10,8.5839846 1.4160156,0 0,1.4160156 8.5839844,10 0,18.583985 1.4160156,20 10,11.416015 18.583984,20 20,18.583985 Z
+ m10.051 7.0032c2.215 0 4.0105 1.7901 4.0105 3.9984s-1.7956 3.9984-4.0105 3.9984c-2.215 0-4.0105-1.7901-4.0105-3.9984s1.7956-3.9984 4.0105-3.9984zm0 1.4994c-1.3844 0-2.5066 1.1188-2.5066 2.499s1.1222 2.499 2.5066 2.499 2.5066-1.1188 2.5066-2.499-1.1222-2.499-2.5066-2.499zm0-5.0026c4.6257 0 8.6188 3.1487 9.7267 7.5613 0.10085 0.40165-0.14399 0.80877-0.54686 0.90931-0.40288 0.10054-0.81122-0.14355-0.91208-0.54521-0.94136-3.7492-4.3361-6.4261-8.2678-6.4261-3.9334 0-7.3292 2.6792-8.2689 6.4306-0.10063 0.40171-0.50884 0.64603-0.91177 0.54571s-0.648-0.5073-0.54737-0.90901c1.106-4.4152 5.1003-7.5667 9.728-7.5667z
+ m0.21967 0.21965c-0.26627 0.26627-0.29047 0.68293-0.07262 0.97654l0.07262 0.08412 4.0346 4.0346c-1.922 1.3495-3.3585 3.365-3.9554 5.7495-0.10058 0.4018 0.14362 0.8091 0.54543 0.9097 0.40182 0.1005 0.80909-0.1436 0.90968-0.5455 0.52947-2.1151 1.8371-3.8891 3.5802-5.0341l1.8096 1.8098c-0.70751 0.7215-1.1438 1.71-1.1438 2.8003 0 2.2092 1.7909 4 4 4 1.0904 0 2.0788-0.4363 2.8004-1.1438l5.9193 5.9195c0.2929 0.2929 0.7677 0.2929 1.0606 0 0.2663-0.2662 0.2905-0.6829 0.0726-0.9765l-0.0726-0.0841-6.1135-6.1142 0.0012-0.0015-1.2001-1.1979-2.8699-2.8693 2e-3 -8e-4 -2.8812-2.8782 0.0012-0.0018-1.1333-1.1305-4.3064-4.3058c-0.29289-0.29289-0.76777-0.29289-1.0607 0zm7.9844 9.0458 3.5351 3.5351c-0.45 0.4358-1.0633 0.704-1.7392 0.704-1.3807 0-2.5-1.1193-2.5-2.5 0-0.6759 0.26824-1.2892 0.7041-1.7391zm1.7959-5.7655c-1.0003 0-1.9709 0.14807-2.8889 0.425l1.237 1.2362c0.5358-0.10587 1.0883-0.16119 1.6519-0.16119 3.9231 0 7.3099 2.6803 8.2471 6.4332 0.1004 0.4018 0.5075 0.6462 0.9094 0.5459 0.4019-0.1004 0.6463-0.5075 0.5459-0.9094-1.103-4.417-5.0869-7.5697-9.7024-7.5697zm0.1947 3.5093 3.8013 3.8007c-0.1018-2.0569-1.7488-3.7024-3.8013-3.8007z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TextSelectionHandle.xaml b/src/Avalonia.Themes.Fluent2/Controls/TextSelectionHandle.xaml
new file mode 100644
index 0000000000..42020b14f7
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TextSelectionHandle.xaml
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+ 32
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ThemeVariantScope.xaml b/src/Avalonia.Themes.Fluent2/Controls/ThemeVariantScope.xaml
new file mode 100644
index 0000000000..6adc49493e
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ThemeVariantScope.xaml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TimePicker.xaml b/src/Avalonia.Themes.Fluent2/Controls/TimePicker.xaml
new file mode 100644
index 0000000000..27e52fa152
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TimePicker.xaml
@@ -0,0 +1,319 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error
+
+
+
+
+
+
+
+
+ 40
+ 1
+ 1
+ 40
+ 41
+ 242
+ 456
+ 0,3,0,6
+ 0,3,0,6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ToggleButton.xaml b/src/Avalonia.Themes.Fluent2/Controls/ToggleButton.xaml
new file mode 100644
index 0000000000..2d536e098a
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ToggleButton.xaml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ToggleSwitch.xaml b/src/Avalonia.Themes.Fluent2/Controls/ToggleSwitch.xaml
new file mode 100644
index 0000000000..5a262d3d56
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ToggleSwitch.xaml
@@ -0,0 +1,266 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 0,0,0,6
+ 6
+ 6
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/ToolTip.xaml b/src/Avalonia.Themes.Fluent2/Controls/ToolTip.xaml
new file mode 100644
index 0000000000..b3120301cb
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/ToolTip.xaml
@@ -0,0 +1,59 @@
+
+
+
+
+ Text Content
+ Very long text content which should exceed the maximum with of the tooltip and wrap.
+
+
+ Multi-line
+ Control Content
+
+
+
+
+
+
+ 320
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TransitioningContentControl.xaml b/src/Avalonia.Themes.Fluent2/Controls/TransitioningContentControl.xaml
new file mode 100644
index 0000000000..03cb09e395
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TransitioningContentControl.xaml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TreeView.xaml b/src/Avalonia.Themes.Fluent2/Controls/TreeView.xaml
new file mode 100644
index 0000000000..24854694a8
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TreeView.xaml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/TreeViewItem.xaml b/src/Avalonia.Themes.Fluent2/Controls/TreeViewItem.xaml
new file mode 100644
index 0000000000..a1b22528c9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/TreeViewItem.xaml
@@ -0,0 +1,178 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 16
+ 12
+ 12, 0, 12, 0
+ M 1,0 10,10 l -9,10 -1,-1 L 8,10 -0,1 Z
+ M0,1 L10,10 20,1 19,0 10,8 1,0 Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/Window.xaml b/src/Avalonia.Themes.Fluent2/Controls/Window.xaml
new file mode 100644
index 0000000000..0f25079004
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/Window.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/WindowDrawnDecorations.xaml b/src/Avalonia.Themes.Fluent2/Controls/WindowDrawnDecorations.xaml
new file mode 100644
index 0000000000..d9af9faf79
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/WindowDrawnDecorations.xaml
@@ -0,0 +1,224 @@
+
+
+ 45
+ 30
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Controls/WindowNotificationManager.xaml b/src/Avalonia.Themes.Fluent2/Controls/WindowNotificationManager.xaml
new file mode 100644
index 0000000000..cbdd01bd6f
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Controls/WindowNotificationManager.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/DensityStyles/Compact.xaml b/src/Avalonia.Themes.Fluent2/DensityStyles/Compact.xaml
new file mode 100644
index 0000000000..f306a0795f
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/DensityStyles/Compact.xaml
@@ -0,0 +1,26 @@
+
+ 14
+ 24
+ 32
+ 4, 2
+ 4,2
+ 24
+ 11,5,11,7
+ 4 4 8 4
+ 5, 2
+ 24
+ 0,1,0,2
+ 0,1,0,2
+ 9,0,0,1
+ 10,0,30,0
+ 24
+ 12,1,0,3
+ 32
+ 28
+ 6, 0
+ 6,4
+ 24
+ 24
+
diff --git a/src/Avalonia.Themes.Fluent2/Fluent2Theme.xaml b/src/Avalonia.Themes.Fluent2/Fluent2Theme.xaml
new file mode 100644
index 0000000000..749c29a1e1
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Fluent2Theme.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Avalonia.Themes.Fluent2/Fluent2Theme.xaml.cs b/src/Avalonia.Themes.Fluent2/Fluent2Theme.xaml.cs
new file mode 100644
index 0000000000..58a7d0d3eb
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Fluent2Theme.xaml.cs
@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using Avalonia.Styling;
+
+namespace Avalonia.Themes.Fluent2
+{
+ public enum DensityStyle
+ {
+ Normal,
+ Compact
+ }
+
+ ///
+ /// Includes the fluent theme in an application.
+ ///
+ public class Fluent2Theme : Styles, IResourceNode
+ {
+ private readonly ResourceDictionary _compactStyles;
+ private DensityStyle _densityStyle;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The parent's service provider.
+ public Fluent2Theme(IServiceProvider? sp = null)
+ {
+ AvaloniaXamlLoader.Load(sp, this);
+
+ _compactStyles = (ResourceDictionary)GetAndRemove("CompactStyles");
+
+ Palettes = Resources.MergedDictionaries.OfType().FirstOrDefault()
+ ?? throw new InvalidOperationException("Fluent2Theme was initialized with missing ColorPaletteResourcesCollection.");
+
+ object GetAndRemove(string key)
+ {
+ var val = Resources[key]
+ ?? throw new KeyNotFoundException($"Key {key} was not found in the resources");
+ Resources.Remove(key);
+ return val;
+ }
+ }
+
+ public static readonly DirectProperty DensityStyleProperty = AvaloniaProperty.RegisterDirect(
+ nameof(DensityStyle), o => o.DensityStyle, (o, v) => o.DensityStyle = v);
+
+ ///
+ /// Gets or sets the density style of the fluent theme (normal, compact).
+ ///
+ public DensityStyle DensityStyle
+ {
+ get => _densityStyle;
+ set => SetAndRaise(DensityStyleProperty, ref _densityStyle, value);
+ }
+
+ public IDictionary Palettes { get; }
+
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ {
+ base.OnPropertyChanged(change);
+
+ if (change.Property == DensityStyleProperty)
+ {
+ Owner?.NotifyHostedResourcesChanged(ResourcesChangedEventArgs.Create());
+ }
+ }
+
+ bool IResourceNode.TryGetResource(object key, ThemeVariant? theme, out object? value)
+ {
+ // DensityStyle dictionary should be checked first
+ if (_densityStyle == DensityStyle.Compact
+ && _compactStyles.TryGetResource(key, theme, out value))
+ {
+ return true;
+ }
+
+ return base.TryGetResource(key, theme, out value);
+ }
+ }
+}
diff --git a/src/Avalonia.Themes.Fluent2/Properties/AssemblyInfo.cs b/src/Avalonia.Themes.Fluent2/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..370c66b4b0
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Properties/AssemblyInfo.cs
@@ -0,0 +1,3 @@
+using Avalonia.Metadata;
+
+[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Themes.Fluent2")]
diff --git a/src/Avalonia.Themes.Fluent2/Strings/InvariantResources.xaml b/src/Avalonia.Themes.Fluent2/Strings/InvariantResources.xaml
new file mode 100644
index 0000000000..2e7c1687e9
--- /dev/null
+++ b/src/Avalonia.Themes.Fluent2/Strings/InvariantResources.xaml
@@ -0,0 +1,29 @@
+
+
+ day
+ month
+ year
+
+ hour
+ minute
+ second
+
+ Cut
+ Copy
+ Paste
+
+ File name
+ Show hidden files
+ OK
+ Cancel
+ Name
+ Date Modified
+ Type
+ Size
+ {0} already exists. Do you want to replace it?
+ Yes
+ No
+
+