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

Diagram with Fixed Size

3 Answers 148 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Kuba
Top achievements
Rank 1
Kuba asked on 26 Jan 2013, 12:45 AM
Hello,

im trying to customize this outstanding control to fit my needs.
How/or is possible to set fixed size for Diagram?
For ex. i need only 800x600 canvas size where shapes can be deployed and arranged.
tia
Kuba Gluszkiewicz

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 30 Jan 2013, 03:52 PM
Hi Kuba,

If you set the Width and Height properties of the RadDiagram control, they will restrict the size of the control. And then you can use the AutoFit feature to center and zoom out the diagram items to display all of them in the bounds of the current viewport. The RadDiagram provides an AutoFit command out-of-the-box - please take a look at this article for further information.

I hope this information will help you, however if I've missed something, please let me know.
 
Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Kuba
Top achievements
Rank 1
answered on 15 Mar 2013, 10:39 PM
Thanks for your replay,

indeed i can set Width and Height property manualy but after that im unable to use ScrollBars in Diagram, which is by the design i think...

maybe i will provide you more information about my task, why im using Telerik Diagram,

im developing Digital Siginage Application and frontend for enduser is developed in Silverlight,
i would like to replace our SCREEN DESIGNER to Telerik Diagram, this control fit our needs in many many scenarios, and it will be a sin to not use it, ;)

so please imagine that Diagram Control must represent, a screen size canvas where users deploying players (ex. video, images). I need to show scrollbars to enable scrolling functionality for end user. HD SCREEN has quite big canvas (1920:1080 pixels).

Im doing that by creating 4 invisible shapes (width=0, height=0) and placing them into 4 positions (0,0;1920,0;0,1080 and 1920,1080),
this trick forces Telerik Diagram to show scroll bars and providing scrolling functionality,

ohh im sorry for my english, im trying to explain you this scenario as good as i can,

so finally, there is maybe, a better option to allocate 1920;1080 pixel canvas in Diagram with scrollbars?
any ideas
thanks
Kuba
0
Tina Stancheva
Telerik team
answered on 20 Mar 2013, 10:02 PM
Hello Kuba,

The ScrollViewers in the RadDiagram are designed to work on the area described by the shapes and connection. This is why if the approach with the mock-up shapes work for you, you can definitely use it to implement your scenario.

But in case you encounter any issues with it or with the RadDiagram, please let us know.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

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