Hello,
I have a problem using radmenu in RadWindow.HeaderTemplate.
The radmenu items are displayed but the sub items aren't and nothing happens when i click on item.
Here is my code :
<
telerik:RadWindow
x:Class
=
"MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Header
=
"Test"
Height
=
"900"
Width
=
"1400"
WindowStartupLocation
=
"CenterScreen"
FontFamily
=
"Segoe UI Bold"
FontSize
=
"18"
>
<
telerik:RadWindow.HeaderTemplate
>
<
DataTemplate
>
<
telerik:RadMenu
Background
=
"Transparent"
HorizontalAlignment
=
"Right"
ClickToOpen
=
"false"
>
<
telerik:RadMenuItem
Header
=
"Item1"
/>
<
telerik:RadMenuItem
Header
=
"Item2"
>
<
telerik:RadMenuGroupItem
>
<
telerik:RadMenuItem
Header
=
"SubItem1"
/>
</
telerik:RadMenuGroupItem
>
</
telerik:RadMenuItem
>
</
telerik:RadMenu
>
</
DataTemplate
>
</
telerik:RadWindow.HeaderTemplate
>
<
Grid
>
</
Grid
>
</
telerik:RadWindow
>
Thanks in advance.
Regards.
5 Answers, 1 is accepted
0
OD
Top achievements
Rank 1
answered on 15 Mar 2018, 06:00 PM
It's very strange, i was using Material theme and nothing worked, but i've tried VisualStudio2013, and it works, but not very well, the dropdown doesn't show well. It losses focus and it's a pain to use.
0
Hi,
There is a property that we have created in order to help with focusing or interaction with controls in the RadWindow header since the RadWindow handles mouse inputs on the header in order to be draggable. You can set telerik:WindowHost.HitTestable="False" to the RadMenu in the header. This should fix the interaction issue.
Please get back to us whether that is helpful. If you have any other questions, please do not hesitate to contact us further.
Regards,
Martin
Progress Telerik
There is a property that we have created in order to help with focusing or interaction with controls in the RadWindow header since the RadWindow handles mouse inputs on the header in order to be draggable. You can set telerik:WindowHost.HitTestable="False" to the RadMenu in the header. This should fix the interaction issue.
Please get back to us whether that is helpful. If you have any other questions, please do not hesitate to contact us further.
Regards,
Martin
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.
0
OD
Top achievements
Rank 1
answered on 22 Mar 2018, 03:51 PM
hi,
I can't achieve the expected behaviour.
I have tried to put the telerik:WindowHost.HitTestable="False" in the radMenu / the WrapPanel, but nothing seems to work (i use Material Theme).
Thanks in advance.
<
telerik:RadWindow.HeaderTemplate
>
<
DataTemplate
>
<
telerik:RadWrapPanel
HorizontalAlignment
=
"Right"
telerik:WindowHost.HitTestable
=
"False"
>
<
telerik:RadMenu
Background
=
"Transparent"
HorizontalAlignment
=
"Right"
ClickToOpen
=
"true"
BorderBrush
=
"Transparent"
>
<!--Gestion utilisateur-->
<
telerik:RadMenuItem
Margin
=
"5,5,5,5"
HorizontalAlignment
=
"Center"
HorizontalContentAlignment
=
"Center"
VerticalAlignment
=
"Center"
VerticalContentAlignment
=
"Center"
>
<
telerik:RadMenuItem.Header
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"Jackie Chan"
Foreground
=
"White"
VerticalAlignment
=
"Bottom"
Margin
=
"5,0"
/>
<
Image
Width
=
"32"
Height
=
"32"
Source
=
"./Images/UserWhite.png"
ToolTip
=
"Connexion"
HorizontalAlignment
=
"Center"
/>
</
StackPanel
>
</
telerik:RadMenuItem.Header
>
<
telerik:RadMenuGroupItem
>
<
telerik:RadMenuItem
Header
=
"Se connecter"
></
telerik:RadMenuItem
>
</
telerik:RadMenuGroupItem
>
</
telerik:RadMenuItem
>
<!--A propos-->
<
telerik:RadMenuItem
Header
=
" "
Margin
=
"5,5,5,5"
HorizontalAlignment
=
"Center"
HorizontalContentAlignment
=
"Center"
VerticalAlignment
=
"Center"
VerticalContentAlignment
=
"Center"
>
<
telerik:RadMenuItem.Icon
>
<
Image
Width
=
"32"
Height
=
"32"
Source
=
"./Images/AboutWhite.png"
ToolTip
=
"Connexion"
HorizontalAlignment
=
"Center"
/>
</
telerik:RadMenuItem.Icon
>
</
telerik:RadMenuItem
>
</
telerik:RadMenu
>
</
telerik:RadWrapPanel
>
</
DataTemplate
>
</
telerik:RadWindow.HeaderTemplate
>
0
Accepted
Hi,
I am sorry for the wrong information that I had provided. The mentioned property should be set to True in order for the control to be ignored by the hit testing logic in the RadWindow header. There is a mistake in the snippet in the article that I had sent you and I have proposed a change to it.
If any of the items in the RadWrapPanel or its child items are still not responsive, you can set it to it as well. Have in mind that in order to preserve the header interactions like dragging and double click maximizing, when the hearer is larger than normal (as in your case), you can increase the CaptionHeight to the RadWindow, which defines the interaction area height of the header.
In the case of the VisualStudio2013 theme - the caption height is very small and the partly interaction you were achieving with the RadMenu is because part of the item was positioned outside of that area and thus was free to interact and receive mouse events.
I hope that this time everything should work as expected.
Regards,
Martin
Progress Telerik
I am sorry for the wrong information that I had provided. The mentioned property should be set to True in order for the control to be ignored by the hit testing logic in the RadWindow header. There is a mistake in the snippet in the article that I had sent you and I have proposed a change to it.
If any of the items in the RadWrapPanel or its child items are still not responsive, you can set it to it as well. Have in mind that in order to preserve the header interactions like dragging and double click maximizing, when the hearer is larger than normal (as in your case), you can increase the CaptionHeight to the RadWindow, which defines the interaction area height of the header.
In the case of the VisualStudio2013 theme - the caption height is very small and the partly interaction you were achieving with the RadMenu is because part of the item was positioned outside of that area and thus was free to interact and receive mouse events.
I hope that this time everything should work as expected.
Regards,
Martin
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.
0
OD
Top achievements
Rank 1
answered on 27 Mar 2018, 01:20 PM
Thank you very much Martin,
Everythings works fine now !