Beispiel #1
0
        void _application_OnShowDockableWindow(IDockableWindow window)
        {
            if (!_anchorables.ContainsKey(window))
                return;

            LayoutAnchorable anchorable = _anchorables[window];
            if (anchorable != null)
            {
                if (anchorable.IsAutoHidden)
                {
                    anchorable.ToggleAutoHide();
                }
                else
                {
                    LayoutContent content = anchorable;
                    while (content != null && content.Parent is ILayoutContentSelector)
                    {
                        ILayoutContentSelector selector = (ILayoutContentSelector)content.Parent;
                        int index = selector.IndexOf(content);
                        if (index != selector.SelectedContentIndex)
                            selector.SelectedContentIndex = index;
                        content = content.Parent as LayoutContent;
                    }

                    anchorable.Show();
                    if (anchorable.IsVisible == false)
                    {
                        //if (anchorable.CanFloat)
                        //    anchorable.Float();
                        //else
                            anchorable.Dock();
                    }
                }
            }
        }