public SerialPortSelect()
 {
     InitializeComponent();
     if (this.DataContext != null)
     {
         ViewModel = (SerialPortSelectViewModel)this.DataContext;
     }
 }
 private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     ViewModel = (SerialPortSelectViewModel)this.DataContext;
 }