예제 #1
0
        public static MainWindowViewModel CreateInitView()
        {
            var result = new MainWindowViewModel();

            var tab = new TabContent("Untitled-" + numDocs++, new TextControl());
            tabby = tab;
            result.TabContents.Add(tab);

            return result;
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            if (_hackyIsFirstWindow)
            {
                context = MainWindowViewModel.CreateInitView();
                DataContext = context;   
            }

            _hackyIsFirstWindow = false;

        }