FindResource(IResourceHost, Object) Method
Finds the specified resource by searching up the logical tree and then global styles.
Definition
Namespace: Avalonia.Controls
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Object? FindResource(
this IResourceHost control,
Object key
)
<ExtensionAttribute>
Public Shared Function FindResource (
control As IResourceHost,
key As Object
) As Object
[<ExtensionAttribute>]
static member FindResource :
control : IResourceHost *
key : Object -> Object
Parameters
- IResourceHost
- The control.
- Object
- The resource key.
Return Value
Object
The resource, or UnsetValue if not found.
Usage Note
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).
See Also
Reference
ResourceNodeExtensions Class
FindResource Overload
Avalonia.Controls Namespace