Bagikan melalui


LinedFlowLayout.LineHeight Properti

Definisi

Mendapatkan atau mengatur tinggi tetap garis.

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

Nilai Properti

Double

double

Tinggi umum semua baris, dan oleh karena itu dari semua item. Default adalah Double.NaN.

Atribut
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Contoh

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

Keterangan

Atur properti ini untuk menentukan nilai tinggi eksplisit untuk semua baris dalam tata letak.

Saat nilai Double.NaN default digunakan, LinedFlowLayout menggunakan tinggi item yang diinginkan (UIElement.DesiredSize.Height) pada indeks 0 sebagai nilai fallback. Ini berarti bahwa item pertama dalam koleksi menentukan seberapa tinggi semua baris akan menjadi.

Dalam kumpulan gambar, misalnya, jika ukuran alami yang diinginkan dari Gambar pertama adalah 250 x 150 piksel, semua garis akan menjadi tinggi 150 piksel, dan properti ActualLineHeight mengembalikan 150. Gambar, kecuali yang pertama, dapat diperluas atau diciutkan (sesuai dengan properti Stretch mereka) agar sesuai dengan ActualLineHeight 150.

Berlaku untuk

Lihat juga