VariableSizedWrapGrid.ItemWidth VariableSizedWrapGrid.ItemWidth VariableSizedWrapGrid.ItemWidth VariableSizedWrapGrid.ItemWidth Property

Definition

Gets or sets the width of the layout area for each item that is contained in a VariableSizedWrapGrid.

public : double ItemWidth { get; set; }
double ItemWidth();

void ItemWidth(double itemwidth);
public double ItemWidth { get; set; }
Public ReadWrite Property ItemWidth As double
<VariableSizedWrapGrid ItemWidth="double" />
-or-
<VariableSizedWrapGrid ItemWidth="Auto" />

Property Value

double double

The width of the layout area for each item that is contained in a VariableSizedWrapGrid. The default is Double.NaN, which results in the "Auto" layout behavior.

Remarks

"Auto" layout and Double.NaN

The default value of ItemHeight and ItemWidth is not 0, it is Double.NaN. ItemHeight and ItemWidth support the ability to be an unset "Auto" value. Because ItemHeight and ItemWidth are Double values, Double.NaN is used as a special value to represent this "Auto" behavior. The layout system interprets the "Auto" value to generally mean that the object should be sized to the available size in layout, instead of to a specific pixel value. If you want the "Auto" behavior for an object when it is used in layout, leave ItemHeight and ItemWidth unset at their Double.NaN default value. If you have previously set values and want to reenable the "Auto" behavior with run-time code, set to Double.NaN. In XAML such as templates, you can set attribute values using the string "Auto".

Note

Visual C++ component extensions (C++/CX) doesn't have a constant for NaN, it uses a value, which appears as "-1.#IND" followed by zeros.

See also