private void userControl_Loaded(object sender, RoutedEventArgs e) { serverExplorer = this.DataContext as ServerExplorer; string s = Properties.Settings.Default.Connections; if (serverExplorer != null) { serverExplorer.DeserializeConnections(s); } }
private void window_Loaded(object sender, RoutedEventArgs e) { serverExplorer = new ServerExplorer(); serverExplorer.Connected += serverExplorer_Connected; treeView.ItemsSource = serverExplorer; BindingOperations.EnableCollectionSynchronization(serverExplorer, serverLock); // Height = Properties.Settings.Default.WindowHeight; // Width = // = "{Binding WindowHeight, Source={x:Static Properties:Settings.Default}, Mode=TwoWay}" //Width = "{Binding WindowWidth, Source={x:Static Properties:Settings.Default}, Mode=TwoWay}" //Left = "{Binding WindowLeft, Source={x:Static Properties:Settings.Default}, Mode=TwoWay}" //Top = "{Binding WindowTop, Source={x:Static Properties:Settings.Default}, Mode=TwoWay}" }