public AddArduinoView() { InitializeComponent(); ComboBox_ports.ItemsSource = SerialStream.GetPorts(); if (ComboBox_ports.Items.Count > 0) { ComboBox_ports.SelectedIndex = ComboBox_ports.Items.Count - 1; } }