private static void CommandChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MenuKillerItem mki = (MenuKillerItem)d; mki.HookUpCommand((ICommand)e.OldValue, (ICommand)e.NewValue); }
void HandleMouseHover(object sender, RoutedEventArgs rea) { if (null != rea) { MenuKillerItem mki = rea.OriginalSource as MenuKillerItem; if (null != mki) { HoverToolTip = mki.RootToolTip; } } }
void mPanel_ChildArranged(object sender, UIElement child, double angle) { MenuKillerItem childItem = child as MenuKillerItem; childItem.mPanel.AngleSpacing = Double.NaN; // Good if only one submenu is open at a time // childItem.mPanel.StartAngle = angle - 67.75; // childItem.mPanel.EndAngle = angle + 67.75; // Good if multiple submenus are open at a time childItem.mPanel.StartAngle = angle - 45.0; childItem.mPanel.EndAngle = angle + 45.00; }