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 a new instance of the BarSizeSelectionMenuGallery class.

public BarSizeSelectionMenuGallery()

Properties

ColumnCount

Gets or sets the number of columns.

public int ColumnCount { get; set; }

Property Value

int:

The number of columns. The default value is 10.

DefaultHeadingText

Gets or sets the default heading text that is displayed above the menu gallery.

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

Property Value

string:

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

HeadingText

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

public string HeadingText { get; }

Property Value

string:

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

RowCount

Gets or sets the number of rows.

public int RowCount { get; set; }

Property Value

int:

The number of rows. The default value is 8.

SizeHeadingTextFormat

Gets or sets 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:

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

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 RoutedEventArgs that contains the event data.

Fields

ColumnCountProperty

Identifies the ColumnCount dependency property. This field is read-only.

public static readonly DependencyProperty ColumnCountProperty

DefaultHeadingTextProperty

Identifies the DefaultHeadingText dependency property. This field is read-only.

public static readonly DependencyProperty DefaultHeadingTextProperty

HeadingTextProperty

Identifies the HeadingText dependency property. This field is read-only.

public static readonly DependencyProperty HeadingTextProperty

RowCountProperty

Identifies the RowCount dependency property. This field is read-only.

public static readonly DependencyProperty RowCountProperty

SizeHeadingTextFormatProperty

Identifies the SizeHeadingTextFormat dependency property. This field is read-only.

public static readonly DependencyProperty SizeHeadingTextFormatProperty

Inherited Members