In This Article

BarSizeSelectionMenuGallery Class

Represents a size selection gallery control, for use within a menu.

public class BarSizeSelectionMenuGallery : BarMenuGallery, IDragResizableControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl Selector BarGalleryBase BarMenuGallery object
Implements:
IDragResizableControl

Constructors

BarSizeSelectionMenuGallery()

Initializes an instance of the class.

public BarSizeSelectionMenuGallery()

Properties

ColumnCount

The number of columns.

public int ColumnCount { get; set; }

Property Value

int:

The default value is 10.

DefaultHeadingText

The default heading text that is displayed above the menu gallery.

[Localizability(LocalizationCategory.Title)]
public string? DefaultHeadingText { get; set; }

Property Value

string

HeadingText

The current heading text that is displayed above the menu gallery.

public string? HeadingText { get; }

Property Value

string

RowCount

The number of rows.

public int RowCount { get; set; }

Property Value

int:

The default value is 8.

SizeHeadingTextFormat

The format string to use for the heading when the end user is selecting a size in the gallery.

[Localizability(LocalizationCategory.Title)]
public string? SizeHeadingTextFormat { get; set; }

Property Value

string

Remarks

The first parameter to the format string is the current width. The second parameter to the format string is the current height.

Methods

CreateItem(int, int)

Creates an item to represent the specified row and column indices.

protected virtual object CreateItem(int rowIndex, int columnIndex)
Parameter Type Description
rowIndex int

The zero-based row index.

columnIndex int

The zero-based column index.

Returns

object:

The item that was created, which by default is a System.Windows.Size with one-based values.

OnHighlightedItemChanged(RoutedEventArgs)

Occurs after the HighlightedItem property has changed.

protected override void OnHighlightedItemChanged(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The event data.

Fields

ColumnCountProperty

Defines the ColumnCount property.

public static readonly DependencyProperty ColumnCountProperty

DefaultHeadingTextProperty

Defines the DefaultHeadingText property.

public static readonly DependencyProperty DefaultHeadingTextProperty

HeadingTextProperty

Defines the HeadingText property.

public static readonly DependencyProperty HeadingTextProperty

RowCountProperty

Defines the RowCount property.

public static readonly DependencyProperty RowCountProperty

SizeHeadingTextFormatProperty

Defines the SizeHeadingTextFormat property.

public static readonly DependencyProperty SizeHeadingTextFormatProperty

Inherited Members

Extension Methods