In This Article

BarGalleryItemTemplateSelector Class

Provides a DataTemplateSelector that selects item templates for various gallery item view models, generally used with a BarGalleryBase-based control and assigned to its ItemTemplateSelector property.

public class BarGalleryItemTemplateSelector : DataTemplateSelector
Inheritance:
object DataTemplateSelector object

Constructors

BarGalleryItemTemplateSelector()

Initializes a new instance of the BarGalleryItemTemplateSelector class.

public BarGalleryItemTemplateSelector()

Properties

ColorMenuItemTemplate

Gets or sets the DataTemplate to use for a ColorBarGalleryItemViewModel using a menu item appearance.

public DataTemplate ColorMenuItemTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

ColorTemplate

Gets or sets the DataTemplate to use for a ColorBarGalleryItemViewModel.

public DataTemplate ColorTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

DefaultTemplate

Gets or sets the DataTemplate to use for an IBarGalleryItemViewModel.

public DataTemplate DefaultTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

FontFamilyTemplate

Gets or sets the DataTemplate to use for a FontFamilyBarGalleryItemViewModel.

public DataTemplate FontFamilyTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

FontSizeTemplate

Gets or sets the DataTemplate to use for a FontSizeBarGalleryItemViewModel.

public DataTemplate FontSizeTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

MenuItemTemplate

Gets or sets the DataTemplate to use for an IBarGalleryItemViewModel using a menu item appearance.

public DataTemplate MenuItemTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

SizeSelectionTemplate

Gets or sets the DataTemplate to use for a System.Windows.Size.

public DataTemplate SizeSelectionTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

SymbolDataTemplate

Gets or sets the DataTemplate to use for a SymbolBarGalleryItemViewModel.

public DataTemplate SymbolDataTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

TextStyleTemplate

Gets or sets the DataTemplate to use for a TextStyleBarGalleryItemViewModel.

public DataTemplate TextStyleTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use.

Methods

SelectTemplate(object, DependencyObject)

When overridden in a derived class, returns a DataTemplate based on custom logic.

public override DataTemplate SelectTemplate(object item, DependencyObject container)
Parameter Type Description
item object

The data object for which to select the template.

container DependencyObject

The data-bound object.

Returns

DataTemplate:

Returns a DataTemplate or null. The default value is null.

Inherited Members