5 Answers, 1 is accepted
I would suggest you to use RadPropertyGrid with RenderMode="Flat". Then you can disable the horizontal scrollbar in the Loaded event like so:
private void RadPropertyGrid_Loaded(object sender, RoutedEventArgs e)
{
(sender as RadPropertyGrid).ChildrenOfType<
VirtualizingStackPanel
>().First().ScrollOwner.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
}
Please give it a try and let me know how it works for you.
Regards,
Yoan
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).
I am glad to hear that. Let me know if any additional questions arise.
Regards,
Yoan
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).
Hi Yoan,
If I can't set RenderMode to 'Flat', How do I disable the horizontal scroll?
Because when I use tab to switch the focus it's not working when RenderMode is 'Flat'.
Actually, you can disable the navigation which comes from the Flat mode. You can use the EnableBuiltInNavigation property of the PropertyGridCommandProvider. Please check the following code snippet for a reference:
public MainWindow()
{
InitializeComponent();
this.RadPropertyGrid.CommandProvider = new CustomKeyboardCommandProvider(this.RadPropertyGrid);
}
}
public class CustomKeyboardCommandProvider : PropertyGridCommandProvider
{
public CustomKeyboardCommandProvider()
: base(null)
{
}
public CustomKeyboardCommandProvider(RadPropertyGrid propertyGrid)
: base(propertyGrid)
{
this.PropertyGrid = propertyGrid;
this.EnableBuiltInNavigation = false;
}
}
I hope this will work for you.
Regards,
Yoan
Telerik