add NavigationWindow style
This commit is contained in:
1 parent
955894e265
commit
2544e84223
24 files changed
+293
-10
No files matched your search
@@ -7,6 +7,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Windows.Navigation;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
|
||||
@@ -66,6 +67,15 @@ namespace HandyControl.Tools
|
||||
FrameworkElement.StyleProperty.OverrideMetadata(typeof(System.Windows.Window), metadata);
|
||||
}
|
||||
|
||||
public void SetNavigationWindowDefaultStyle(object resourceKey = null)
|
||||
{
|
||||
var metadata = resourceKey == null
|
||||
? new FrameworkPropertyMetadata(Application.Current.FindResource(typeof(NavigationWindow)))
|
||||
: new FrameworkPropertyMetadata(Application.Current.FindResource(resourceKey));
|
||||
|
||||
FrameworkElement.StyleProperty.OverrideMetadata(typeof(NavigationWindow), metadata);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
#if netle40
|
||||
|
||||
Reference in new issue
Block a user