Esempio n. 1
0
        public void UpdateTemplate()
        {
            PropertyChanged(this, new PropertyChangedEventArgs("IsSingleMode"));
            PropertyChanged(this, new PropertyChangedEventArgs("NoBorder"));
            CommandManager.InvalidateRequerySuggested();

            if (menu != null)
            {
                menu.Dispose();
                menu = null;
            }
        }
Esempio n. 2
0
        private void _ApplyMenu()
        {
            if (menu != null)
            {
                menu.Dispose();
                menu = null;
            }
            var ele = DataContext as DockElement;

            menu = new DockMenu(ele);
            menu.PlacementTarget = ctb;
            menu.Placement       = PlacementMode.Bottom;
            ctb.ContextMenu      = menu;
        }