Наследование: System.Windows.Controls.TreeViewItem, ICommandSource, ICustomAlignedControl
Пример #1
0
        private static void CommandChanged(DependencyObject d,
                                           DependencyPropertyChangedEventArgs e)
        {
            MenuKillerItem mki = (MenuKillerItem)d;

            mki.HookUpCommand((ICommand)e.OldValue, (ICommand)e.NewValue);
        }
Пример #2
0
        void HandleMouseHover(object sender, RoutedEventArgs rea)
        {
            if (null != rea)
            {
                MenuKillerItem mki = rea.OriginalSource as MenuKillerItem;

                if (null != mki)
                {
                    HoverToolTip = mki.RootToolTip;
                }
            }
        }
Пример #3
0
        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;
        }