HypernovaDesktop Components · docs
Binarymission
WPF › Ribbon › BinaryRibbonControlSizeCollection

BinaryRibbonControlSizeCollection

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Office

The sizes a ribbon command takes at each step as its group gives up width – the value of the attached BinaryRibbonBarPanel.ResizableSizeProperty.

public class BinaryRibbonControlSizeCollection : Collection<BinaryRibbonControlSize>

Inherits from / implements: Collection<BinaryRibbonControlSize>

Remarks

The first entry is the size while the group has all the room it wants, the next the size at the first step of shrinking, and so on; past the last entry the last size is kept. In XAML it is written as a comma-separated list of BinaryRibbonControlSize names, or their first letters: "Large,Medium,Small" or "L,M,S" ("0" stands for BinaryRibbonControlSize.Minimized). Write single letters without spaces after the commas; full names may have them.

Examples

<!-- Stays large for one step, then medium, then shows its picture only. -->
<ribbon:BinaryRibbonButton Content="New order" LargeImage="Images/NewOrder32.png" SmallImage="Images/NewOrder16.png"
                           ribbon:BinaryRibbonBarPanel.ResizableSize="L,L,M,S" />
var sizes = new BinaryRibbonControlSizeCollection
{
    BinaryRibbonControlSize.Large,
    BinaryRibbonControlSize.Medium,
    BinaryRibbonControlSize.Small
};
BinaryRibbonBarPanel.SetResizableSize(newOrderButton, sizes);

See also