IStyle Interface

Summary

Defines the interface for styles.
graph BT Type-.->Interface0["IResourceNode"] click Interface0 "/api/Avalonia.Controls/IResourceNode" Type-.->Interface1["IResourceProvider"] click Interface1 "/api/Avalonia.Controls/IResourceProvider" Type["IStyle"] class Type type-node Implementing0["Styles"]-.->Type click Implementing0 "/api/Avalonia.Styling/Styles" Implementing1["Style"]-.->Type click Implementing1 "/api/Avalonia.Styling/Style" Implementing2["StyleInclude"]-.->Type click Implementing2 "/api/Avalonia.Markup.Xaml.Styling/StyleInclude" Implementing3["DefaultTheme"]-.->Type click Implementing3 "/api/Avalonia.Themes.Default/DefaultTheme"

Syntax

public interface IStyle : IResourceNode, IResourceProvider

Methods

Name Value Summary
Attach(IStyleable, IStyleHost) bool
Attaches the style to a control if the style's selector matches.
Detach() void

Extension Methods

Name Value Summary
FindResource(object) object
Finds the specified resource by searching up the logical tree and then global styles.
GetResourceObservable(object) IObservable<object>
TryFindResource(object, object) bool
Tries to the specified resource by searching up the logical tree and then global styles.