Class StaticResourceExtension
Class used to access elements inside the XAML code
Implements
IMarkupExtension<System.Object>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Markup
Assembly: OpenSilver.dll
Syntax
public class StaticResourceExtension : MarkupExtension, IMarkupExtension<object>
Constructors
| Improve this Doc View SourceStaticResourceExtension()
Initializes a new instance of StaticResource.
Declaration
public StaticResourceExtension()
StaticResourceExtension(String)
Initializes a new instance of StaticResource with the given ResourceKey.
Declaration
public StaticResourceExtension(string resourceKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceKey | The ResourceKey for the StaticResource |
Properties
| Improve this Doc View SourceResourceKey
The key of the StaticResource.
Declaration
public string ResourceKey { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceProvideValue(IServiceProvider)
returns an object that is provided as the value of the target property for this StaticResource.
Declaration
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
System.IServiceProvider | serviceProvider | A service provider helper that can provide services for the StaticResource. |
Returns
Type | Description |
---|---|
System.Object | An object that is provided as the value of the target property for this StaticResource. |