Table of Contents

Class Proportion

Namespace
Myra.Graphics2D.UI
Assembly
Myra.dll

Defines how much space a row or column in a grid or stack panel should occupy.

public class Proportion
Inheritance
Proportion
Inherited Members

Constructors

Proportion()

Initializes a new instance of the Proportion class with the default type.

public Proportion()

Proportion(ProportionType)

Initializes a new instance of the Proportion class with the specified type.

public Proportion(ProportionType type)

Parameters

type ProportionType

The proportion type.

Proportion(ProportionType, float)

Initializes a new instance of the Proportion class with the specified type and value.

public Proportion(ProportionType type, float value)

Parameters

type ProportionType

The proportion type.

value float

The proportion value.

Fields

Auto

Gets a proportion configured for automatic sizing.

public static readonly Proportion Auto

Field Value

Proportion

Fill

Gets a proportion configured to fill remaining space.

public static readonly Proportion Fill

Field Value

Proportion

GridDefault

Gets the default proportion for grid layout.

public static readonly Proportion GridDefault

Field Value

Proportion

StackPanelDefault

Gets the default proportion for stack panel layout.

public static readonly Proportion StackPanelDefault

Field Value

Proportion

Properties

Type

Gets or sets the proportion type.

public ProportionType Type { get; set; }

Property Value

ProportionType

Value

Gets or sets the proportion value (meaning depends on the proportion type).

public float Value { get; set; }

Property Value

float

Methods

ToString()

Returns a string representation of the proportion.

public override string ToString()

Returns

string

A string representation of the proportion type and value.

Events

Changed

Occurs when the proportion has changed.

public event MyraEventHandler Changed

Event Type

MyraEventHandler