LineStackingStrategy 열거형

정의

각 줄에 대한 줄 상자가 결정되는 메커니즘을 설명합니다.

public enum class LineStackingStrategy
public enum LineStackingStrategy
type LineStackingStrategy = 
Public Enum LineStackingStrategy
상속
LineStackingStrategy

필드

BlockLineHeight 0

스택 높이는 블록 요소 줄 높이 속성 값에 의해 결정됩니다.

MaxHeight 1

스택 높이는 모든 인라인 요소가 제대로 정렬되어 있는 경우 해당 줄에 이러한 요소가 포함된 가장 작은 값입니다.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다 합니다 LineStackingStrategy 속성의 텍스트 줄의 줄 상자가 만들어지는 방법을 확인 하는 TextBlock합니다. 첫 번째 TextBlockLineStackingStrategy MaxHeight 나타내고 두 번째 값 TextBlock BlockLineHeight 값입니다.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel>
    
    <!-- This TextBlock has a LineStackingStrategy set to "MaxHeight". -->
    <TextBlock LineStackingStrategy="MaxHeight" LineHeight="10" Width="500" TextWrapping="Wrap" 
     Background="Yellow">
      Use the <Span FontSize="30">LineStackingStrategy</Span> property to determine how a line box is
      created for each line. A value of <Span FontSize="20">MaxHeight</Span> specifies that the stack
      height is the smallest value that contains all the inline elements on that line when those
      elements are properly aligned. A value of <Span FontSize="20">BlockLineHeight</Span> specifies
      that the stack height is determined by the block element LineHeight property value.
    </TextBlock>

    <!-- Here is the same TextBlock but the LineStackingStrategy is set to "BlockLineHeight". -->
    <TextBlock LineStackingStrategy="BlockLineHeight" LineHeight="10" Width="500" TextWrapping="Wrap" 
     Background="Blue" Margin="0,40,0,0">
      Use the <Span FontSize="30">LineStackingStrategy</Span> property to determine how a line box is
      created for each line. A value of <Span FontSize="20">MaxHeight</Span> specifies that the stack
      height is the smallest value that contains all the inline elements on that line when those
      elements are properly aligned. A value of <Span FontSize="20">BlockLineHeight</Span> specifies
      that the stack height is determined by the block element LineHeight property value.
    </TextBlock>

  </StackPanel>
</Page>

다음 그림에서는 위 코드의 결과 보여 줍니다.

스크린샷: LineStackingStrategy 값 비교

적용 대상