StyleInclude Class
Definition
Includes a style from a URL.
public class StyleInclude
Remarks
If used from the XAML code, it is replaced with direct style reference. When used in runtime, this type might be unsafe with trimming and AOT.
Constructors
| Name | Description |
|---|---|
| StyleInclude (2 overloads) | Initializes a new instance of the Avalonia.Markup.Xaml.Styling.StyleInclude class. |
StyleInclude overloads
StyleInclude Constructor
Initializes a new instance of the Avalonia.Markup.Xaml.Styling.StyleInclude class.
public StyleInclude(IServiceProvider serviceProvider)
Parameters
serviceProvider IServiceProvider
The XAML service provider.
StyleInclude Constructor
Initializes a new instance of the Avalonia.Markup.Xaml.Styling.StyleInclude class.
public StyleInclude(Uri baseUri)
Parameters
baseUri Uri
The base URL for the XAML context.
Methods
| Name | Description |
|---|---|
| TryGetResource | No summary available. |
TryGetResource Method
public bool TryGetResource(object key, Avalonia.Styling.ThemeVariant theme, object& value)
Parameters
key object
theme Avalonia.Styling.ThemeVariant
value object&
Returns
bool
Properties
| Name | Description |
|---|---|
| Loaded | Gets the loaded style. |
| Owner | No summary available. |
| Source | Gets or sets the source URL. |
Loaded Property
Gets the loaded style.
public Avalonia.Styling.IStyle Loaded { get; set; }
Owner Property
public Avalonia.Controls.IResourceHost Owner { get; set; }
Source Property
Gets or sets the source URL.
public Uri Source { get; set; }