C# Class MetroRadiance.UI.ThemeService

MetroRadiance テーマ機能を提供します。
Inheritance: INotifyPropertyChanged
Exibir arquivo Open project: Grabacr07/MetroRadiance

Public Methods

Method Description
ChangeAccent ( Accent accent ) : void
ChangeTheme ( Theme theme ) : void
Register ( Application app, Theme theme, Accent accent ) : IDisposable

テーマ機能を有効化します。テーマまたはアクセントが変更されたとき、app で指定した WPF アプリケーション内のテーマ関連リソースは自動的に書き換えられます。

Register ( System.Windows.ResourceDictionary rd ) : IDisposable

テーマまたはアクセントが変更されたときにリソースの書き換え対象とする ResourceDictionary を登録します。このメソッドは、登録解除に使用する IDisposable オブジェクトを返します。

Protected Methods

Method Description
RaisePropertyChanged ( [ propertyName = null ) : void

Private Methods

Method Description
ChangeAccentCore ( Accent accent ) : void
ChangeAccentCore ( Color color ) : void
ChangeAccentCore ( System.Windows.ResourceDictionary dic ) : void
ChangeThemeCore ( System.Platform theme ) : void
ChangeThemeCore ( Theme theme ) : void
CheckAccentResourceUri ( Uri uri ) : bool

指定した Uri がアクセント カラーのリソースを指す URI かどうかをチェックします。

CheckThemeResourceUri ( Uri uri ) : bool

指定した Uri がテーマのリソースを指す URI かどうかをチェックします。

CreateAccentResourceUri ( Accent accent ) : Uri
CreateThemeResourceUri ( Theme theme ) : Uri
EnumerateDictionaries ( System.Windows.ResourceDictionary dictionary ) : IEnumerable
GetAccentResource ( Accent accent ) : System.Windows.ResourceDictionary
GetAccentResource ( Color color ) : System.Windows.ResourceDictionary
GetThemeResource ( Theme theme ) : System.Windows.ResourceDictionary
Initialize ( Application app, Theme theme, Accent accent ) : void
InvokeOnUIDispatcher ( System.Action action, DispatcherPriority priority = DispatcherPriority.Normal ) : void
Register ( System.Windows.ResourceDictionary rd, Theme theme, Accent accent ) : IDisposable
ThemeService ( ) : System
UpdateListener ( Accent accent ) : void
UpdateListener ( Theme theme ) : void

Method Details

ChangeAccent() public method

public ChangeAccent ( Accent accent ) : void
accent Accent
return void

ChangeTheme() public method

public ChangeTheme ( Theme theme ) : void
theme Theme
return void

RaisePropertyChanged() protected method

protected RaisePropertyChanged ( [ propertyName = null ) : void
propertyName [
return void

Register() public method

テーマ機能を有効化します。テーマまたはアクセントが変更されたとき、app で指定した WPF アプリケーション内のテーマ関連リソースは自動的に書き換えられます。
public Register ( Application app, Theme theme, Accent accent ) : IDisposable
app System.Windows.Application テーマ関連リソースを含む WPF アプリケーション。
theme Theme 初期値として使用するテーマ。
accent Accent 初期値として使用するアクセント。
return IDisposable

Register() public method

テーマまたはアクセントが変更されたときにリソースの書き換え対象とする ResourceDictionary を登録します。このメソッドは、登録解除に使用する IDisposable オブジェクトを返します。
public Register ( System.Windows.ResourceDictionary rd ) : IDisposable
rd System.Windows.ResourceDictionary
return IDisposable