Is there any way resizing settingPane

1 Answer 72 Views
Diagram, DiagramRibbonBar, DiagramToolBox
Shen
Top achievements
Rank 1
Shen asked on 02 Sep 2022, 02:57 PM


hello, I want to show a form in settings pane, but the form is much larger, so  I need to resize it . But

radDiagram1.DiagramElement.SettingsPane.Size doesn't work. How can I make this work ? Thanks

Shen
Top achievements
Rank 1
commented on 02 Sep 2022, 03:32 PM

I work it out, there are two problems:

1. there is a panel in setting pane which contains a radTitleBar and a pageview, the problem is the DockStyle of the panel is  not DockStyle.Fill, so when I set the size of setting pane the panel does not resize itself. I have to set Dock property manually.

RadPanel radPanel = radDiagram1.DiagramElement.SettingsPane.Controls.OfType<RadPanel>().First();
radPanel.Dock = DockStyle.Fill;

2. the dock style of the titlebar should be dockStyle.Top, but it is not,  so I have to set the Dock property to Top

var titleBar = radPanel.Controls.OfType<RadTitleBar>().First();
titleBar.Dock = DockStyle.Top;

After these two steps,  I can resize setting pane via 

radDiagram1.DiagramElement.SettingsPane.Size and everything works

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Sep 2022, 08:29 AM

Hello, Shen, 

I am glad that you have found a suitable solution for the custom requirement you have. Note that the SettingsPane is not designed to be resizable. That is why it needs some adjustments as you have already found out the proper settings.

RadDiagramSettingsPane is represented by a ShapedForm and its FormBorderStyle property is set to None. That is why it can't be resized.  If you set the FormBorderStyle property to Sizable and manage the Dock property of the contained RadTitleBar and RadPanel, the UI will be properly resized.

If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
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
Shen
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or