http://cid-cc43a90a79374ebd.skydrive.live.com/self.aspx/Public/SilverlightApplication13.zip
6 Answers, 1 is accepted
Thanks for the sample project!
The problem with the ContextMenu is that it relies on MouseEvents to get the last position of the mouse. Unfortunately they do not always work as expected.
A quick workaround will be to change the Placement of the context menu like so:
<teleriknav:RadContextMenu EventName="MouseLeftButtonUp" Placement="Bottom"> |
This way the content menu will depend on the position of its parent element, which we can figure out.
The positioning problem is a bug, we will try to address it for Q3.
Kind regards,
Miroslav
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am happy that the Placement property works for you.
It seems we have one more thing to fix in the context menu :).
Thanks once again for the great feedback!
Kind regards,
Miroslav
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
<
UserControl xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" x:Class="ContextMenuTest.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<Rectangle x:Name="_rect" Fill="LightGray" Width="388" Height="307" HorizontalAlignment="Center"
VerticalAlignment="Center">
<telerikNavigation:RadContextMenu.ContextMenu>
<telerikNavigation:RadContextMenu x:Name="_contextMenu1" EventName="MouseLeftButtonDown">
<telerikNavigation:RadMenuItem Header="Option1" x:Name="Option1" Click="ContextMenuItem_Click" />
<telerikNavigation:RadMenuItem Header="Option2" x:Name="Option2" Click="ContextMenuItem_Click" />
</telerikNavigation:RadContextMenu>
</telerikNavigation:RadContextMenu.ContextMenu>
</Rectangle>
</Grid>
</
UserControl>
If you click in the rectangle the menu will pop-up fine, but if without taking any action in the menu, you move the mouse and go click somewhere else the menu just disappears without appearing in the new mouse position. Then if *without moving the mouse pointer* click again on the same location the menu will pop-up again, but at the location where it was at the first time. In other words, if you make the context menu disappear by clicking somewhere else and then click again on the smae point, the menu will keep re-appearing ion its original location.
I fixed the positioning bug you reported. The fix will be available in the upcoming internal build this friday.
All the best,
Valeri Hristov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.