Path.Data 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
그릴 셰이프를 Geometry 지정하는 값을 가져오거나 설정합니다.
public:
property System::Windows::Media::Geometry ^ Data { System::Windows::Media::Geometry ^ get(); void set(System::Windows::Media::Geometry ^ value); };
public System.Windows.Media.Geometry Data { get; set; }
member this.Data : System.Windows.Media.Geometry with get, set
Public Property Data As Geometry
속성 값
그릴 셰이프에 대한 설명입니다.
예제
다음 예제에서는 코드를 사용하여 요소를 만들고 Path 속성을 설정하는 Data 방법을 보여 있습니다.
//Add the Path Element
myPath = gcnew Path();
myPath->Stroke = Brushes::Black;
myPath->Fill = Brushes::MediumSlateBlue;
myPath->StrokeThickness = 4;
myPath->HorizontalAlignment = HorizontalAlignment::Left;
myPath->VerticalAlignment = VerticalAlignment::Center;
EllipseGeometry^ myEllipseGeometry = gcnew EllipseGeometry();
myEllipseGeometry->Center = Point(50, 50);
myEllipseGeometry->RadiusX = 25;
myEllipseGeometry->RadiusY = 25;
myPath->Data = myEllipseGeometry;
myGrid->Children->Add(myPath);
//Add the Path Element
myPath = new Path();
myPath.Stroke = System.Windows.Media.Brushes.Black;
myPath.Fill = System.Windows.Media.Brushes.MediumSlateBlue;
myPath.StrokeThickness = 4;
myPath.HorizontalAlignment = HorizontalAlignment.Left;
myPath.VerticalAlignment = VerticalAlignment.Center;
EllipseGeometry myEllipseGeometry = new EllipseGeometry();
myEllipseGeometry.Center = new System.Windows.Point(50,50);
myEllipseGeometry.RadiusX = 25;
myEllipseGeometry.RadiusY = 25;
myPath.Data = myEllipseGeometry;
myGrid.Children.Add(myPath);
' Add a Path Element
Dim myPath As New Path()
myPath.Stroke = Brushes.Black
myPath.Fill = Brushes.MediumSlateBlue
myPath.StrokeThickness = 4
myPath.HorizontalAlignment = HorizontalAlignment.Left
myPath.VerticalAlignment = VerticalAlignment.Center
Dim myEllipseGeometry As New EllipseGeometry()
myEllipseGeometry.Center = New System.Windows.Point(50, 50)
myEllipseGeometry.RadiusX = 25
myEllipseGeometry.RadiusY = 25
myPath.Data = myEllipseGeometry
myGrid.Children.Add(myPath)
설명
간단한 셰이프를 그리려면 , LineGeometry및 RectangleGeometry 개체를 EllipseGeometry사용합니다. 곡선, 호 또는 복합 셰이프를 그리려면 개체를 PathGeometry 사용합니다. 복합 기하 도형을 만들려면 .를 GeometryGroup사용합니다. 기하 도형을 결합하려면 .를 CombinedGeometry사용합니다.
XAML 속성 요소 사용
<Path>
<Path.Data>
singleGeometry
</Path.Data>
</Path>
XAML 특성 사용
<object Data="moveAndDrawCommands"/>
XAML 값
singleGeometry 에서 Geometry파생되는 단일 개체 요소입니다. 다음 중 하나가 될 수 있습니다.
단순 기하 도형 EllipseGeometryLineGeometry중 하나 또는 RectangleGeometry.
다른 기하 도형을 자식 요소로 지원하는 단일 GeometryGroup입니다. 에 대한 XAML 값 섹션을 GeometryGroup참조하세요.
- PathGeometry그림과 세그먼트의 경로 기하 도형 개체 모델을 설정하는 자식 개체 요소를 지원합니다. 에 대한 XAML 값 섹션을 PathGeometry참조하세요.
moveAndDrawCommands 하나 이상의 이동 및 그리기 명령. 전체 구문은 경로 태그 구문을 참조하세요.
종속성 속성 정보
| Item | 가치 |
|---|---|
| 식별자 필드 | DataProperty |
메타데이터 속성이 다음으로 설정됩니다. true |
AffectsRender, AffectsMeasure |