ItemsWrapGrid.ItemHeight ItemsWrapGrid.ItemHeight ItemsWrapGrid.ItemHeight ItemsWrapGrid.ItemHeight Property

Definition

Gets or sets the height of the layout area for each item that is contained in an ItemsWrapGrid.

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

void ItemHeight(double itemheight);
public double ItemHeight { get; set; }
Public ReadWrite Property ItemHeight As double
<ItemsWrapGrid ItemHeight="double" />

Property Value

double double

The height of the layout area for each item that is contained in an ItemsWrapGrid. 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