コード例 #1
0
        public Boolean ProcessLowerCommand()
        {
            if (!Const.PopupMenuEnabled)
            {
                return(false);
            }

            TableViewModel tvm       = (this.DataContext as TableViewModel);
            Boolean        processed = false;

            switch (lowerSelected)
            {
            case (Command.Left):
                tvm.MainPageViewModel.SheetViewModel.BringFront(ColumnViewModel);
                tvm.MainPageViewModel.ReflectAll(ReflectReason.ColumnShown);    // 2.SelectionChanged);
                LowerLeftMenuElement.Unhighlight();
                tvm.CancelIndexing(true);
                processed = true;
                break;

            case (Command.Right):
                tvm.MainPageViewModel.SheetViewModel.SetAside(ColumnViewModel);
                tvm.MainPageViewModel.ReflectAll(ReflectReason.ColumnHidden);    // 2.SelectionChanged);
                LowerRightMenuElement.Unhighlight();
                tvm.CancelIndexing(true);
                processed = true;
                break;

            case (Command.Up):
                tvm.MainPageViewModel.SheetViewModel.Sort(ColumnViewModel, SortOption.Descending);
                tvm.MainPageViewModel.ReflectAll(ReflectReason.ColumnSorted);     // 2.SelectionChanged);
                LowerUpMenuElement.Unhighlight();
                tvm.CancelIndexing(true);
                processed = true;
                break;
            }

            lowerSelected = Command.None;
            LowerUpMenuElement.Hide();
            LowerLeftMenuElement.Hide();
            LowerRightMenuElement.Hide();
            return(processed);
        }
コード例 #2
0
        void UnhighlightLowerMenu(Command command)
        {
            switch (command)
            {
            case Command.Up:
                LowerUpMenuElement.Unhighlight();
                break;

            case Command.Left:
                LowerLeftMenuElement.Unhighlight();
                break;

            case Command.Right:
                LowerRightMenuElement.Unhighlight();
                break;

            case Command.None:
                LowerUpMenuElement.Unhighlight();
                LowerLeftMenuElement.Unhighlight();
                LowerRightMenuElement.Unhighlight();
                break;
            }
        }