DrawingAttributes.Width 속성

정의

Stroke를 그리는 데 사용된 스타일러스의 너비를 가져오거나 설정합니다.

public:
 property double Width { double get(); void set(double value); };
public double Width { get; set; }
member this.Width : double with get, set
Public Property Width As Double

속성 값

Stroke를 그리는 데 사용된 스타일러스의 너비입니다.

예외

Width 속성이 Epsilon 또는 NaN보다 작은 경우

예제

다음 예제에서는 설정 하는 방법에 설명 합니다 Width 속성입니다. 가정 애플리케이션에 InkCanvas 호출 inkCanvas1, 두 개의 DrawingAttributes 라는 개체 inkDAhighlighterDA합니다. 전체 예제를 참조 하세요.를 DrawingAttributes 클래스 개요입니다.

// Set up the DrawingAttributes for the pen.
inkDA = new DrawingAttributes();
inkDA.Color = Colors.SpringGreen;
inkDA.Height = 5;
inkDA.Width = 5;
inkDA.FitToCurve = false;
inkDA.StylusTipTransform = new Matrix(1, 0, 0, 5, 0, 0);

// Set up the DrawingAttributes for the highlighter.
highlighterDA = new DrawingAttributes();
highlighterDA.Color = Colors.Orchid;
highlighterDA.IsHighlighter = true;
highlighterDA.IgnorePressure = true;
highlighterDA.StylusTip = StylusTip.Rectangle;
highlighterDA.Height = 30;
highlighterDA.Width = 10;

inkCanvas1.DefaultDrawingAttributes = inkDA;
' Set up the DrawingAttributes for the pen.
inkDA = New Ink.DrawingAttributes()
With inkDA
    .Color = Colors.SpringGreen
    .Height = 5
    .Width = 5
    .FitToCurve = True
    .StylusTipTransform = New Matrix(1, 0, 0, 1, 20, 0)
End With

' Set up the DrawingAttributes for the highlighter.
highlighterDA = New Ink.DrawingAttributes()
With highlighterDA
    .Color = Colors.Orchid
    .IsHighlighter = True
    .IgnorePressure = True
    .StylusTip = StylusTip.Rectangle
    .Height = 30
    .Width = 10
End With

inkCanvas1.DefaultDrawingAttributes = inkDA

설명

다음 요소 높이 너비에 영향을 줄을 Stroke 렌더링 될 때, 있지만 값이 아니라는 Width 속성입니다.

설정 하는 경우는 Width 속성 0 디바이스 독립적 픽셀 (DIP)를 2 DIP로 변경 됩니다.

XAML 텍스트 사용

이 속성 XAML에서 일반적으로 사용 되지 않습니다.

적용 대상