mono/xwt — pull request #253 by DavidKarlas (2013-10-25 21:36:59+00:00)
Title: Fixing Issue #235 

Here are 2 problems fixed. 1. TreeView problem with overwriting selected values at Loaded event with default Items[0] value. Now this is checked with if (SelectedItems.Count == 0) and 2. Not selecting TreeItem because Item was selected before TreeItem created because WPF is LazyLoading TreeItems for Items after Loaded event... Now we register for ItemContainerGenerator_StatusChanged which is fired when TreeItem is lazyloaded so we check with ContainerFromObject(SelectedItems[0]) != null if our item is loaded and if it is we reselect it to make it visible...