Ejemplo n.º 1
0
        public bool BeforeInsertAnchorable(LayoutRoot layout, LayoutAnchorable anchorableToShow, ILayoutContainer destinationContainer)
        {
            if (destinationContainer != null &&
                destinationContainer.FindParent<LayoutFloatingWindow>() != null)
            {
                return false;
            }

            foreach (var viewModelPane in ViewModelPanes)
            {
                if (viewModelPane.Item1.IsInstanceOfType(anchorableToShow.Content))
                {
                    var pane = layout
                        .Descendents()
                        .OfType<LayoutAnchorablePane>()
                        .SingleOrDefault(p => p.Name == viewModelPane.Item2);

                    if (pane != null)
                    {
                        pane.Children.Add(anchorableToShow);

                        if (viewModelPane.Item3)
                        {
                            anchorableToShow.ToggleAutoHide();
                        }

                        return true;
                    }
                }
            }

            return false;
        }
 internal void _ExecuteAutoHideCommand(LayoutAnchorable _anchorable)
 {
     _anchorable.ToggleAutoHide();
 }
Ejemplo n.º 3
0
		internal void _ExecuteAutoHideCommand(LayoutAnchorable _anchorable)
		{
			_anchorable.ToggleAutoHide();
			OnLayoutConfigurationChanged();
		}