Skip to content

Commit

Permalink
feat: Add ControlsResourcesVersion property for WinUI 2.6 compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed May 22, 2021
1 parent 6f06d77 commit 65fe529
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/Uno.UI.FluentTheme/ControlsResourcesVersion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Microsoft.UI.Xaml.Controls
{
public enum ControlsResourcesVersion
{
Version1 = 1,
Version2 = 2,
}
}
14 changes: 11 additions & 3 deletions src/Uno.UI.FluentTheme/XamlControlsResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public XamlControlsResources()
[NotImplemented]
public static void EnsureRevealLights(UIElement element) { }


[NotImplemented]
public bool UseCompactResources
{
Expand All @@ -39,9 +38,18 @@ public bool UseCompactResources
}

[NotImplemented]
public static readonly DependencyProperty UseCompactResourcesProperty =
DependencyProperty.Register("UseCompactResources", typeof(bool), typeof(XamlControlsResources), new PropertyMetadata(false));
public static DependencyProperty UseCompactResourcesProperty { get; } =
DependencyProperty.Register(nameof(UseCompactResources), typeof(bool), typeof(XamlControlsResources), new PropertyMetadata(false));

[NotImplemented]
public ControlsResourcesVersion ControlsResourcesVersion
{
get => (ControlsResourcesVersion)GetValue(ControlsResourcesVersionProperty);
set => SetValue(ControlsResourcesVersionProperty, value);
}

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

0 comments on commit 65fe529

Please sign in to comment.