Hi,
I've got a problem with the new RadialMenu. I'm trying to using it into a Grid object and open it with the option PopupPlacement="MousePoint".
<Grid x:Name="myGrid">
<telerik:RadRadialMenu.RadialContextMenu>
<telerik:RadRadialMenu PopupPlacement="MousePoint" IsOpen="True" StaysOpenOnShow="True">
<telerik:RadRadialMenuItem>
<telerik:RadRadialMenuItem Header="Refresh" CommandParameter="REFRESH" />
<telerik:RadRadialMenuItem Header="Search" CommandParameter="SEARCH" ContentSectorBackground="LightBlue" />
</telerik:RadRadialMenuItem>
</telerik:RadRadialMenu>
</telerik:RadRadialMenu.RadialContextMenu>
<Image Source="landscape.jpg" />
</Grid>
I've used the same algorithm used in the Demo for showing / hiding the ContextMenu:
private void OnEditorMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (e.ClickCount == 1)
{
var radialMenu = RadRadialMenu.GetRadialContextMenu(this.Editor);
var mousePoint = e.GetPosition(this.Editor as IInputElement);
radialMenu.PopupHorizontalOffset = mousePoint.X;
radialMenu.PopupVerticalOffset = mousePoint.Y;
RadialMenuCommands.Show.Execute(null, this.Editor);
}
}
private void OnEditorMouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ClickCount == 1)
{
RadialMenuCommands.Hide.Execute(null, sender as IInputElement);
}
}
For the first click everything is working fine and the RadialContextMenu is shown exactly centered with the Mouse Pointer but... after the second click the RadialContextMenu popup as it was PopupPlacement="Mouse".
Is it a bug ?
Thanks for the help
I've got a problem with the new RadialMenu. I'm trying to using it into a Grid object and open it with the option PopupPlacement="MousePoint".
<Grid x:Name="myGrid">
<telerik:RadRadialMenu.RadialContextMenu>
<telerik:RadRadialMenu PopupPlacement="MousePoint" IsOpen="True" StaysOpenOnShow="True">
<telerik:RadRadialMenuItem>
<telerik:RadRadialMenuItem Header="Refresh" CommandParameter="REFRESH" />
<telerik:RadRadialMenuItem Header="Search" CommandParameter="SEARCH" ContentSectorBackground="LightBlue" />
</telerik:RadRadialMenuItem>
</telerik:RadRadialMenu>
</telerik:RadRadialMenu.RadialContextMenu>
<Image Source="landscape.jpg" />
</Grid>
I've used the same algorithm used in the Demo for showing / hiding the ContextMenu:
private void OnEditorMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
if (e.ClickCount == 1)
{
var radialMenu = RadRadialMenu.GetRadialContextMenu(this.Editor);
var mousePoint = e.GetPosition(this.Editor as IInputElement);
radialMenu.PopupHorizontalOffset = mousePoint.X;
radialMenu.PopupVerticalOffset = mousePoint.Y;
RadialMenuCommands.Show.Execute(null, this.Editor);
}
}
private void OnEditorMouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ClickCount == 1)
{
RadialMenuCommands.Hide.Execute(null, sender as IInputElement);
}
}
For the first click everything is working fine and the RadialContextMenu is shown exactly centered with the Mouse Pointer but... after the second click the RadialContextMenu popup as it was PopupPlacement="Mouse".
Is it a bug ?
Thanks for the help