BinaryRibbonGallery
A ribbon gallery: a strip of picture choices shown right on the ribbon, a row or two at a time, that opens into a full drop-down of every choice – Office's Styles, Table Styles and Themes galleries.
public partial class BinaryRibbonGallery : Selector, IBinaryRibbonComponent, IBinaryRibbonComponentAlwaysRenderLarge, IBinaryRibbonComponentActAsGallery, IBinaryRibbonKeyTipControl
Inherits from / implements: Selector, IBinaryRibbonComponent, IBinaryRibbonComponentAlwaysRenderLarge, IBinaryRibbonComponentActAsGallery, IBinaryRibbonKeyTipControl
Remarks
Use it where the choices are best judged by eye: page colours, chart styles, letterheads,
label layouts. It is a Selector, so Selector.SelectedItem,
Selector.SelectedIndex and Selector.SelectionChanged work as usual.
Choices
Add a BinaryRibbonThumbnailControl to ItemsControl.Items for each
choice, with its picture in BinaryRibbonThumbnailControl.ImageSource; the selected item
is then that thumbnail, and its FrameworkElement.Tag is a convenient place for the value
it stands for. A click on a thumbnail selects it, which closes the drop-down and any ribbon pop-up
the gallery is in.
On the ribbon and in the drop-down
On the ribbon the thumbnails are laid out Columns wide, each
ThumbnailSize wide and one, two or three to the ribbon's height depending on how tall
ThumbnailSize is, with buttons beside them to scroll a row up or down and a third to
open the drop-down. The drop-down shows every thumbnail, with HeaderContent above and
FooterContent below.
Inside a BinaryRibbonGroup, the group sets Columns itself as the
window narrows: to the numbers in the attached RenderableGalleryColumnsProperty, one
per step ("6,4,0" is six columns, then four, then none), or otherwise to 7, 5 and 3 in
the usual three steps. At none
the gallery collapses (IsCollapsed) to a single large button showing
LargeImage and TitleText, which opens the drop-down. In the simplified
ribbon layout a gallery is always collapsed to its button.
Live preview
As the pointer rests on a thumbnail the gallery raises
BinaryRibbonLivePreview.PreviewRequestedEvent, and when it leaves without choosing,
BinaryRibbonLivePreview.PreviewCancelledEvent; a choice raises
BinaryRibbonLivePreview.PreviewCommittedEvent. Handle them to show the effect in the
document before the user commits, as Office does. IsLivePreviewEnabled turns them
off.
Examples
A page colour gallery that previews each colour on the document as the pointer rests on it. The window keeps the colour in force before the preview so that it can put it back.
<ribbon:BinaryRibbonGroup TitleText="Page"
xmlns:ribbon="clr-namespace:Binarymission.WPF.Controls.Office;assembly=Binarymission.WPF.Controls.BinaryRibbon">
<ribbon:BinaryRibbonGallery x:Name="paperGallery"
TitleText="Page colour"
LargeImage="Images/PageColour32.png"
ThumbnailSize="48,48"
ribbon:BinaryRibbonGallery.RenderableGalleryColumns="6,4,0"
ribbon:BinaryRibbonGallery.Stretch="Uniform">
<ribbon:BinaryRibbonGallery.HeaderContent>
<TextBlock Text="Paper" Margin="6,4" FontWeight="SemiBold" />
</ribbon:BinaryRibbonGallery.HeaderContent>
<ribbon:BinaryRibbonThumbnailControl ImageSource="Images/Paper/White.png" Tag="#FFFFFF" ToolTip="White" />
<ribbon:BinaryRibbonThumbnailControl ImageSource="Images/Paper/Ivory.png" Tag="#FFFFF0" ToolTip="Ivory" />
<ribbon:BinaryRibbonThumbnailControl ImageSource="Images/Paper/Mint.png" Tag="#F0FFF4" ToolTip="Mint" />
<ribbon:BinaryRibbonThumbnailControl ImageSource="Images/Paper/Sky.png" Tag="#EEF6FF" ToolTip="Sky" />
</ribbon:BinaryRibbonGallery>
</ribbon:BinaryRibbonGroup>private Brush paperBeforePreview;
public MainWindow()
{
InitializeComponent();
// The events bubble, so handlers on the window would hear every gallery;
// these listen to the paper gallery alone.
BinaryRibbonLivePreview.AddPreviewRequestedHandler(paperGallery, (sender, e) =>
{
if (paperBeforePreview == null) paperBeforePreview = documentPage.Background;
documentPage.Background = PaperFor(e.Item);
});
BinaryRibbonLivePreview.AddPreviewCancelledHandler(paperGallery, (sender, e) =>
{
if (paperBeforePreview != null) documentPage.Background = paperBeforePreview;
paperBeforePreview = null;
});
BinaryRibbonLivePreview.AddPreviewCommittedHandler(paperGallery, (sender, e) =>
{
documentPage.Background = PaperFor(e.Item);
paperBeforePreview = null;
});
}
private static Brush PaperFor(object item)
{
var thumbnail = (BinaryRibbonThumbnailControl)item;
return (Brush)new BrushConverter().ConvertFromString((string)thumbnail.Tag);
}See also
Members at a glance
| Constructors | |
|---|---|
BinaryRibbonGallery | Creates a gallery with no thumbnails. |
| Properties | |
ActualColumns | Gets how many whole columns of thumbnails the ribbon view is showing now. |
BinaryRibbonTag | Gets or sets any object of your own to keep with the gallery. |
Columns | Gets or sets how many columns of thumbnails the gallery shows on the ribbon. |
DropDownColumns | Gets or sets how many columns of thumbnails the drop-down should show. |
DropDownMaximumSize | Gets or sets the largest the area of thumbnails in the drop-down may grow. |
DropDownWidth | Gets or sets a width for the drop-down. |
FooterContent | Gets or sets content shown at the foot of the drop-down, under the thumbnails – "More colours...", "Save current style...". |
FooterDataTemplate | Gets or sets the template that draws FooterContent when it is a data object rather than
a UI element. |
HeaderContent | Gets or sets content shown at the top of the drop-down, above the thumbnails – a heading such as "Built-in", or a filter. |
HeaderDataTemplate | Gets or sets the template that draws HeaderContent when it is a data object rather than
a UI element. |
IsCollapsed | Gets or sets whether the gallery is shown as a single button that opens its drop-down, instead of as thumbnails on the ribbon. |
IsDropDownOpen | Gets or sets whether the drop-down of every thumbnail is open. |
IsLivePreviewEnabled | Gets or sets whether the gallery raises the live preview events as the pointer moves over its thumbnails. |
IsVirtualizing | Gets or sets whether the gallery should create its thumbnails only as they come into view. |
LargeImage | Gets or sets the picture on the button the gallery becomes when it is collapsed. |
MouseOverItem | Gets the item the pointer is resting on, or null when it is on none. |
MouseOverThumbnail | Gets the thumbnail the pointer is resting on, or null when it is on none. |
ScrollAnimationDuration | Gets or sets how long the scroll by one row takes when the up and down buttons are used. |
ScrollViewer | Gets the scroll viewer that holds the thumbnails shown on the ribbon. |
ThumbnailSize | Gets or sets the size of each thumbnail cell, which decides how many columns fit and how many rows the ribbon shows. |
Thumbnails | Gets or sets an object to keep with the gallery's thumbnails. |
TitleText | Gets or sets the caption on the button the gallery becomes when it is collapsed – "Styles", "Page colour". |
VerticalScrollOffset | Gets or sets how far the thumbnails on the ribbon are scrolled down. |
| Methods | |
DropDownOpenChanged | Called when IsDropDownOpen changes. Does nothing here; override it to react to the
drop-down opening or closing. |
GetContainerForItemOverride | Creates the container for an item that is not a thumbnail: a new
BinaryRibbonThumbnailControl. |
GetRenderableGalleryColumns | Gets the column counts a gallery takes at each step of the ribbon's shrinking. |
GetStretch | Gets how the pictures of a gallery's thumbnails fill their cells. |
IsItemItsOwnContainerOverride | Reports whether an item is shown as it stands: true for a BinaryRibbonThumbnailControl. |
MeasureOverride | Measures the gallery with the thumbnails on the ribbon limited to Columns columns,
trimmed to a whole number of thumbnails. |
OnApplyTemplate | Finds the parts of the new template and lays the thumbnails out on the ribbon. |
OnColumnsChanged | Called when Columns changes; lays the gallery out again at once. |
OnItemsChanged | Rebuilds the thumbnails shown on the ribbon after the base handling of a change to the items. |
OnMouseLeave | Cancels any live preview when the pointer leaves the gallery, after the base handling of the event. |
OnMouseOverThumbnailPropertyChangedCallback | Called when MouseOverThumbnail changes; updates MouseOverItem, raises
MouseOverThumbnailChanged and asks for or cancels a live preview. |
OnPopupOpen | Called when the drop-down opens; places it over the gallery, or under the button when the gallery is collapsed, and sizes it to the gallery's columns. |
OnPreviewKeyDown | Cancels any live preview when Escape is pressed, after the base handling of the key. |
OnSelectionChanged | Closes the drop-down, raises BinaryRibbonLivePreview.PreviewCommittedEvent for the new
selection and scrolls it into view on the ribbon, after the base handling of the change. |
PrepareContainerForItemOverride | Prepares a thumbnail to show its item, sizing it to ThumbnailSize and the ribbon's rows
and giving it the gallery's StretchProperty. |
ScrollDown | Scrolls the thumbnails on the ribbon down by one row, with a short animation. |
ScrollUp | Scrolls the thumbnails on the ribbon up by one row, with a short animation. |
SetRenderableGalleryColumns | Sets the column counts a gallery takes at each step of the ribbon's shrinking. |
SetStretch | Sets how the pictures of a gallery's thumbnails fill their cells. |
| Events | |
MouseOverThumbnailChanged | Occurs when the pointer moves onto a thumbnail or off one. |
| Fields | |
ColumnsProperty | Identifies the Columns dependency property. |
DropDownColumnsProperty | Identifies the DropDownColumns dependency property. |
DropDownMaximumSizeProperty | Identifies the DropDownMaximumSize dependency property. |
DropDownWidthProperty | Identifies the DropDownWidth dependency property. |
FooterContentProperty | Identifies the FooterContent dependency property. |
FooterDataTemplateProperty | Identifies the FooterDataTemplate dependency property. |
HeaderContentProperty | Identifies the HeaderContent dependency property. |
HeaderDataTemplateProperty | Identifies the HeaderDataTemplate dependency property. |
IsCollapsedProperty | Identifies the IsCollapsed dependency property. |
IsDropDownOpenProperty | Identifies the IsDropDownOpen dependency property. |
IsLivePreviewEnabledProperty | Identifies the IsLivePreviewEnabled dependency property. |
IsVirtualizingProperty | Identifies the IsVirtualizing dependency property. |
LargeImageProperty | Identifies the LargeImage dependency property. |
MouseOverItemProperty | Identifies the MouseOverItem dependency property. |
MouseOverThumbnailChangedEvent | Identifies the MouseOverThumbnailChanged routed event. |
MouseOverThumbnailProperty | Identifies the MouseOverThumbnail dependency property. |
RenderableGalleryColumnsProperty | Identifies the RenderableGalleryColumns attached property: how many columns a gallery shows
at each step as its BinaryRibbonGroup gives up width. |
ScrollAnimationDurationProperty | Identifies the ScrollAnimationDuration dependency property. |
ScrollDownCommand | The command that scrolls the thumbnails on the ribbon down one row, as the gallery's down button does. |
ScrollUpCommand | The command that scrolls the thumbnails on the ribbon up one row, as the gallery's up button does. |
StretchProperty | Identifies the Stretch attached property: how the picture in each thumbnail fills its cell. |
ThumbnailSizeProperty | Identifies the ThumbnailSize dependency property. |
ThumbnailsProperty | Identifies the Thumbnails dependency property. |
TitleTextProperty | Identifies the TitleText dependency property. |
VerticalScrollOffsetProperty | Identifies the VerticalScrollOffset dependency property. |
Constructors
BinaryRibbonGallery
Creates a gallery with no thumbnails.
Remarks
Add BinaryRibbonThumbnailControl items to ItemsControl.Items, then put
the gallery in a BinaryRibbonGroup.
Properties
ActualColumns
Gets how many whole columns of thumbnails the ribbon view is showing now.
- Value
- The width the thumbnails take on the ribbon divided by the width of one thumbnail, rounded down.
Remarks
The drop-down opens this many thumbnails wide. Read it only once the gallery has been laid out;
before its template is applied it throws a NullReferenceException.
See also
BinaryRibbonTag
Gets or sets any object of your own to keep with the gallery.
- Value
- Any object. The default is
null.
Remarks
The ribbon never reads it. It is a plain property, not a dependency property, so it cannot be the
target of a binding or a style setter; use FrameworkElement.Tag for that.
Columns
Gets or sets how many columns of thumbnails the gallery shows on the ribbon.
- Value
- The number of columns. The default is 3.
Remarks
Inside a BinaryRibbonGroup the group sets this as the window widens and narrows,
from RenderableGalleryColumnsProperty when it is set, and replaces any value given
here. Use that attached property to control the column count of a gallery in a group.
See also
DropDownColumns
Gets or sets how many columns of thumbnails the drop-down should show.
- Value
- The number of columns, or 0 for the default. The default is 0.
Remarks
The value is stored but has no effect on the drop-down, which is as wide as
ActualColumns thumbnails when it opens.
DropDownMaximumSize
Gets or sets the largest the area of thumbnails in the drop-down may grow.
- Value
- The width and height in device-independent units (1/96 inch). The default is unlimited in both directions.
Remarks
It limits the thumbnails, not the header and footer content. It is applied each time the drop-down opens.
DropDownWidth
Gets or sets a width for the drop-down.
- Value
- The width in device-independent units (1/96 inch). The default is
NaN.
Remarks
The gallery's template does not use this value; the drop-down is sized to ActualColumns
thumbnails when it opens, within DropDownMaximumSize.
HeaderContent
Gets or sets content shown at the top of the drop-down, above the thumbnails – a heading such as "Built-in", or a filter.
- Value
- Any content: a UI element, or an object drawn by
HeaderDataTemplate. The default isnull, which shows nothing.
See also
HeaderDataTemplate
Gets or sets the template that draws HeaderContent when it is a data object rather than
a UI element.
- Value
- The template. The default is
null, which shows a data object as its text.
IsCollapsed
Gets or sets whether the gallery is shown as a single button that opens its drop-down, instead of as thumbnails on the ribbon.
- Value
truewhen collapsed. The default isfalse.
Remarks
Collapsed, the gallery is a large button showing LargeImage over
TitleText, and its drop-down opens below it rather than over it.
Inside a BinaryRibbonGroup the group sets this whenever it resizes – collapsing
the gallery at a step where it is given no columns – and replaces any value given here.
IsDropDownOpen
Gets or sets whether the drop-down of every thumbnail is open.
- Value
truewhile it is open. The default isfalse.
Remarks
Binds two-way by default. Setting it opens or closes the drop-down; choosing a thumbnail closes
it and sets this back to false.
IsLivePreviewEnabled
Gets or sets whether the gallery raises the live preview events as the pointer moves over its thumbnails.
- Value
trueto raiseBinaryRibbonLivePreview.PreviewRequestedEvent,BinaryRibbonLivePreview.PreviewCancelledEventandBinaryRibbonLivePreview.PreviewCommittedEvent. The default istrue.
Remarks
An unhandled event costs next to nothing, so there is no need to turn this off just because nothing listens. Turn it off for a gallery whose choices are slow to apply or cannot be undone, where showing each one in passing would do more harm than good.
IsVirtualizing
Gets or sets whether the gallery should create its thumbnails only as they come into view.
- Value
- The default is
false.
Remarks
The gallery does not read this property: every thumbnail is created whatever its value.
LargeImage
Gets or sets the picture on the button the gallery becomes when it is collapsed.
- Value
- The picture, drawn 32 x 32 device-independent units. The default is
null.
Remarks
Used when IsCollapsed is true; in the simplified ribbon layout it is
drawn small, beside TitleText.
MouseOverItem
Gets the item the pointer is resting on, or null when it is on none.
- Value
- The item from
ItemsControl.Itemsunder the pointer – theBinaryRibbonThumbnailControlitself when the thumbnails were added directly. The default isnull.
Remarks
It follows the pointer over the thumbnails on the ribbon and in the drop-down alike, and changes
with MouseOverThumbnail. It is the item each live preview request carries.
See also
MouseOverThumbnail
Gets the thumbnail the pointer is resting on, or null when it is on none.
- Value
- The thumbnail, as it is in
ItemsControl.Items(or the container made for an item) – the same object whether the pointer is over its copy on the ribbon or over it in the drop-down. The default isnull.
Remarks
Each change raises MouseOverThumbnailChanged.
See also
ScrollAnimationDuration
Gets or sets how long the scroll by one row takes when the up and down buttons are used.
- Value
- The duration in milliseconds. The default is 300.
Remarks
The scroll starts fast and slows to a stop. Set 0 for an instant jump.
ScrollViewer
Gets the scroll viewer that holds the thumbnails shown on the ribbon.
- Value
- The parent of the template's
PART_WrapPanelwhen that is aScrollViewer; otherwisenull.
Remarks
Read it only once the template has been applied; before then it throws a
NullReferenceException.
ThumbnailSize
Gets or sets the size of each thumbnail cell, which decides how many columns fit and how many rows the ribbon shows.
- Value
- The width and height in device-independent units (1/96 inch). The default is 48 x 48.
Remarks
The width is used as it is. The height chooses the number of rows on the ribbon, which then share the ribbon's height: 24 or less gives three rows, 48 or less two, anything taller one.
Set it before the thumbnails are added; it is applied to each thumbnail as it is laid out.
Example
<!-- Small swatches, three rows deep on the ribbon. -->
<ribbon:BinaryRibbonGallery ThumbnailSize="22,22" />Thumbnails
Gets or sets an object to keep with the gallery's thumbnails.
- Value
- Any object. The default is
null.
Remarks
The gallery does not read this property; its thumbnails are its ItemsControl.Items.
TitleText
Gets or sets the caption on the button the gallery becomes when it is collapsed – "Styles", "Page colour".
- Value
- The caption. The default is an empty string.
See also
VerticalScrollOffset
Gets or sets how far the thumbnails on the ribbon are scrolled down.
- Value
- The offset from the top, in device-independent units (1/96 inch). The default is 0.
Remarks
Setting it scrolls the ribbon view to that offset. ScrollUp and
ScrollDown animate it, and the animation holds it at its final value afterwards,
so once either has run a value set here does not take effect.
Methods
DropDownOpenChanged
Called when IsDropDownOpen changes. Does nothing here; override it to react to the
drop-down opening or closing.
Parameters
e- The old and new values.
GetContainerForItemOverride
Creates the container for an item that is not a thumbnail: a new
BinaryRibbonThumbnailControl.
Returns
A new BinaryRibbonThumbnailControl.
GetRenderableGalleryColumns static
Gets the column counts a gallery takes at each step of the ribbon's shrinking.
Parameters
obj- The gallery.
Returns
The column counts, or null when none have been set.
See also
GetStretch static
Gets how the pictures of a gallery's thumbnails fill their cells.
Parameters
obj- The gallery or thumbnail to read it from.
Returns
The stretch; None unless it has been set.
See also
IsItemItsOwnContainerOverride
Reports whether an item is shown as it stands: true for a BinaryRibbonThumbnailControl.
Parameters
item- The item.
Returns
true when item is a
BinaryRibbonThumbnailControl; otherwise false, and one is made to hold
it.
MeasureOverride
Measures the gallery with the thumbnails on the ribbon limited to Columns columns,
trimmed to a whole number of thumbnails.
Parameters
constraint- The space available.
Returns
The size the gallery wants.
OnApplyTemplate
Finds the parts of the new template and lays the thumbnails out on the ribbon.
Exceptions
System.ArgumentNullException- The template has no
PanelnamedPART_WrapPanel.
Remarks
The template must contain a Panel named PART_WrapPanel for the thumbnails
on the ribbon, an element named PART_ItemsPresenter for the drop-down, and a
BinaryRibbonDropDownButton named PART_PopupButton that opens it.
OnColumnsChanged
Called when Columns changes; lays the gallery out again at once.
Parameters
e- The old and new column counts.
OnItemsChanged
Rebuilds the thumbnails shown on the ribbon after the base handling of a change to the items.
Parameters
e- What changed in the items.
OnMouseLeave
Cancels any live preview when the pointer leaves the gallery, after the base handling of the event.
Parameters
e- The data for the event.
Remarks
The thumbnail the pointer was last over does not always report the pointer leaving it, so the gallery as a whole makes sure the document is put back.
OnMouseOverThumbnailPropertyChangedCallback
Called when MouseOverThumbnail changes; updates MouseOverItem, raises
MouseOverThumbnailChanged and asks for or cancels a live preview.
Parameters
e- The old and new thumbnail.
Remarks
Call the base method from an override, or the event and the live preview stop.
OnPopupOpen
Called when the drop-down opens; places it over the gallery, or under the button when the gallery is collapsed, and sizes it to the gallery's columns.
Parameters
sender- The drop-down button that opened.
e- The data for the event.
Remarks
Call the base method from an override, or the drop-down opens in the wrong place.
OnPreviewKeyDown
Cancels any live preview when Escape is pressed, after the base handling of the key.
Parameters
e- The data for the event.
Remarks
Escape is how a user backs out of a preview without choosing.
OnSelectionChanged
Closes the drop-down, raises BinaryRibbonLivePreview.PreviewCommittedEvent for the new
selection and scrolls it into view on the ribbon, after the base handling of the change.
Parameters
e- The items added to and removed from the selection.
Remarks
A selection made in code commits a live preview just as a click does.
PrepareContainerForItemOverride
Prepares a thumbnail to show its item, sizing it to ThumbnailSize and the ribbon's rows
and giving it the gallery's StretchProperty.
Parameters
element- The thumbnail.
item- The item it shows.
ScrollDown
Scrolls the thumbnails on the ribbon down by one row, with a short animation.
Remarks
The scroll snaps to whole rows, and lasts ScrollAnimationDuration. Past the last
row it does nothing visible.
Call it once the gallery has been loaded; before its template is applied it throws a
NullReferenceException.
See also
ScrollUp
Scrolls the thumbnails on the ribbon up by one row, with a short animation.
Remarks
The scroll snaps to whole rows, and lasts ScrollAnimationDuration. At the first
row it does nothing visible.
Call it once the gallery has been loaded; before its template is applied it throws a
NullReferenceException.
See also
SetRenderableGalleryColumns static
Sets the column counts a gallery takes at each step of the ribbon's shrinking.
Parameters
obj- The gallery.
value- The column counts, widest first; 0 collapses the gallery to a button.
See also
SetStretch static
Sets how the pictures of a gallery's thumbnails fill their cells.
Parameters
obj- The gallery, to set it for all its thumbnails.
value- The stretch.
See also
Events
MouseOverThumbnailChanged
Occurs when the pointer moves onto a thumbnail or off one.
Remarks
A bubbling routed event. Read MouseOverThumbnail or MouseOverItem in
the handler to see where the pointer is now; both are null when it has moved off.
For showing the effect of a choice in the document, the live preview events of
BinaryRibbonLivePreview are the better fit, because they also say when to put things
back and when the choice is final.
Fields
ColumnsProperty static
Identifies the Columns dependency property.
DropDownColumnsProperty static
Identifies the DropDownColumns dependency property.
DropDownMaximumSizeProperty static
Identifies the DropDownMaximumSize dependency property.
DropDownWidthProperty static
Identifies the DropDownWidth dependency property.
HeaderContentProperty static
Identifies the HeaderContent dependency property.
HeaderDataTemplateProperty static
Identifies the HeaderDataTemplate dependency property.
IsCollapsedProperty static
Identifies the IsCollapsed dependency property.
IsDropDownOpenProperty static
Identifies the IsDropDownOpen dependency property.
IsLivePreviewEnabledProperty static
Identifies the IsLivePreviewEnabled dependency property.
IsVirtualizingProperty static
Identifies the IsVirtualizing dependency property.
LargeImageProperty static
Identifies the LargeImage dependency property.
MouseOverItemProperty static
Identifies the MouseOverItem dependency property.
MouseOverThumbnailChangedEvent static
Identifies the MouseOverThumbnailChanged routed event.
MouseOverThumbnailProperty static
Identifies the MouseOverThumbnail dependency property.
RenderableGalleryColumnsProperty static
Identifies the RenderableGalleryColumns attached property: how many columns a gallery shows
at each step as its BinaryRibbonGroup gives up width.
Remarks
In XAML, write the counts as a comma-separated list, widest first:
ribbon:BinaryRibbonGallery.RenderableGalleryColumns="6,4,0" shows six columns while there is
room, four at the next step and, at the third, collapses the gallery to a button that opens the
drop-down. Past the last number the last one is kept. Without it, the group uses 7, 5 and 3 in the usual three steps.
Setting it on a gallery also sets Columns to the first number straight away.
ScrollAnimationDurationProperty static
Identifies the ScrollAnimationDuration dependency property.
ScrollDownCommand static
The command that scrolls the thumbnails on the ribbon down one row, as the gallery's down button does.
Remarks
Every gallery handles it by calling ScrollDown. A control outside the gallery that uses
it must name the gallery as its command target.
ScrollUpCommand static
The command that scrolls the thumbnails on the ribbon up one row, as the gallery's up button does.
Remarks
Every gallery handles it by calling ScrollUp. A control outside the gallery that uses
it must name the gallery as its command target.
StretchProperty static
Identifies the Stretch attached property: how the picture in each thumbnail fills its cell.
Remarks
ThumbnailSizeProperty static
Identifies the ThumbnailSize dependency property.
ThumbnailsProperty static
Identifies the Thumbnails dependency property.
TitleTextProperty static
Identifies the TitleText dependency property.
VerticalScrollOffsetProperty static
Identifies the VerticalScrollOffset dependency property.