AutoScroll and Subitems

3 posts, 0 answers
  1. Nopecio
    Nopecio avatar
    4 posts
    Member since:
    Jul 2008

    Posted 25 Jul 2008 Link to this post

    Hi,
    i'm creating a custom control (following the magnify demo), but even when the "autoscroll" property is set, it does nothing for RadItems inside the container, only for "external" controls i placed over the control.
    Is there any way to activate the scroll for this items created by the control itself?
    Thanks in advance..
  2. Angel
    Admin
    Angel avatar
    121 posts

    Posted 29 Jul 2008 Link to this post

    Hi Nopecio,

    When you add child controls, the Microsoft scrolling logic is activated. You see the MS scrollbars and only the child controls determine the scrolling.

    When you wish to scroll the child elements inside RadControl, you need RadScrollViewer to scroll them.
    In that case, our scrollbars will be used (they can be themed and have the look-and-feel of all other Rad elements).
    The usage of RadScrollViewer is the same as the WPF ScrollViewer. For more information see the help for RadScrollViewer which can found online here.

    If you wish to scroll child controls with RadScrollViewer instead of MS scrolling, set RadControl.AutoScroll to false (it is the default value) and use RadHostItem for the child controls.

    I delayed the answer because I found that the Magnifier example is rather old and uses our old layout system.
    After some tests I found that RadScrollViewer cannot work very well in that Magnifier.

    Now I am updating the Magnifier control to have a scroll viewer in it. As soon as I create a demo project I will post it here.

    Greetings,
    Angel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Angel
    Admin
    Angel avatar
    121 posts

    Posted 29 Jul 2008 Link to this post

    Hello Nopecio,

    Find attached a sample project with the new Magnifier that can scroll its items.
    To make the hierarchy simpler I made MagnifierElement to be a scroll viewer itself.
    Write me back if you have further questions.

    All the best,
    Angel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top