public MainWindow() { InitializeComponent(); users = new ObservableCollection<User>(); this.tvUsers.ItemsSource = users; sysConfig = ConfigHelper.GetInstanceFromConfig<SysConfig>(); this.gridUser.DataContext = sysConfig; }
private void Window_Closed(object sender, EventArgs e) { SysConfig sys = this.gridConfig.DataContext as SysConfig; ConfigHelper.SetInstanceToConfig <SysConfig>(sys); }