FigureLength 생성자

정의

의 새 인스턴스를 FigureLength초기화합니다.

오버로드

Name Description
FigureLength(Double)

지정된 수의 픽셀 길이를 FigureLength 사용하여 클래스의 새 인스턴스를 초기화합니다.

FigureLength(Double, FigureUnitType)

지정된 클래스와 .를 사용하여 클래스의 FigureLength 새 인스턴스를 Value 초기화합니다 FigureUnitType.

FigureLength(Double)

지정된 수의 픽셀 길이를 FigureLength 사용하여 클래스의 새 인스턴스를 초기화합니다.

public:
 FigureLength(double pixels);
public FigureLength(double pixels);
new System.Windows.FigureLength : double -> System.Windows.FigureLength
Public Sub New (pixels As Double)

매개 변수

pixels
Double

길이를 구성하는 디바이스 독립적 픽셀(인치당 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>

다음은 .의 수를 줄이는 Width 데 사용되는 코드입니다 Figure.

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);
            }
        }
    }
}

적용 대상

FigureLength(Double, FigureUnitType)

지정된 클래스와 .를 사용하여 클래스의 FigureLength 새 인스턴스를 Value 초기화합니다 FigureUnitType.

public:
 FigureLength(double value, System::Windows::FigureUnitType type);
public FigureLength(double value, System.Windows.FigureUnitType type);
new System.Windows.FigureLength : double * System.Windows.FigureUnitType -> System.Windows.FigureLength
Public Sub New (value As Double, type As FigureUnitType)

매개 변수

value
Double

Value 클래스의 FigureLength

type
FigureUnitType

Value 클래스의 FigureUnitType

예제

다음 예제에서는 사용자가 클릭할 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>

다음은 .의 수를 줄이는 Width 데 사용되는 코드입니다 Figure.

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);
            }
        }
    }
}

적용 대상