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

AutoScroll and Subitems

2 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nopecio
Top achievements
Rank 1
Nopecio asked on 26 Jul 2008, 01:58 AM
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 Answers, 1 is accepted

Sort by
0
Angel
Telerik team
answered on 29 Jul 2008, 08:32 AM
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.
0
Angel
Telerik team
answered on 29 Jul 2008, 12:46 PM
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.
Tags
General Discussions
Asked by
Nopecio
Top achievements
Rank 1
Answers by
Angel
Telerik team
Share this question
or