Как привязать два произвольных фигур в WPF
I created custom shapes in XAML and I'm trying to connect them together like in the image <a href="https://drive.google.com/file/d/1wmN6jMAnmEmROCT1b8r4WZEkERNWr48T/view?usp=sharing"></a> they can connect only if they are Compatible. Could you help me in solving this problem, please?
Что я уже пробовал:
The XAML code
<Canvas Height="485" Width="500" Margin="0,-1,131,0" Background="LightGray"> <Path Stroke="Black" StrokeThickness="2" Fill="Aqua"> <Path.Data> <CombinedGeometry GeometryCombineMode="Xor"> <CombinedGeometry.Geometry1> <RectangleGeometry Rect="20,30,250,80" RadiusX="10" RadiusY="10"/> </CombinedGeometry.Geometry1> <CombinedGeometry.Geometry2> <CombinedGeometry GeometryCombineMode="Xor"> <CombinedGeometry.Geometry1> <PathGeometry> <PathGeometry.Figures> <PathFigure StartPoint="85,110" IsClosed="True"> <LineSegment Point="75,120"/> <LineSegment Point="50,120"/> <LineSegment Point="40,110"/> </PathFigure> </PathGeometry.Figures> </PathGeometry> </CombinedGeometry.Geometry1> <CombinedGeometry.Geometry2> <PathGeometry> <PathGeometry.Figures> <PathFigure StartPoint="85,30" IsClosed="True"> <LineSegment Point="75,40"/> <LineSegment Point="50,40"/> <LineSegment Point="40,30"/> </PathFigure> </PathGeometry.Figures> </PathGeometry> </CombinedGeometry.Geometry2> </CombinedGeometry> </CombinedGeometry.Geometry2> </CombinedGeometry> </Path.Data> </Path > </Canvas>