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

Scrollbar

4 Answers 59 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Massimiliano
Top achievements
Rank 1
Massimiliano asked on 27 Mar 2012, 08:57 AM
How I can view scrolbar on Diagram?
Can I use ScrollViewer.HorizontalScrollBarVisibility or there is anothes method?

4 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 27 Mar 2012, 02:07 PM
Hi Massimiliano,

Unfortunately at the moment the RadDiagrams framework cannot work with ScrollViewer. However, we've added this feature request in our to-do list and we will do our best to implement it for the Q2 2012 release.

Greetings,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
HDC
Top achievements
Rank 1
answered on 01 Apr 2012, 08:59 AM
Hi Tina,

I think that Massimiliano has a big point with the scrollviewer.

I'm facing following problem:

I want to create predefined diagram templates. When the user clicks on a button, I add diagram of type 1, it will create a number of shapes. I want to use relative sizing for my shapes, for example: i want a square with width=50% (of the width of the diagram), and the square must be positioned on X=25%.  In the square i want to write a text, so i make the height of the square 15%...

This will work fine my current resolution, but when i use a different resolution, the 15% becomes to small to display the entire text (or way to big is also possible).

As a solution to this problem i should be able to enter a virtual size of the diagram (for example 1200x800), if the real size of the diagram is smaller (think of using the diagram together with docking), then the diagram should automatically show scrollbars. If it is bigger then the content of the diagram should be centered within that space.

Now, when i say 15% of the height of the diagram, i can always rely on the fact that it will be 15% of 800 and not 15% of whatever screen realestate the user has left for the diagram.

I realize that the diagram is not in a finished state and as such, i accept that these features would be missing at this point, but i do have to stress that for me this feature is crucial too.

Best Regards,

Peter


0
Tina Stancheva
Telerik team
answered on 04 Apr 2012, 01:33 PM
Hi Peter,

Thank you for sharing your scenario with us. I am not sure if I haven't missed something from your requirements, but you should be able to implement your scenario with the current version of the DiagramingFramework as well.
You can apply a predefined size on the RadDiagram (for example setting the Width and Height properties to 800x8000) and wrap it in a ScrollViewer. This way if the browser size is such that the Diagram cannot be fully displayed, vertical and/or horizontal ScrollBars will be displayed.

Also as I don't know how you've set up the size of the shapes, you may need to handle the RadDiagram.SizeChanged event to customize their size if necessary.

I attached a sample project demonstrating what I have in mind. Please have a look at it and let me know if it works for you.

Kind regards,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
HDC
Top achievements
Rank 1
answered on 04 Apr 2012, 07:01 PM
Hi Tina,

You are right, this does work just like i want it.

I must have misunderstood the issue of Massimiliano

Best Regards,

Peter

Tags
Diagram
Asked by
Massimiliano
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
HDC
Top achievements
Rank 1
Share this question
or