In This Article

SizeVariant Class

Defines a size to be applied to a target control within a Ribbon.

public class SizeVariant : VariantBase
Inheritance:
object VariantBase object

Constructors

SizeVariant()

Initializes a new instance of the SizeVariant class.

public SizeVariant()

SizeVariant(string, VariantSize)

Initializes a new instance of the SizeVariant class.

public SizeVariant(string targetKey, VariantSize size)
Parameter Type Description
targetKey string

The KeyProperty of the group which is the target of this definition.

size VariantSize

The size to be applied to VariantSizeProperty by this definition.

Properties

Size

Gets or sets the VariantSize to be applied to the target control's VariantSizeProperty by this definition.

public VariantSize Size { get; set; }

Property Value

VariantSize:

One of the VariantSize values. The default value is Small.

TargetKey

Gets or sets the string KeyProperty of the target control for this definition.

[Localizability(LocalizationCategory.NeverLocalize)]
public string TargetKey { get; set; }

Property Value

string:

A a string KeyProperty that identifies the target control.

Methods

CreateInstanceCore()

Creates a new instance of SizeVariant.

protected override Freezable CreateInstanceCore()

Returns

Freezable:

The new instance.

Fields

SizeProperty

Identifies the Size dependency property.

public static readonly DependencyProperty SizeProperty

TargetKeyProperty

Identifies the TargetKey dependency property.

public static readonly DependencyProperty TargetKeyProperty