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
typeProportionTypeThe 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
typeProportionTypeThe proportion type.
valuefloatThe proportion value.
Fields
Auto
Gets a proportion configured for automatic sizing.
public static readonly Proportion Auto
Field Value
Fill
Gets a proportion configured to fill remaining space.
public static readonly Proportion Fill
Field Value
GridDefault
Gets the default proportion for grid layout.
public static readonly Proportion GridDefault
Field Value
StackPanelDefault
Gets the default proportion for stack panel layout.
public static readonly Proportion StackPanelDefault
Field Value
Properties
Type
Gets or sets the proportion type.
public ProportionType Type { get; set; }
Property Value
Value
Gets or sets the proportion value (meaning depends on the proportion type).
public float Value { get; set; }
Property Value
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