private bool CanExecuteDockCommand(object parameter) { if (LayoutElement == null) { return(false); } return(LayoutElement.FindParent <LayoutAnchorableFloatingWindow>() != null); }
private bool CanExecuteAutoHideCommand(object parameter) { if (LayoutElement == null) { return(false); } return(LayoutElement.FindParent <LayoutAnchorableFloatingWindow>() == null && _anchorable.CanAutoHide); }
private bool CanExecuteMoveToPreviousTabGroupCommand(object parameter) { if (LayoutElement == null) { return(false); } var parentDocumentGroup = LayoutElement.FindParent <LayoutDocumentPaneGroup>(); var parentDocumentPane = LayoutElement.Parent as LayoutDocumentPane; return(parentDocumentGroup != null && parentDocumentPane != null && parentDocumentGroup.ChildrenCount > 1 && parentDocumentGroup.IndexOfChild(parentDocumentPane) > 0 && parentDocumentGroup.Children[parentDocumentGroup.IndexOfChild(parentDocumentPane) - 1] is LayoutDocumentPane); }
private bool CanExecuteNewVerticalTabGroupCommand(object parameter) { if (LayoutElement == null) { return(false); } var parentDocumentGroup = LayoutElement.FindParent <LayoutDocumentPaneGroup>(); var parentDocumentPane = LayoutElement.Parent as LayoutDocumentPane; return((parentDocumentGroup == null || parentDocumentGroup.ChildrenCount == 1 || parentDocumentGroup.Root.Manager.AllowMixedOrientation || parentDocumentGroup.Orientation == System.Windows.Controls.Orientation.Horizontal) && parentDocumentPane != null && parentDocumentPane.ChildrenCount > 1); }
private bool CanExecuteMoveToNextTabGroupCommand(object parameter) { if (LayoutElement == null) { return(false); } var parentDocumentGroup = LayoutElement.FindParent <LayoutDocumentPaneGroup>(); var parentDocumentPane = LayoutElement.Parent as LayoutDocumentPane; return((LayoutElement.Root == null || LayoutElement.Root.Manager.AllowChangeLayout) && parentDocumentGroup != null && parentDocumentPane != null && parentDocumentGroup.ChildrenCount > 1 && parentDocumentGroup.IndexOfChild(parentDocumentPane) < parentDocumentGroup.ChildrenCount - 1 && parentDocumentGroup.Children[parentDocumentGroup.IndexOfChild(parentDocumentPane) + 1] is LayoutDocumentPane); }
private bool CanExecuteDockAsDocumentCommand(object parameter) { return(LayoutElement != null && LayoutElement.FindParent <LayoutDocumentPane>() == null); }
private bool CanExecuteFloatCommand(object anchorable) { return(LayoutElement != null && LayoutElement.CanFloat && LayoutElement.FindParent <LayoutFloatingWindow>() == null); }
private bool CanExecuteDockAsDocumentCommand(object parameter) { return(LayoutElement != null && (LayoutElement.Root == null || LayoutElement.Root.Manager.AllowChangeLayout) && LayoutElement.FindParent <LayoutDocumentPane>() == null); }
private bool CanExecuteFloatCommand(object anchorable) { return(LayoutElement != null && (LayoutElement.Root == null || LayoutElement.Root.Manager.AllowChangeLayout) && LayoutElement.CanFloat && LayoutElement.FindParent <LayoutFloatingWindow>() == null); }
protected virtual bool CanExecuteDockAsDocumentCommand() { return(LayoutElement != null && LayoutElement.FindParent <LayoutDocumentPane>() == null); }