Прочетете на английски Редактиране

Споделяне чрез


RibbonControlLength Constructors

Definition

Initializes a new instance of the RibbonControlLength structure.

Overloads

RibbonControlLength(Double)

Initializes a new instance of the RibbonControlLength structure with an absolute value in pixels.

RibbonControlLength(Double, RibbonControlLengthUnitType)

Initializes a new instance of the RibbonControlLength structure with the specified value and length unit.

RibbonControlLength(Double)

Initializes a new instance of the RibbonControlLength structure with an absolute value in pixels.

C#
public RibbonControlLength(double pixels);

Parameters

pixels
Double

The absolute pixel value to initialize the length to.

Exceptions

pixels is NaN.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

RibbonControlLength(Double, RibbonControlLengthUnitType)

Initializes a new instance of the RibbonControlLength structure with the specified value and length unit.

C#
public RibbonControlLength(double value, System.Windows.Controls.Ribbon.RibbonControlLengthUnitType type);

Parameters

value
Double

The requested size of the element.

type
RibbonControlLengthUnitType

The type that is used to determine how the size of the element is calculated.

Exceptions

value is NaN.

-or-

type is Star and value is NegativeInfinity or PositiveInfinity.

-or-

type is not Auto, Pixel, Star, or Item.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10