Scrollbar

5 posts, 0 answers
  1. Massimiliano
    Massimiliano avatar
    3 posts
    Member since:
    May 2009

    Posted 27 Mar 2012 Link to this post

    How I can view scrolbar on Diagram?
    Can I use ScrollViewer.HorizontalScrollBarVisibility or there is anothes method?

  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 27 Mar 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 01 Apr 2012 Link to this post

    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


  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 04 Apr 2012 Link to this post

    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 >>
  6. HDC
    HDC avatar
    214 posts
    Member since:
    Dec 2010

    Posted 04 Apr 2012 Link to this post

    Hi Tina,

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

    I must have misunderstood the issue of Massimiliano

    Best Regards,

    Peter

Back to Top
DevCraft banner