Class ResourceNodeExtensions
public static class ResourceNodeExtensions
- Inheritance
-
ResourceNodeExtensions
- Inherited Members
Methods
FindResource(IResourceHost, ThemeVariant?, object)
Finds the specified resource by searching up the logical tree and then global styles.
public static object? FindResource(this IResourceHost control, ThemeVariant? theme, object key)
Parameters
control
IResourceHostThe control.
theme
ThemeVariantTheme used to select theme dictionary.
key
objectThe resource key.
Returns
- object
The resource, or UnsetValue if not found.
FindResource(IResourceHost, object)
Finds the specified resource by searching up the logical tree and then global styles.
public static object? FindResource(this IResourceHost control, object key)
Parameters
control
IResourceHostThe control.
key
objectThe resource key.
Returns
- object
The resource, or UnsetValue if not found.
GetResourceObservable(IResourceHost, object, Func<object?, object?>?)
public static IObservable<object?> GetResourceObservable(this IResourceHost control, object key, Func<object?, object?>? converter = null)
Parameters
control
IResourceHostkey
objectconverter
Func<object, object>
Returns
GetResourceObservable(IResourceProvider, object, ThemeVariant?, Func<object?, object?>?)
public static IObservable<object?> GetResourceObservable(this IResourceProvider resourceProvider, object key, ThemeVariant? defaultThemeVariant, Func<object?, object?>? converter = null)
Parameters
resourceProvider
IResourceProviderkey
objectdefaultThemeVariant
ThemeVariantconverter
Func<object, object>
Returns
GetResourceObservable(IResourceProvider, object, Func<object?, object?>?)
public static IObservable<object?> GetResourceObservable(this IResourceProvider resourceProvider, object key, Func<object?, object?>? converter = null)
Parameters
resourceProvider
IResourceProviderkey
objectconverter
Func<object, object>
Returns
TryFindResource(IResourceHost, object, ThemeVariant?, out object?)
Tries to the specified resource by searching up the logical tree and then global styles.
public static bool TryFindResource(this IResourceHost control, object key, ThemeVariant? theme, out object? value)
Parameters
control
IResourceHostThe control.
key
objectThe resource key.
theme
ThemeVariantTheme used to select theme dictionary.
value
objectOn return, contains the resource if found, otherwise null.
Returns
- bool
True if the resource was found; otherwise false.
TryFindResource(IResourceHost, object, out object?)
Tries to the specified resource by searching up the logical tree and then global styles.
public static bool TryFindResource(this IResourceHost control, object key, out object? value)
Parameters
control
IResourceHostThe control.
key
objectThe resource key.
value
objectOn return, contains the resource if found, otherwise null.
Returns
- bool
True if the resource was found; otherwise false.
TryGetResource(IResourceHost, object, out object?)
Tries to find a resource within the object.
public static bool TryGetResource(this IResourceHost control, object key, out object? value)
Parameters
control
IResourceHostkey
objectThe resource key.
value
objectWhen this method returns, contains the value associated with the specified key, if the key is found; otherwise, null.
Returns
- bool
True if the resource if found, otherwise false.