Compartilhar via


LinedFlowLayout.LineHeight Propriedade

Definição

Obtém ou define a altura fixa das linhas.

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

Valor da propriedade

Double

double

A altura comum de todas as linhas e, portanto, de todos os itens. O padrão é Double.NaN.

Atributos
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Exemplos

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

Comentários

Defina essa propriedade para especificar um valor de altura explícito para todas as linhas no layout.

Quando o valor double.nan padrão é usado, o LinedFlowLayout usa a altura desejada (UIElement.DesiredSize.Height) do item no índice 0 como um valor de fallback. Isso significa que o primeiro item da coleção determina a altura de todas as linhas.

Em uma coleção de imagens, por exemplo, se o tamanho natural desejado da primeira Imagem for de 250 x 150 pixels, todas as linhas terão 150 pixels de altura e a propriedade ActualLineHeight retornará 150. As imagens, exceto a primeira, podem ser expandidas ou reduzidas (de acordo com sua propriedade Stretch ) para caber no ActualLineHeight de 150.

Aplica-se a

Confira também