FigureLength 구조체
정의
public value class FigureLength : IEquatable<System::Windows::FigureLength>
[System.ComponentModel.TypeConverter(typeof(System.Windows.FigureLengthConverter))]
public struct FigureLength : IEquatable<System.Windows.FigureLength>
[<System.ComponentModel.TypeConverter(typeof(System.Windows.FigureLengthConverter))>]
type FigureLength = struct
Public Structure FigureLength
Implements IEquatable(Of FigureLength)
- 상속
- 특성
- 구현
예제
다음 예제에서는 사용자가 클릭할 때에 Figure는 Width 의 Figure 감소 합니다.In the following example, when the user clicks on the Figure, the Width of the Figure decreases. 다음은 샘플에 대 한 XAML입니다.Below is the XAML for the sample.
<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.Below is the code used to decrease the Width of the 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);
}
}
}
}
설명
XAML 특성 사용XAML Attribute Usage
<object property="length"/>
또는-or-
<object property="qualifiedDouble"/>
XAML 값XAML Values
lengthlength
너비 또는 높이 Figure 으로 설명 된 픽셀에서을 Double 값입니다.The width or height of the Figure in pixels, described as a Double value. 단위 선언 문자열을 사용 하 여이 값을 정규화 할 수 있습니다 또는 (px
, in
를 cm
를 pt
) 참조 하십시오 도 아래.Alternatively, this value can be qualified with a unit declaration string (px
, in
, cm
, pt
) see qualifiedDouble below.
qualifiedDoublequalifiedDouble
위에 설명 된 double 값으로,,, px
in
cm
등의 단위 선언 문자열 중 하나가 pt
옵니다.A double value as described above followed by one of the following unit declaration strings: px
, in
, cm
, pt
.
px
(기본값) 디바이스 독립적 단위(단위당 1/96인치)device-independent units (1/96th inch per unit)px
(default) is 디바이스 독립적 단위(단위당 1/96인치)device-independent units (1/96th inch per unit)
in
인치; 1에서 96px = =in
is inches; 1in==96px
cm
센티미터; 1cm==(96/2.54) pxcm
is centimeters; 1cm==(96/2.54) px
pt
포인트; 1pt==(96/72) pxpt
is points; 1pt==(96/72) px
생성자
FigureLength(Double) |
길이에 지정된 수의 픽셀을 사용하여 FigureLength 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the FigureLength class with the specified number of pixels in length. |
FigureLength(Double, FigureUnitType) |
지정된 FigureLength 및 Value를 사용하여 FigureUnitType 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the FigureLength class with the specified Value and FigureUnitType. |
속성
FigureUnitType | |
IsAbsolute |
이 FigureLength에 절대값(픽셀)이 있는지 여부를 결정하는 값을 가져옵니다.Gets a value that determines whether this FigureLength holds an absolute value (in pixels). |
IsAuto |
이 FigureLength가 자동(지정되지 않음)인지 여부를 결정하는 값을 가져옵니다.Gets a value that determines whether this FigureLength is automatic (not specified). |
IsColumn |
이 FigureLength의 FigureUnitType 속성 값이 Column인지 여부를 결정하는 값을 가져옵니다.Gets a value that determines whether this FigureLength has a FigureUnitType property value of Column. |
IsContent |
이 FigureLength의 FigureUnitType 속성 값이 Content인지 여부를 결정하는 값을 가져옵니다.Gets a value that determines whether this FigureLength has a FigureUnitType property value of Content. |
IsPage |
이 FigureLength의 FigureUnitType 속성 값이 Page인지 여부를 결정하는 값을 가져옵니다.Gets a value that determines whether this FigureLength has a FigureUnitType property value of Page. |
Value |
이 FigureLength의 값을 가져옵니다.Gets the value of this FigureLength. |
메서드
Equals(FigureLength) |
두 FigureLength 구조체가 같은지 여부를 비교합니다.Compares two FigureLength structures for equality. |
Equals(Object) |
지정한 Object의 길이가 FigureLength이며 이 길이가 이 FigureLength와 같은지 여부를 결정합니다.Determines whether the specified Object is a FigureLength and whether it is identical to this FigureLength. |
GetHashCode() |
이 FigureLength의 해시 코드를 반환합니다.Returns the hash code for this FigureLength. |
ToString() |
이 String의 FigureLength 표현을 만듭니다.Creates a String representation of this FigureLength. |
연산자
Equality(FigureLength, FigureLength) |
두 FigureLength 구조체가 같은지 여부를 비교합니다.Compares two FigureLength structures for equality. |
Inequality(FigureLength, FigureLength) |
두 FigureLength 구조체가 다른지 여부를 비교합니다.Compares two FigureLength structures for inequality. |