public MainWindowViewModel() { TextFiles = new ObservableCollection<TextFile>(); if (DesignerProperties.GetIsInDesignMode(Application.Current.MainWindow)) { } Current = this; }