Show / Hide Table of Contents

Class StyleExtension

Defines a MarkupExtension to provide a Style based on the given StyleResourceKey.

Inheritance
object
MarkupExtension
WpfResourceMarkupExtensionBase<Style, StyleResourceKey>
StyleExtension
WpfResourceMarkupExtensionBase<Style, StyleResourceKey>.ProvideValue(IServiceProvider)
MarkupExtension.ProvideValue(IServiceProvider)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Controls.Markup
Assembly: Sartorius.SAF.Presentation.Controls.dll
Syntax
public class StyleExtension : WpfResourceMarkupExtensionBase<Style, StyleResourceKey>
Examples

This example illustrates how to use the StyleExtension for a ListBox with ListBoxItem that should have a selection indication

<ListBox Grid.Row="6" Grid.Column="1" Style="{SAF:Style ListBox}"
         Background="{SAF:Brush Background01}" SelectionMode="Extended"
         ItemContainerStyle="{SAF:Style ListBoxItem}" Grid.ColumnSpan="2" Margin="20,0,0,0">
    <ListBoxItem>Item 1</ListBoxItem>
    <ListBoxItem>Item 2</ListBoxItem>
    <ListBoxItem IsEnabled="False">Item 3</ListBoxItem>
</ListBox>

Constructors

View Source

StyleExtension(StyleResourceKey)

Creates a new instance of the StyleExtension class.

Declaration
public StyleExtension(StyleResourceKey resourceKey)
Parameters
Type Name Description
StyleResourceKey resourceKey

The resource key.

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX