예제 #1
0
        public MenuItem()
        {
            this.DefaultStyleKey = typeof(MenuItem);
            this.Loaded         += new RoutedEventHandler(MenuItem_Loaded);
            if (Items == null)
            {
                Items = new ObservableCollection <MenuItem>();
            }
            if (string.IsNullOrEmpty(MenuText))
            {
                MenuText = "Default";
            }

            MouseOverTimer       = new DispatcherTimer();
            MouseOverTimer.Tick += (se, ev) =>
            {
                MouseOverTimer.Stop();
                ShowDropDown();
            };

            isNested = false;

            parentMenuBarItem = null;
            parentMenuItem    = null;
        }
예제 #2
0
        public MenuItem()
        {
            this.DefaultStyleKey = typeof(MenuItem);
            this.Loaded += new RoutedEventHandler(MenuItem_Loaded);
            if (items == null)
                items = new ObservableCollection<MenuItem>();
            if (string.IsNullOrEmpty(MenuText))
                MenuText = "Default";

            isNested = false;

            parentMenuBarItem = null;
            parentMenuItem = null;
        }
예제 #3
0
        public MenuItem()
        {
            this.DefaultStyleKey = typeof(MenuItem);
            this.Loaded         += new RoutedEventHandler(MenuItem_Loaded);
            if (items == null)
            {
                items = new ObservableCollection <MenuItem>();
            }
            if (string.IsNullOrEmpty(MenuText))
            {
                MenuText = "Default";
            }

            isNested = false;

            parentMenuBarItem = null;
            parentMenuItem    = null;
        }
예제 #4
0
        public MenuItem()
        {
            this.DefaultStyleKey = typeof(MenuItem);
            this.Loaded += new RoutedEventHandler(MenuItem_Loaded);
            if (Items == null)
                Items = new ObservableCollection<MenuItem>();
            if (string.IsNullOrEmpty(MenuText))
                MenuText = "Default";

            MouseOverTimer = new DispatcherTimer();
            MouseOverTimer.Tick += (se, ev) =>
            {
                MouseOverTimer.Stop();
                ShowDropDown();
            };

            isNested = false;

            parentMenuBarItem = null;
            parentMenuItem = null;
        }