Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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? 


What I have tried:

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>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900