특정 줄 경로의 끝에 개체 (원)를 넣을 수있는 방법이 있는지 물어보고 싶습니다.WPF : 줄 경로/줄 끝에 개체/모양을 넣는 방법은 무엇입니까?
이 유사 :
--------------------------------------------O
Start End
지금, 나는 선을 추적하는 다음과 같은 코드가 있습니다
<Grid x:Name="LayoutRoot" >
<Path Stroke="Red" StrokeThickness="4" x:Name="path4" Data="{Binding MyProperty1}" >
<Path.StrokeDashArray>
<System:Double>500</System:Double>
<System:Double>1000</System:Double>
</Path.StrokeDashArray>
</Path>
</Grid>
어디에 내 경로의 데이터 (예 : M532,668 L523,695 361,663을 101,678 117,638)가 다릅니다.
내 애니메이션
<Storyboard x:Key="Story1" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
Storyboard.TargetName="path1"
Storyboard.TargetProperty="(Shape.StrokeDashOffset)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="500"/>
<SplineDoubleKeyFrame KeyTime="00:00:08" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
어떤 제안 ... 다음과 같습니다?
Path.Data의 'Data'에는 '데이터 포인트'만 포함됩니다. 경로와 함께 원/타원을 어떻게 만들 수 있습니까? – abramlimpin
Path.Data는 기하학입니다. 이것을 LineSegment와 ArcSegment 또는 LineGeometry와 EllipseGeometry를 포함하는 CombinedGeometry 또는 GeometryGroup으로 구성된 PathGeometry로 설정하십시오. – itowlson