Exemple #1
0
        public MasterListViewModel(TreeView tree)
        {
            _pageTree    = tree;
            _commandSink = new CommandSink();
            _commandSink.RegisterCommand(ApplicationCommands.Undo, param => CanRunUndoCommand, UndoCommandHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Redo, param => CanRunRedoCommand, RedoCommandHandler);

            if (!IsInDesignMode)
            {
                this.MasterNewCommand = new DelegateCommand <object>(AddMasterExecute, CanExecuteAddMaster);

                this.MasterDeleteCommand       = new DelegateCommand <object>(DeleteMasterExecute, CanExecuteDelete);
                this.MasterSearchCommand       = new DelegateCommand <object>(MasterSearchExecute, CanExecuteSearch);
                this.OpenMasterCommand         = new DelegateCommand <object>(OpenMasterExecute);
                this.EditNodeCommand           = new DelegateCommand <object>(EditNodeExecute);
                this.DeselectNodeCommand       = new DelegateCommand <object>(DeselectNodeExecute);
                this.AddMasterCommand          = new DelegateCommand <object>(AddMasterExecute);
                this.DuplicateCommand          = new DelegateCommand <object>(DuplicateNodeExecute);
                this.DeleteSearchCommand       = new DelegateCommand <object>(DeleteSearchExecute);
                this.Add2PagesCommand          = new DelegateCommand <object>(Add2PagesExecute);
                this.DeleteFromAllPagesCommand = new DelegateCommand <object>(DeleteFromAllPagesExecute);

                NodeInfo = new NodeInfo();
                NodeInfo.SelectedNodeChanged += (s, e) => RefreshCommands();
                RootNode = new NodeViewModel(_undoManager, null, NodeInfo, true);

                _ListEventAggregator.GetEvent <DomLoadedEvent>().Subscribe(DomLoadedEventHandler, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <SelectionPageChangeEvent>().Subscribe(SelectionPageChangeHandler, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <AddConvertedMasterEvent>().Subscribe(AddConvertedMasterHandler);
                //_ListEventAggregator.GetEvent<FocusSitemapEvent>().Subscribe(FocusSitemapExecute, ThreadOption.UIThread);
            }
        }
Exemple #2
0
        public PageListViewModel(TreeView tree)
        {
            _pageTree    = tree;
            _commandSink = new CommandSink();
            _commandSink.RegisterCommand(ApplicationCommands.Undo, param => CanRunUndoCommand, UndoCommandHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Redo, param => CanRunRedoCommand, RedoCommandHandler);

            if (!IsInDesignMode)
            {
                this.PageNewCommand   = new DelegateCommand <object>(AddPageExecute, CanExecuteAddPage);
                this.FolderNewCommand = new DelegateCommand <object>(AddFolderExecute, CanExecuteAddFolder);

                this.PageDeleteCommand          = new DelegateCommand <object>(DaletePageExecute, CanExecuteDelete);
                this.PageUpCommand              = new DelegateCommand <object>(PageUpExecute, CanExecuteUp);
                this.PageDownCommand            = new DelegateCommand <object>(PageDownExecute, CanExecuteDown);
                this.PageOutdentCommand         = new DelegateCommand <object>(PageOutdentExecute, CanExecuteOutdent);
                this.PageIndentCommand          = new DelegateCommand <object>(PageIndentExecute, CanExecuteIndent);
                this.PageSearchCommand          = new DelegateCommand <object>(PageSearchExecute, CanExecuteSearch);
                this.OpenPageCommand            = new DelegateCommand <object>(OpenPageExecute);
                this.EditNodeCommand            = new DelegateCommand <object>(EditNodeExecute);
                this.DeselectNodeCommand        = new DelegateCommand <object>(DeselectNodeExecute);
                this.InsertSiblingBeforeCommand = new DelegateCommand <object>(InsertSiblingBeforeExecute);
                this.InsertSiblingAfterCommand  = new DelegateCommand <object>(InsertSiblingAfterExecute);
                this.AddChildCommand            = new DelegateCommand <object>(AddChildExecute);
                this.LeavePageTreeCommand       = new DelegateCommand <object>(LeavePageTreeExecute);
                this.DuplicatePageCommand       = new DelegateCommand <object>(DuplicateNodeExecute);
                this.DuplicateFolderCommand     = new DelegateCommand <object>(DuplicateNodeExecute);
                this.DuplicateBranchCommand     = new DelegateCommand <object>(DuplicateBranchExecute);
                this.PageClickCommand           = new DelegateCommand <object>(PageClickExecute);
                this.DeleteSearchCommand        = new DelegateCommand <object>(DeleteSearchExecute);
                this.SourceUpdatedCommand       = new DelegateCommand <object>(PageTreeUpdatedExecute);

                NodeInfo = new NodeInfo();
                NodeInfo.SelectedNodeChanged += (s, e) => RefreshCommands();
                RootNode = new NodeViewModel(_document, _undoManager, null, NodeInfo, true);

                // CreateDefaultPages();

                _ListEventAggregator.GetEvent <DomLoadedEvent>().Subscribe(DomLoadedEventHandler, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <PagePreviewEvent>().Subscribe(PagePreviewEventHandler, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <SelectionPageChangeEvent>().Subscribe(SelectionPageChangeHandler, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <AddNewPageEvent>().Subscribe(AddPageRequestExecute, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <FocusSitemapEvent>().Subscribe(FocusSitemapExecute, ThreadOption.UIThread);
                _ListEventAggregator.GetEvent <SiteMapEvent>().Subscribe(OnSiteMapEvent, ThreadOption.UIThread);
            }
        }
Exemple #3
0
        public PageEditorViewModel(Guid pageGID)
        {
            //IconSource = ISC.ConvertFromInvariantString(@"pack://application:,,/Images/document.png") as ImageSource;
            _pageGID = pageGID;
            _model   = new PageEditorModel(pageGID);

            _copyTime = 0;
            Title     = "page";
            ContentId = pageGID.ToString();

            //Register the Routed Command Handler,20140306
            _commandSink = new CommandSink();
            _commandSink.RegisterCommand(ApplicationCommands.Copy, param => CanRunCopyCommand, CopyCommanddHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Paste, param => CanRunPasteCommand, PasteCommanddHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Cut, param => CanRunCutCommand, CutCommanddHandler);
            _commandSink.RegisterCommand(EditingCommands.Delete, param => CanRunDeleteCommand, DeleteCommanddHandler);

            _commandSink.RegisterCommand(EditingCommands.AlignLeft, param => CanRunAlignLeftCommand, AlignLeftCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.AlignRight, param => CanRunAlignRightCommand, AlignRightCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.AlignCenter, param => CanRunAlignCenterCommand, AlignCenterCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.AlignJustify, param => CanRunAlignJustifyCommand, AlignJustifyCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextTop, param => CanRunAlignTopCommand, AlignTopCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextBottom, param => CanRunAlignBottomCommand, AlignBottomCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextMiddle, param => CanRunAlignTextMiddleCommand, AlignTextMiddleCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Family, param => CanRunFontFamilyCommand, FontFamilyCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Size, param => CanRunFontSizeCommand, FontSizeCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.ToggleBold, param => CanRunFontBoldCommand, FontBoldCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.ToggleUnderline, param => CanRunFontUnderlineCommand, FontUnderlineCommandHandler);
            _commandSink.RegisterCommand(TextCommands.Strikethrough, param => CanRunFontStrikethroughCommand, FontStrikethroughCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Color, param => CanRunFontColorCommand, FontColorCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.ToggleItalic, param => CanRunFontItalicCommand, FontItalicCommandHandler);

            _commandSink.RegisterCommand(BorderCommands.BorderLineColor, param => CanRunBorderLineColorCommand, BorderLineColorCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.BorderLinePattern, param => CanRunBorderLinePatternCommand, BorderLinePatternCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.BorderLineThinck, param => CanRunBorderLineThinckCommand, BorderLineThinckCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.BackGround, param => CanRunBackGroundCommand, ChangeBackGroundCommandHandler);
            _selectionService = ServiceLocator.Current.GetInstance <SelectionServiceProvider>();
        }
        protected void InitCommandSink()
        {
            //Register the Routed Command Handler,Widgets Command
            _commandSink = new CommandSink();
            _commandSink.RegisterCommand(ApplicationCommands.Copy, param => CanRunCopyCommand, CopyCommanddHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Paste, param => CanRunPasteCommand, PasteCommanddHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Cut, param => CanRunCutCommand, CutCommanddHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Undo, param => CanRunUndoCommand, UndoCommandHandler);
            _commandSink.RegisterCommand(ApplicationCommands.Redo, param => CanRunRedoCommand, RedoCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.Delete, param => CanRunDeleteCommand, DeleteCommanddHandler);
            _commandSink.RegisterCommand(ApplicationCommands.SelectAll, param => CanRunSelectAllCommand, SelectAllCommanddHandler);
            _commandSink.RegisterCommand(WidgetsCommands.GroupWidgets, param => CanRunGroupCommand, GroupCommanddHandler);
            _commandSink.RegisterCommand(WidgetsCommands.UngroupWidgets, param => CanRunUnGroupCommand, UnGroupCommanddHandler);
            _commandSink.RegisterCommand(WidgetsCommands.DuplicateWidgets, param => CanRunCopyCommand, DuplicateCommanddHandler);

            //Register the Routed Command Handler,Font Command
            _commandSink.RegisterCommand(TextCommands.AlignTextLeft, param => CanRunAlignTextLeftCommand, AlignTextLeftCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextRight, param => CanRunAlignTextRightCommand, AlignTextRightCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextCenter, param => CanRunAlignTextCenterCommand, AlignTextCenterCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.AlignJustify, param => CanRunAlignJustifyCommand, AlignJustifyCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextTop, param => CanRunAlignTopCommand, AlignTopCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextBottom, param => CanRunAlignBottomCommand, AlignBottomCommandHandler);
            _commandSink.RegisterCommand(TextCommands.AlignTextMiddle, param => CanRunAlignTextMiddleCommand, AlignTextMiddleCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Family, param => CanRunFontFamilyCommand, FontFamilyCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Size, param => CanRunFontSizeCommand, FontSizeCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.IncreaseFontSize, param => CanRunFontSizeCommand, FontSizeIncreaseCommandHandler);
            _commandSink.RegisterCommand(EditingCommands.DecreaseFontSize, param => CanRunFontSizeCommand, FontSizeDecreaseCommandHandler);
            _commandSink.RegisterCommand(TextCommands.UpDownCaseHotKey, param => CanRunUpDownCase, TextUpDownCaseHandler);
            _commandSink.RegisterCommand(FontCommands.Bold, param => CanRunFontBoldCommand, FontBoldCommandHandler);
            _commandSink.RegisterCommand(TextCommands.Strikethrough, param => CanRunFontStrikeThroughCommand, FontStrikeThroughCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Underline, param => CanRunFontUnderlineCommand, FontUnderlineCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Bullet, param => CanRunBulletStyleCommand, BulletStyleCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Color, param => CanRunFontColorCommand, FontColorCommandHandler);
            _commandSink.RegisterCommand(FontCommands.Italic, param => CanRunFontItalicCommand, FontItalicCommandHandler);

            //Register the Routed Command Handler,Border Command
            _commandSink.RegisterCommand(BorderCommands.BorderLineColor, param => CanRunBorderLineColorCommand, BorderLineColorCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.LineArrowStyle, param => CanRunLineArrowStyleCommand, LineArrowStyleCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.BorderLinePattern, param => CanRunBorderLinePatternCommand, BorderLinePatternCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.BorderLineThinck, param => CanRunBorderLineThinckCommand, BorderLineThinckCommandHandler);
            _commandSink.RegisterCommand(BorderCommands.BackGround, param => CanRunBackGroundCommand, ChangeBackGroundCommandHandler);

            _commandSink.RegisterCommand(WidgetsCommands.WidgetsBringFront, param => CanRunWidgetsBringFrontCommand, WidgetsBringFrontCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsBringForward, param => CanRunWidgetsBringForwardCommand, WidgetsBringForwardCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsBringBackward, param => CanRunWidgetsBringBackwardCommand, WidgetsBringBackwardCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsBringBottom, param => CanRunWidgetsBringBottomCommand, WidgetsBringBottomCommandHandler);

            _commandSink.RegisterCommand(WidgetsCommands.WidgetsAlignLeft, param => CanRunWidgetsAlignLeftCommand, WidgetsAlignLeftCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsAlignRight, param => CanRunWidgetsAlignRightCommand, WidgetsAlignRightCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsAlignCenter, param => CanRunWidgetsAlignCenterCommand, WidgetsAlignCenterCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsAlignTop, param => CanRunWidgetsAlignTopCommand, WidgetsAlignTopCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsAlignMiddle, param => CanRunWidgetsAlignMiddleCommand, WidgetsAlignMiddleCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsAlignBottom, param => CanRunWidgetsAlignBottomCommand, WidgetsAlignBottomCommandHandler);

            _commandSink.RegisterCommand(WidgetsCommands.WidgetsIncreaseWidth, param => CanRunWidgetSizeAdjustCommand, WidgetsIncreaseWidthCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsIncreaseHeight, param => CanRunWidgetSizeAdjustCommand, WidgetsIncreaseHeightCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsDecreaseWidth, param => CanRunWidgetSizeAdjustCommand, WidgetsDecreaseWidthCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsDecreaseHeight, param => CanRunWidgetSizeAdjustCommand, WidgetsDecreaseHeightCommandHandler);

            _commandSink.RegisterCommand(WidgetsCommands.WidgetsDistributeHorizontally, param => CanRunWidgetsDistributeHorizontallyCommand, WidgetsDistributeHorizontallyCommandHandler);
            _commandSink.RegisterCommand(WidgetsCommands.WidgetsDistributeVertically, param => CanRunWidgetsDistributeVerticallyCommand, WidgetsDistributeVerticallyCommandHandler);

            //Register the Routed Command Handler,Widget Propery Command
            _commandSink.RegisterCommand(WidgetPropertyCommands.Left, param => CanRunWidgetsLeftChangeCommand, WidgetsLeftChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Top, param => CanRunWidgetsTopChangeCommand, WidgetsTopChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Width, param => CanRunWidgetsWidthChangeCommand, WidgetsWidthChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Height, param => CanRunWidgetsHeightChangeCommand, WidgetsHeightChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Name, param => CanRunWidgetsNameChangeCommand, WidgetsNameChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Rotate, param => CanRunWidgetsRotateChangeCommand, WidgetsRotateChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.CornerRadius, param => CanRunWidgetsCornerRadiusChangeCommand, WidgetsCornerRadiusChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.TextRotate, param => CanRunWidgetsTextRotateChangeCommand, WidgetsTextRotateChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Opacity, param => CanRunWidgetsOpacityChangeCommand, WidgetsOpacityChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Hide, param => CanRunWidgetsHideChangeCommand, WidgetsHideChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.IsFixed, param => CanRunWidgetsIsFixedChangeCommand, WidgetsIsFixedChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Tooltip, param => CanRunWidgetsTooltipChangeCommand, WidgetsTooltipChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.ImportImage, param => CanRunWidgetsImportImageChangeCommand, WidgetsImportImageChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Slice, param => CanRunWidgetsSliceCommand, WidgetsSliceCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Crop, param => CanRunWidgetsCropCommand, WidgetsCropCommandHandler);

            //Hamburger menu command handler
            _commandSink.RegisterCommand(WidgetPropertyCommands.MenuPageLeft, param => CanRunWidgetsLeftChangeCommand, MenuPageLeftChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.MenuPageTop, param => CanRunWidgetsTopChangeCommand, MenuPageTopChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.MenuPageWidth, param => CanRunWidgetsWidthChangeCommand, MenuPageWidthChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.MenuPageHeight, param => CanRunWidgetsHeightChangeCommand, MenuPageHeightChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.MenuPageHide, param => CanRunWidgetsHideChangeCommand, MenuPageHideChangeCommandHandler);


            _commandSink.RegisterCommand(WidgetPropertyCommands.Enable, param => CanRunWidgetsEnableChangeCommand, WidgetsEnableChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.ShowSelect, param => CanRunWidgetsShowSelectChangeCommand, WidgetsShowSelectChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.ButtonAlign, param => CanRunWidgetsButtonAlignChangeCommand, WidgetsButtonAlignCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.RadioGroup, param => CanRunWidgetsButtonAlignChangeCommand, WidgetsRadioGroupSetCommandHandler);

            _commandSink.RegisterCommand(WidgetPropertyCommands.HideBorder, param => CanRunWidgetsEnableChangeCommand, WidgetsHideBorderCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.ReadOnly, param => CanRunWidgetsEnableChangeCommand, WidgetsReadOnlyCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.HintText, param => CanRunWidgetsEnableChangeCommand, WidgetsHintTextCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.MaxLength, param => CanRunWidgetsEnableChangeCommand, WidgetsMaxLengthCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.TextFieldType, param => CanRunWidgetsEnableChangeCommand, WidgetsTextFieldTypeCommandHandler);

            //Register the Toolbar Location Command
            _commandSink.RegisterCommand(WidgetPropertyCommands.AllLeft, param => CanRunWidgetsLeftChangeCommand, WidgetsAllLeftChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.AllTop, param => CanRunWidgetsTopChangeCommand, WidgetsAllTopChangeCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Lock, param => CanRunWidgetsLockCommand, WidgetsLockCommandHandler);
            _commandSink.RegisterCommand(WidgetPropertyCommands.Unlock, param => CanRunWidgetsUnlockCommand, WidgetsUnlockCommandHandler);

            //Register Grid and Guide Command
            _commandSink.RegisterCommand(GridGuideCommands.ShowGrid, param => CanRunGridGuideCommand, ShowGridCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.SnapToGrid, param => CanRunGridGuideCommand, SnaptoGridCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.GridSetting, param => CanRunGridGuideCommand, GridSettingCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.ShowGlobalGuides, param => CanRunGridGuideCommand, ShowGlobalGuidesCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.ShowPageGuides, param => CanRunGridGuideCommand, ShowPageGuidesCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.SnapToGuides, param => CanRunGridGuideCommand, SnapToGuidesCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.LockGuides, param => CanRunGridGuideCommand, LockGuidesCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.CreateGuides, param => CanRunCreateGuideCommand, CreateGuidesCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.DeleteAllGuides, param => CanRunCreateGuideCommand, DeleteAllGuidesCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.GuideSetting, param => CanRunGridGuideCommand, GuidesSettingCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.SnapToObject, param => CanRunGridGuideCommand, SnapToObjectCommandHandler);
            _commandSink.RegisterCommand(GridGuideCommands.ObjectSnapSetting, param => CanRunGridGuideCommand, ObjectSnapSettingCommandHandler);
            _commandSink.RegisterCommand(AppCommands.DefaultStyle, param => CanRunDefaultStyle, DefaultStyleCommandHandler);

            //Flick pannel command handler
            _commandSink.RegisterCommand(FlickCommands.ShowArrow, param => CanRunFlickCommand, FlickShowArrowCommandHandler);
            _commandSink.RegisterCommand(FlickCommands.Circuler, param => CanRunFlickCommand, FlickCirculerCommandHandler);
            _commandSink.RegisterCommand(FlickCommands.Automatic, param => CanRunFlickCommand, FlickAutomaticCommandHandler);
            _commandSink.RegisterCommand(FlickCommands.StartPage, param => CanRunFlickCommand, FlickStartPageCommandHandler);
            _commandSink.RegisterCommand(FlickCommands.Navigation, param => CanRunFlickCommand, FlickNavigationCommandHandler);
            _commandSink.RegisterCommand(FlickCommands.ViewMode, param => CanRunFlickCommand, FlickViewModeCommandHandler);
            _commandSink.RegisterCommand(FlickCommands.PanelWidth, param => CanRunFlickCommand, FlickPanelWidthCommandHander);
            _commandSink.RegisterCommand(FlickCommands.LineWidth, param => CanRunFlickCommand, FlickLineWidthCommandHander);

            _commandSink.RegisterCommand(HanburgerCommands.HideStyle, param => CanRunHamburgerCommand, HamburgerHideStyleCommandHandler);
            _commandSink.RegisterCommand(ToastCommands.ExposureTime, param => CanRunToastCommand, ToastExposureTimeCommandHandler);
            _commandSink.RegisterCommand(ToastCommands.CloseSetting, param => CanRunToastCommand, ToastCloseSettingCommandHandler);
            _commandSink.RegisterCommand(ToastCommands.DisplayPosition, param => CanRunToastCommand, ToastDisplayPositionCommandHandler);
        }