public static MainWindowViewModel CreateInitView() { var result = new MainWindowViewModel(); var tab = new TabContent("Untitled-" + numDocs++, new TextControl()); tabby = tab; result.TabContents.Add(tab); return result; }
public MainWindow() { InitializeComponent(); if (_hackyIsFirstWindow) { context = MainWindowViewModel.CreateInitView(); DataContext = context; } _hackyIsFirstWindow = false; }