Class UISettings
Implements functionality for Storing and Restoring UISettings.
Inheritance
System.Object
UISettings
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Settings
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public static class UISettings
Fields
View SourceHasUISettingsProperty
Dependency Property that indicates if a FrameWorkElement has UISettings.
Declaration
public static readonly DependencyProperty HasUISettingsProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty |
Properties
View SourceSettings
Gets or sets the Dictionary of settings.
Declaration
public static Dictionary<string, object> Settings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
SettingsKey
Gets the settings key which is used to save the UI Settings.
Declaration
public static string SettingsKey { get; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Value is "UISettings"
Views
Gets or sets the Views that have UISettings.
Declaration
public static List<WeakReference> Views { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.WeakReference> |
Methods
View SourceGetHasUISettings(FrameworkElement)
Getter for the HasUISettings Dependency Property.
Declaration
public static bool GetHasUISettings(FrameworkElement element)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.FrameworkElement | element | The FrameworkElement. |
Returns
Type | Description |
---|---|
System.Boolean |
HasUISettingsValue<T>(FrameworkElement)
Check whether the System.Windows.FrameworkElement element has settings for given T settings handler (behavior).
Declaration
public static bool HasUISettingsValue<T>(FrameworkElement element)
where T : IUIElementSettings
Parameters
Type | Name | Description |
---|---|---|
System.Windows.FrameworkElement | element | The FrameworkElement. |
Returns
Type | Description |
---|---|
System.Boolean | True if the element has settings, otherwise False. |
Type Parameters
Name | Description |
---|---|
T |
RestoreSettings(DependencyObject)
Restores the UI settings of the given DependencyObject.
Declaration
public static void RestoreSettings(DependencyObject uiParentElement)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | uiParentElement | A UI element. |
SetHasUISettings(FrameworkElement, Boolean)
Setter for the HasUISettings Dependency Property.
Declaration
public static void SetHasUISettings(FrameworkElement element, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.FrameworkElement | element | The FrameworkElement. |
System.Boolean | value | The value. |