TryGetResource Method
Tries to find a resource within the object.
Definition
Namespace: Avalonia.Controls
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
bool TryGetResource(
Object key,
ThemeVariant? theme,
out Object?? value
)
Function TryGetResource (
key As Object,
theme As ThemeVariant,
<OutAttribute> ByRef value As Object
) As Boolean
abstract TryGetResource :
key : Object *
theme : ThemeVariant *
value : Object byref -> bool
Parameters
- Object
- The resource key.
- ThemeVariant
- Theme used to select theme dictionary.
- Object
- When this method returns, contains the value associated with the specified key, if the key is found; otherwise, null.
Return Value
Boolean
True if the resource if found, otherwise false.