ResourceNodeExtensionsTryFindResource(IResourceHost, Object, Object) Method
Tries to the specified resource by searching up the logical tree and then global styles.
Namespace: Avalonia.ControlsAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static bool TryFindResource(
this IResourceHost control,
Object key,
out Object?? value
)
<ExtensionAttribute>
Public Shared Function TryFindResource (
control As IResourceHost,
key As Object,
<OutAttribute> ByRef value As Object
) As Boolean
[<ExtensionAttribute>]
static member TryFindResource :
control : IResourceHost *
key : Object *
value : Object byref -> bool
- control IResourceHost
- The control.
- key Object
- The resource key.
- value Object
- On return, contains the resource if found, otherwise null.
BooleanTrue if the resource was found; otherwise false.In Visual Basic and C#, you can call this method as an instance method on any object of type
IResourceHost. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).