Class ResourceProvider
Resource manager to handle theme resources in UserControls scenario.
Inheritance
Namespace: Telerik.Windows.Controls.MarkupExtensions
Assembly: Telerik.Windows.Controls.dll
Syntax
public class ResourceProvider : FrameworkElement, IThemable, IResourceProvider
Constructors
ResourceProvider()
Fields
DictionaryProperty
Identifies the Dictionary property.
Declaration
public static readonly DependencyProperty DictionaryProperty
Field Value
System.Windows.DependencyProperty
|
Properties
Dictionary
Gets or sets the ResourceDictionary that is to be used by the ResourceProviderMarkupExtension.
Declaration
public ResourceDictionary Dictionary { get; set; }
Property Value
System.Windows.ResourceDictionary
|
Methods
GetResource(String, Object, Type)
Gets a resource by key from the Dictionary of the ResourceProvider instance.
Declaration
public virtual object GetResource(string resourceKey, object targetProperty = null, Type targetType = null)
Parameters
System.String
resourceKey
The name of the resource. |
System.Object
targetProperty
The DependencyProperty that the resource is to be set. |
System.Type
targetType
The type of the owner of the property. |
Returns
System.Object
The found value, or the default value for the property if targetProperty and targetType are present, or null. |
Implements
OnInitialized(EventArgs)
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
|
ResetTheme()
Resets the theme in StyleManager scenario.
Declaration
public void ResetTheme()
SetDefaultStyleKey()
Sets the default style key for StyleManager based on the current theme.
Declaration
protected virtual void SetDefaultStyleKey()