Styles.

TryGetResource(object, object?) Method

Summary

Tries to find a resource within the object.
Namespace
Avalonia.Styling
Containing Type
Styles

Syntax

public bool TryGetResource(object key, out object? value)

Parameters

Name Type Description
key object The resource key.
value object? When this method returns, contains the value associated with the specified key, if the key is found; otherwise, null.

Return Value

Type Description
bool True if the resource if found, otherwise false.