Hi, I have a System.Windows.Control.ListBox, and I would like to select a specific index of it. For example, my listbox is red, white, and blue, and after I read an object/file, I want to select red as the window appears. What is the best way to do that?
public partial class MyWindow : System.Windows.Window
{
public MyWindow()
{
InitializeComponent();
System.Windows.Control.ListBox MyListBox= (ListBox)this.FindName("myListBox");
}
}