Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.37 KB

linedflowlayout_lineheight.md

File metadata and controls

41 lines (26 loc) · 1.37 KB
-api-id -api-type
P:Microsoft.UI.Xaml.Controls.LinedFlowLayout.LineHeight
winrt property

Microsoft.UI.Xaml.Controls.LinedFlowLayout.LineHeight

-description

Gets or sets the lines fixed height.

-property-value

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

-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.

-see-also

ActualLineHeight

-examples

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