Class ModuleIconExtension
Defines a MarkupExtension to provide a Style for a ContentControl representing an icon based on the given ModuleIconResourceKey or a ContentControl if the value is provided for the ContentProperty.
Inheritance
ModuleIconExtension
Namespace: Sartorius.SAF.Presentation.Controls.Markup
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class ModuleIconExtension : WpfResourceMarkupExtensionBase<Style, ModuleIconResourceKey>
Remarks
When using a Setter to set the icon you cannot set the icon to the ContentProperty of a ContentControl.
Examples
This example illustrates how to use the ModuleIconExtension to show an icon.
<ContentControl Style="{SAF:ModuleIcon Administration}" />
Constructors
View SourceModuleIconExtension(ModuleIconResourceKey)
Creates a new instance of the IconExtension class.
Declaration
public ModuleIconExtension(ModuleIconResourceKey resourceKey)
Parameters
| Type | Name | Description |
|---|---|---|
| ModuleIconResourceKey | resourceKey | The resource key. |
Methods
View SourceProvideValue(IServiceProvider)
When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
Declaration
public override object ProvideValue(IServiceProvider serviceProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceProvider | serviceProvider | A service provider helper that can provide services for the markup extension. |
Returns
| Type | Description |
|---|---|
| object | The object value to set on the property where the extension is applied. |