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

Arrow rotation with text

5 Answers 107 Views
Diagram, DiagramRibbonBar, DiagramToolBox
This is a migrated thread and some comments may be shown as answers.
Marian
Top achievements
Rank 2
Iron
Iron
Iron
Marian asked on 03 Sep 2020, 10:46 AM
Is it possible to flip arrow in RadDiagram control? Standard arrow is pointing to left side. I need to have arrow pointing to right side. I can set rotation to 180, but then also text is rotated, see screenshot. How can I solve this?

5 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Sep 2020, 10:07 AM

Hello, Marian,

It is possible to use the default left oriented arrow shape and just flip the text for the hosted DiagramShapeElement which is actually represented by a LightVisualElement
            RadDiagramShape arrowShape = this.radDiagram1.Shapes[0] as RadDiagramShape;
            arrowShape.RotationAngle = 180;
            arrowShape.DiagramShapeElement.FlipText = true;


I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Marian
Top achievements
Rank 2
Iron
Iron
Iron
answered on 07 Sep 2020, 10:43 AM

Hello,

thanks. But is it possible to change it by UI? We don't design diagram programatically, user edits it by UI, also that Settings Pane is telerik system form, we have question from customer, how to do it.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Sep 2020, 11:20 AM

Hello, Marian,

You can edit the shapes at design time via the property builder. However, neither the settings pane, nor the Properties section in the below screenshot gives you access to the contained LightVisualElement (accessed by the DiagramShapeElement property) from where you can flip the text. That is why it is necessary to do it programmatically in the form's constructor for example:

Should you have further questions please let me know.

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Marian
Top achievements
Rank 2
Iron
Iron
Iron
answered on 07 Sep 2020, 01:45 PM
Ok. Is it possible to customize SettingsPane? I can add flip text button for selected element somewhere to toolstrip, but SettingsPane would be better place, user uses it for editing diagram.
0
Peter
Telerik team
answered on 09 Sep 2020, 02:28 PM

Hi, Marian,

You can access the SettingsPane and add a button in this way:

RadButton myButton = new RadButton() { Text = "Rotate" };
myButton.Click += MyButton_Click;
myButton.Location = new System.Drawing.Point(20, 200);
radDiagram1.DiagramElement.SettingsPane.RadPageViewPageText.Controls.Add(myButton);

I have attached the source code of the settings pane for your reference.

Regards,
Peter
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Diagram, DiagramRibbonBar, DiagramToolBox
Asked by
Marian
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Marian
Top achievements
Rank 2
Iron
Iron
Iron
Peter
Telerik team
Share this question
or