Hello Telerik Team,
I have the following code:
When I run and maximize the window, the RadMenu gets proportionaly bigger (naturally, as a star notation is used).
Now I could use a fixed height for the first grid row - but I am not sure that it is a good practice - I am just learning wpf and most of the starting materials discourage from using fixed sizes in wpf.
Could you please tell me what would be a good/standard way of making the RadMenu occupy just enough space to draw its contents and keep same height even when resizing? In other words, I am trying to add a menu just like in other standard windows desktop applications.
However, if a fixed size must be used, what would be the minimum height for the RadMenu?
Thank you in advance for you reply.
Best Regards,
Karol
I have the following code:
<
Window
x:Class
=
"RadMenu0.Testing.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"350"
Width
=
"525"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"24*"
/>
<
RowDefinition
Height
=
"287*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadMenu
VerticalAlignment
=
"Top"
>
<
telerik:RadMenuItem
Header
=
"Item 1"
>
<
telerik:RadMenuItem
Header
=
"Sub Item 1"
/>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Header
=
"Item 2"
>
<
telerik:RadMenuItem
Header
=
"Sub Item 1"
/>
</
telerik:RadMenuItem
>
</
telerik:RadMenu
>
<
telerik:RadDocking
HasDocumentHost
=
"True"
Grid.Row
=
"1"
>
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
>
<
telerik:RadPaneGroup
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
telerik:RadPane
Header
=
"Pane 1"
>
<
TextBlock
>Hello</
TextBlock
>
</
telerik:RadPane
>
<
telerik:RadPane
Header
=
"Pane 2"
/>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
</
telerik:RadDocking
>
</
Grid
>
</
Window
>
When I run and maximize the window, the RadMenu gets proportionaly bigger (naturally, as a star notation is used).
Now I could use a fixed height for the first grid row - but I am not sure that it is a good practice - I am just learning wpf and most of the starting materials discourage from using fixed sizes in wpf.
Could you please tell me what would be a good/standard way of making the RadMenu occupy just enough space to draw its contents and keep same height even when resizing? In other words, I am trying to add a menu just like in other standard windows desktop applications.
However, if a fixed size must be used, what would be the minimum height for the RadMenu?
Thank you in advance for you reply.
Best Regards,
Karol