FigureUnitType 열거형

정의

FigureLength의 너비 또는 높이와 연관된 단위 형식을 설명합니다.

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

필드

Auto 0

FigureLength가 지정되어 있지 않은 경우, 제약 조건 없이 계산되는 Figure의 너비 또는 높이에 사용할 값을 만드는 기본값입니다. 참고: FigureUnitTypeAuto로 설정되면 FigureLengthValue 속성은 1로 설정됩니다.

Column 2

Figure의 너비 또는 높이 값은 Figure가 들어 있는 열 너비의 분수(1보다 큰 분수 포함)로 표시됩니다.

Content 3

Figure의 너비 또는 높이 값은 Figure 콘텐츠 너비의 분수(1보다 큰 분수 포함)로 표시됩니다. 참고: 참고: FigureUnitTypeContent로 설정하면 FigureLengthValue 속성은 01 사이의 값으로 설정해야 합니다.

Page 4

Figure의 너비 또는 높이 값은 Figure가 있는 페이지 너비의 분수(1보다 큰 분수 포함)로 표시됩니다. 참고: 참고: FigureUnitTypePage로 설정하면 FigureLengthValue 속성은 01 사이의 값으로 설정해야 합니다.

Pixel 1

Figure의 너비 또는 높이 값은 픽셀(인치 당 96픽셀)로 표시됩니다.

예제

다음 예제에서는 사용자가 클릭할 때에 FigureWidthFigure 감소 합니다. 다음은 샘플에 대 한 XAML입니다.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="SDKSample.FigureLengthExample" >

  <FlowDocumentReader>
    <FlowDocument >
      <Paragraph>
        Raw text inside the paragraph
        <Figure Name="myFigure" Width="300">
          <Paragraph FontStyle="Italic" MouseDown="OnMouseDownDecreaseWidth" >
            Text inside of paragraph that is inside Figure...
          </Paragraph>
        </Figure>
      </Paragraph>
    </FlowDocument>
  </FlowDocumentReader>



</Page>

줄이기 위해 사용 된 코드는 다음과 같습니다 합니다 WidthFigure 단위 유형을 지정 하는 픽셀을 사용 하 여 합니다.

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace SDKSample
{
    public partial class FigureLengthExample : Page
    {

        void OnMouseDownDecreaseWidth(object sender, MouseButtonEventArgs args)
        {
            FigureLength myFigureLength = myFigure.Width;
            double widthValue = myFigureLength.Value;
            if (widthValue > 0)
            {
                myFigure.Width = new FigureLength((widthValue - 10), FigureUnitType.Pixel);
            }
        }
    }
}

적용 대상