How do I show a MessaegBox after my main Window and it’s contents are all loaded and visible?

Use the Dispatcher object to make your method run after all the ‘background’ operations are completed, as follows: public Window1() { InitializeComponent(); this.Dispatcher.BeginInvoke(DispatcherPriority.Background, new SomeMethodDelegate(DoSomething)); } private delegate void SomeMethodDelegate(); private void DoSomething() { MessageBox.Show(‘Everything is loaded.’); }

How do I move the focus to a ListViewItem that could also be out of view?

You can do so as follows: [C#] this.myList.SelectedItem = o; // In case the item is out of view. If so, the next line could cause an exception without bringing this item to view. myList.ScrollIntoView(this.myList.SelectedItem); ListViewItem lvi = (ListViewItem)myList.ItemContainerGenerator.ContainerFromIndex(myList.SelectedIndex); lvi.Focus();

Why do my SelectedValue bindings don’t work in the ComboBox?

One reason your binding to the SelectedValue may not work is if you have manually added ComboBoxItems as follows: [XAML] <ComboBox Name=’mycombo’ SelectedValue='{Binding Path=operator, Mode=TwoWay}’ Width = ’50’> <ComboBoxItem Content=”></ComboBoxItem> <ComboBoxItem>EQ</ComboBoxItem> <ComboBoxItem>NE</ComboBoxItem> <ComboBoxItem>CH</ComboBoxItem> <ComboBoxItem>GE</ComboBoxItem> <ComboBoxItem>LE</ComboBoxItem> </ComboBox> Instead, set the ItemsSource property to a list of strings as follows and the SelectedValue data binding will work fine: [XAML] <Window.Resources> <src:MyList x:Name=’myList’ x:Key=’myList’></src:MyList> </Window.Resources> <ComboBox Name=’mycombo’ SelectedValue='{Binding Path=Code, Mode=TwoWay}’ ItemsSource='{StaticResource myList}’ Width = ’50’ Height=’30’ > Code Behind: [C#] public class MyList : List { public MyList() { this.Add(”); this.Add(‘EQ’); this.Add(‘NE’); this.Add(‘CH’); this.Add(‘GE’); this.Add(‘LE’); } }

How do I bind the ListBox to a collection Property in my Window?

With a listbox like this defined in your XAML: [XAML] <ListBox x:Name=’myLB’ ></ListBox> You can do so in your code-behind as follows: [C#] public MyWindow() { InitializeComponent(); Binding binding = new Binding(); binding.Source = this; PropertyPath path = new PropertyPath(‘ListSource’); binding.Path = path; // Setup binding: BindingOperations.SetBinding(this.myLB, ListBox.ItemsSourceProperty, binding); } public string[] ListSource { get { return new string[] { ‘testing’, ‘test1’ };} }