This is a migrated thread and some comments may be shown as answers.

Custom connectors and design time

3 Answers 86 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Amiel
Top achievements
Rank 1
Amiel asked on 11 Oct 2017, 08:52 PM

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

3 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 16 Oct 2017, 04:34 PM
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.
0
Amiel
Top achievements
Rank 1
answered on 18 Oct 2017, 04:16 PM

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

0
Vladimir Stoyanov
Telerik team
answered on 23 Oct 2017, 12:32 PM
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.
Tags
Diagram
Asked by
Amiel
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Amiel
Top achievements
Rank 1
Share this question
or