LinedFlowLayout.LineHeight Property

Definition

Gets or sets the lines fixed height.

public:
 property double LineHeight { double get(); void set(double value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")]
double LineHeight();

void LineHeight(double value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")]
double LineHeight();

void LineHeight(double value);
public double LineHeight { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")]
public double LineHeight { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="LinedFlowLayout::s_defaultLineHeight")] set; }
var double = linedFlowLayout.lineHeight;
linedFlowLayout.lineHeight = double;
Public Property LineHeight As Double

Property Value

Double

double

The common height of all lines, and therefore of all items. The default is Double.NaN.

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Examples

<ItemsView ItemsSource="{x:Bind Photos}">
    <ItemsView.Layout>
        <LinedFlowLayout LineHeight="100"/>
    </ItemsView.Layout>
</ItemsView>

Remarks

Set this property to specify an explicit height value for all lines in the layout.

When the default Double.NaN value is used, the LinedFlowLayout uses the desired height (UIElement.DesiredSize.Height) of the item at index 0 as a fallback value. This means that the first item in the collection dictates how tall all lines are going to be.

In a collection of images, for example, if the natural desired size of the first Image is 250 x 150 pixels, all lines will be 150 pixels tall, and the ActualLineHeight property returns 150. Images, except the first one, may be expanded or shrunk (according to their Stretch property) to fit the ActualLineHeight of 150.

Applies to

See also