ResourceNodeExtensionsFindResource(IResourceHost, ThemeVariant, Object) Method
Finds 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 Object? FindResource(
this IResourceHost control,
ThemeVariant? theme,
Object key
)
<ExtensionAttribute>
Public Shared Function FindResource (
control As IResourceHost,
theme As ThemeVariant,
key As Object
) As Object
[<ExtensionAttribute>]
static member FindResource :
control : IResourceHost *
theme : ThemeVariant *
key : Object -> Object
- control IResourceHost
- The control.
- theme ThemeVariant
- Theme used to select theme dictionary.
- key Object
- The resource key.
ObjectThe resource, or
UnsetValue if not found.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).