FigureLength 생성자

정의

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

오버로드

FigureLength(Double)

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

FigureLength(Double, FigureUnitType)

지정된 FigureLengthValue를 사용하여 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>

다음은 감소 하는 데 코드를 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);
            }
        }
    }
}

적용 대상

FigureLength(Double, FigureUnitType)

지정된 FigureLengthValue를 사용하여 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>

다음은 감소 하는 데 코드를 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);
            }
        }
    }
}

적용 대상