forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support ThemeResource in TargetNullValue and FallbackValue
- Loading branch information
1 parent
56f15f5
commit 7514964
Showing
5 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.ComponentModel; | ||
using Microsoft.UI.Xaml.Data; | ||
|
||
namespace Uno.UI.Helpers.Xaml; | ||
|
||
public static class BindingExtensions | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public static Binding ApplyTargetNullValueThemeResource(this Binding binding, string themeResourceName, object parseContext) | ||
{ | ||
binding.TargetNullValueThemeResource = themeResourceName; | ||
binding.ParseContext = parseContext; | ||
return binding; | ||
} | ||
|
||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
public static Binding ApplyFallbackValueThemeResource(this Binding binding, string themeResourceName, object parseContext) | ||
{ | ||
binding.FallbackValueThemeResource = themeResourceName; | ||
binding.ParseContext = parseContext; | ||
return binding; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters