Share via


LinedFlowLayout.LineHeight 屬性

定義

取得或設定行固定高度。

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

屬性值

Double

double

所有行的通用高度,因此是所有專案的高度。 預設值為 Double.NaN

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

範例

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

備註

設定此屬性可指定配置中所有線條的明確高度值。

使用預設 的 Double.NaN 值時,會 LinedFlowLayout 使用位於索引 0 的專案) 所需的高度 (UIElement.DesiredSize.Height 做為後援值。 這表示集合中的第一個項目會決定所有線條的高度。

例如,在影像集合中,如果第一個 影像 的自然所需大小是 250 x 150 像素,則所有線條都會高 150 像素, 而 ActualLineHeight 屬性會傳回 150。 除了第一個影像之外,可能會根據其 Stretch 屬性) 擴充或縮小 (,以符合 ActualLineHeight 150。

適用於

另請參閱