Skip to content

Commit 65fe529

Browse files
committed
feat: Add ControlsResourcesVersion property for WinUI 2.6 compatability
1 parent 6f06d77 commit 65fe529

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Microsoft.UI.Xaml.Controls
2+
{
3+
public enum ControlsResourcesVersion
4+
{
5+
Version1 = 1,
6+
Version2 = 2,
7+
}
8+
}

src/Uno.UI.FluentTheme/XamlControlsResources.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public XamlControlsResources()
3030
[NotImplemented]
3131
public static void EnsureRevealLights(UIElement element) { }
3232

33-
3433
[NotImplemented]
3534
public bool UseCompactResources
3635
{
@@ -39,9 +38,18 @@ public bool UseCompactResources
3938
}
4039

4140
[NotImplemented]
42-
public static readonly DependencyProperty UseCompactResourcesProperty =
43-
DependencyProperty.Register("UseCompactResources", typeof(bool), typeof(XamlControlsResources), new PropertyMetadata(false));
41+
public static DependencyProperty UseCompactResourcesProperty { get; } =
42+
DependencyProperty.Register(nameof(UseCompactResources), typeof(bool), typeof(XamlControlsResources), new PropertyMetadata(false));
4443

44+
[NotImplemented]
45+
public ControlsResourcesVersion ControlsResourcesVersion
46+
{
47+
get => (ControlsResourcesVersion)GetValue(ControlsResourcesVersionProperty);
48+
set => SetValue(ControlsResourcesVersionProperty, value);
49+
}
4550

51+
[NotImplemented]
52+
public static DependencyProperty ControlsResourcesVersionProperty { get; } =
53+
DependencyProperty.Register(nameof(ControlsResourcesVersion), typeof(ControlsResourcesVersion), typeof(XamlControlsResources), new PropertyMetadata(ControlsResourcesVersion.Version1));
4654
}
4755
}

0 commit comments

Comments
 (0)