Beispiel #1
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new DataCont();
     {
         PortsBox.SelectedIndex    = 1;
         BaudRateBox.SelectedIndex = 3;
         ParityBox.SelectedIndex   = 0;
         DataBitsBox.SelectedIndex = 1;
         StopBitsBox.SelectedIndex = 1;
     }
 }
Beispiel #2
0
 private void RefreshBtn_Click(object sender, RoutedEventArgs e)
 {
     DataContext = new DataCont();
     PortsBox.GetBindingExpression(ComboBox.ItemsSourceProperty)
     .UpdateTarget();
 }