Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

New Post: Make FloatingWindow modal

$
0
0
I am using AvalonDock control to show my views as tabs. In some cases i want to open a new window instead. At the moment, I'm handling that in the LayoutInitializer:
 public void AfterInsertDocument(LayoutRoot layout, LayoutDocument anchorableShown)
        {

            if(anchorableShown.Content != null && anchorableShown.Content is ViewModelBase)
            {
                var viewModel = ((ViewModelBase)anchorableShown.Content);

                if (viewModel.Type == ViewModelBase.ViewType.Popup)
                {
                    anchorableShown.FloatingWidth = viewModel.PopupWidth;
                    anchorableShown.FloatingHeight = viewModel.PopupHeight;

                    anchorableShown.FloatingTop = viewModel.PopupTop;
                    anchorableShown.FloatingLeft = viewModel.PopupLeft;

                    anchorableShown.Float();
                }
            }
            
        }
That works fine. But I want to have this new floated window as a modal window? And it must not be dockable. I don't know where I can handle that.

Thank you, Markus

Viewing all articles
Browse latest Browse all 2690

Trending Articles