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

description panel

1 Answer 95 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
David Ocasio asked on 30 Oct 2017, 01:01 PM

Is there an easy way to set the initial height of the description panel without pulling the entire template out.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 01 Nov 2017, 10:29 AM
Hello David,

There is no API for setting the height of the description panel. However, you can achieve your requirement without extracting the control's template. To do this you can subscribe to the Loaded event of RadPropertyGrid and use the ChildrenOfType<T>() extension method to get the Border element that presents the description panel. Then set its Height.

Here is an example in code:
private void RadPropertyGrid_Loaded(object sender, RoutedEventArgs e)
{
    var propertyGrid = (RadPropertyGrid)sender;
    var panel = propertyGrid.ChildrenOfType<Border>().FirstOrDefault(x => x.Name == "PART_DescriptionPanel");
    if (panel != null)
    {
        panel.Height = 200;
    }
}

I hope this helps.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PropertyGrid
Asked by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Martin Ivanov
Telerik team
Share this question
or