Esempio n. 1
0
        public FloatWindowTest()
        {
            InitializeComponent();

            _dockControlViewModel = new DockControlViewModel(new TestDockStrategy());
            DockControl1.DataContext = _dockControlViewModel;
        }
Esempio n. 2
0
        public MainViewModel()
        {
            Themes = new List<string>
            {
                "Default",
                "System",
                "Light",
                "Gray",
                "Dark",
            };
            SelectedThemeIndex = 3;

            // Build dock layout directly.
            //var dockTabPaneViewModel = new DockTabPaneViewModel();
            //dockTabPaneViewModel.Items.Add(new SystemViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new SystemViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new DigitalRuneViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new DigitalRuneViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new PropertyGridViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new PropertyGridViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new ICSharpDevelopViewModel { DockState = DockState.Dock });
            //dockTabPaneViewModel.Items.Add(new ICSharpDevelopViewModel { DockState = DockState.Dock });

            //var dockAnchorPaneViewModel = new DockAnchorPaneViewModel
            //{
            //    ChildPane = dockTabPaneViewModel
            //};

            //DockControlViewModel = new DockControlViewModel(new DockStrategy())
            //{
            //    RootPane = dockAnchorPaneViewModel
            //};

            // Or use DockStrategy to do the same.
            var dockStrategy = new DockStrategy();
            DockControlViewModel = new DockControlViewModel(dockStrategy)
            {
                RootPane = new DockAnchorPaneViewModel(),
            };
            dockStrategy.Begin();
            dockStrategy.Dock(new SystemViewModel());
            dockStrategy.Dock(new SystemViewModel());
            dockStrategy.Dock(new DigitalRuneViewModel());
            dockStrategy.Dock(new DigitalRuneViewModel());
            dockStrategy.Dock(new PropertyGridViewModel());
            dockStrategy.Dock(new PropertyGridViewModel());
            dockStrategy.Dock(new ICSharpDevelopViewModel());
            dockStrategy.Dock(new ICSharpDevelopViewModel());
            dockStrategy.End();
        }