/// <summary>
 /// Attaches an instance of <see cref="RadRadialMenu"/> to a specific <see cref="FrameworkElement"/>.
 /// </summary>
 /// <param name="obj">The target <see cref="FrameworkElement"/>.</param>
 /// <param name="value">The <see cref="RadRadialMenu"/> instance to be attached to the target element.</param>
 public static void SetMenu(DependencyObject obj, RadRadialMenu value)
 {
     if (obj != null)
     {
         obj.SetValue(MenuProperty, value);
     }
 }
 /// <summary>
 /// Gets the desired menu position in global coordinates.
 /// </summary>
 /// <param name="menu">The context menu.</param>
 protected virtual Point GetMenuPosition(RadRadialMenu menu)
 {
     if (menu != null)
     {
         return(menu.GetPositionPoint());
     }
     return(new Point());
 }
Exemple #3
0
        private static void OnNavigationMenuStylePropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
        {
            RadRadialMenu radialMenu = (RadRadialMenu)target;

            radialMenu.navigationMenuBackgroundStyleCache = args.NewValue as Style;

            if (radialMenu.IsTemplateApplied)
            {
                radialMenu.model.UpdateRingsVisualPanel();
            }
        }
        private void PositionMenu(RadRadialMenu menu)
        {
            var point = this.GetMenuPosition(menu);

            PopupService.PositionMenu(menu, point);
        }