Custom connectors and design time

4 posts, 0 answers
  1. Amiel
    Amiel avatar
    15 posts
    Member since:
    Jul 2016

    Posted 11 Oct Link to this post

    Hello,

     

    I'm defining some shapes for the raddiagram and I can see that at design time however when I set the connectors I can only see them at run time.  So it's a pain to see where the connectors will end up by having to compile and run every time.  I don't mind even doing it at run time if I can edit the live xaml but that is not showing up.  A sample project would be great!  

     

    Thanks,

    Amiel

  2. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    61 posts

    Posted 16 Oct Link to this post

    Hello Amiel,

    The connectors are placed in a control named ("ConnectorsControl") which is made visible internally on selection. You can find it the ControlTemplate of the DiagramShape.
    You can try setting the IsSelected property of the shape which will trigger the visibility of the ConnectorsControl:

    <telerik:RadDiagram Name="diagram">
            <telerik:RadDiagramShape x:Name="shape" IsSelected="True">
                <telerik:RadDiagramShape.Connectors>
                    <telerik:RadDiagramConnector Name="diagramConnector"
                                         Offset="0.4 0.7" />
                </telerik:RadDiagramShape.Connectors>
            </telerik:RadDiagramShape>
    </telerik:RadDiagram>

    I hope you find this helpful. Let me know if I can be of any further assistance.

    Regards,
    Vladimir Stoyanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Amiel
    Amiel avatar
    15 posts
    Member since:
    Jul 2016

    Posted 18 Oct in reply to Vladimir Stoyanov Link to this post

    Hello,

    This did work, however when subclassing RadDiagramShape control I can't see the connectors unless I put the shape in a RadDiagram.  So as I setup the shape and place the connectors I temporarily place the control in a RadDiagram so I can see it.  Is there some kind of #if define #else in xaml so I can make the switching quicker?  

    Amiel

  4. Vladimir Stoyanov
    Admin
    Vladimir Stoyanov avatar
    61 posts

    Posted 23 Oct Link to this post

    Hello Amiel,

    There is no conditional functionality in xaml. However, if you are customizing the appearance of a RadDiagramShape, you can take a look at the following article in our documentation: Customize Appearance.

    I hope you find this helpful. Don't hesitate to contact us if you have any other questions.

    Regards,
    Vladimir Stoyanov
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top