Reputation: 159
<Viewbox>
<Grid>
<Path Stroke="Black" StrokeThickness="2">
<Path.Data>
<PathGeometry>
<PathFigure x:Name="UpperCircle" StartPoint="0,150">
<ArcSegment IsLargeArc="True"
Size="50, 50"
Point="300, 150"
SweepDirection="Clockwise" />
</PathFigure>
<PathFigure x:Name="LeftLine"
StartPoint="{Binding StartPoint.X,ElementName=UpperCircle},150"
>
<LineSegment Point="50,280" />
</PathFigure>
</PathGeometry>
</Path.Data>
</Path>
</Grid>
</Viewbox>
Hi I want to bind LeftLine X VALUE from Start point of Upper Circle.I have tried using binding but it is not working?
Upvotes: 0
Views: 37
Reputation: 7727
{Binding}
is a markup extension, a special syntax in XAML. And StartPoint="{Binding StartPoint.X, ElementName=UpperCircle},150"
is not XAML-compliant.
Try this:
<PathFigure x:Name="LeftLine"
StartPoint="{Binding ElementName=UpperCircle,Path=StartPoint}"
>
<LineSegment Point="50,280" />
</PathFigure>
If you want to know about XAML syntax and Binding
, the following documents can help you:
Best regards.
Upvotes: 1