
Hi,
we have a two-way binding to the SelectedItem property of the TreeListBox. And somehow the SelectedItem is changed when the parent view is focussed. The control is used in a tabbed MDI document. I am not even sure why the TreeListBox receives the focus, when actually another control inside the view should be focused. Anyhow, the SelectedItem should not be affected regardless of the focus.
Do you have an idea, how this behavior can be stopped? Here is a callstack, when the SelectedItem is changed:
PresentationFramework.dll!MS.Internal.Data.PropertyPathWorker.SetValue()
PresentationFramework.dll!System.Windows.Data.BindingExpression.UpdateSource()
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.UpdateValue()
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.ProcessDirty()
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.Dirty()
PresentationFramework.dll!System.Windows.Data.BindingExpressionBase.SetValue()
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon()
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBox.SelectedItem.set()
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBox.m5D()
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBox.z5H()
ActiproSoftware.Grids.Wpf.dll!ActiproSoftware.Windows.Controls.Grids.TreeListBoxItem.OnGotFocus()
PresentationCore.dll!System.Windows.UIElement.IsFocused_Changed()
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged()
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged()
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange()
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue()
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon()
WindowsBase.dll!System.Windows.DependencyObject.SetValue()
PresentationCore.dll!System.Windows.Input.FocusManager.OnFocusedElementChanged()
WindowsBase.dll!System.Windows.DependencyObject.OnPropertyChanged()
PresentationFramework.dll!System.Windows.FrameworkElement.OnPropertyChanged()
WindowsBase.dll!System.Windows.DependencyObject.NotifyPropertyChange()
WindowsBase.dll!System.Windows.DependencyObject.UpdateEffectiveValue()
WindowsBase.dll!System.Windows.DependencyObject.SetValueCommon()
PresentationCore.dll!System.Windows.Input.FocusManager.SetFocusedElement()
PresentationFramework.dll!System.Windows.Input.KeyboardNavigation.UpdateFocusedElement()
PresentationFramework.dll!System.Windows.FrameworkElement.OnGotKeyboardFocus()
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler()
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler()
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl()
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl()
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent()
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput()
PresentationCore.dll!System.Windows.Input.KeyboardDevice.ChangeFocus()
PresentationCore.dll!System.Windows.Input.KeyboardDevice.TryChangeFocus()
PresentationCore.dll!System.Windows.Input.KeyboardDevice.Focus()
PresentationCore.dll!System.Windows.Input.KeyboardDevice.Focus()
PresentationCore.dll!System.Windows.UIElement.Focus()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Internal.GA.SY4()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Internal.GA.UYy()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Internal.GA.pY2()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Internal.GA.fhz()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Internal.GA.TYI()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Internal.GA.fhz()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Windows.Controls.Docking.AdvancedTabControl.jw()
ActiproSoftware.Docking.Wpf.dll!ActiproSoftware.Windows.Controls.Docking.AdvancedTabItem.R23()
ActiproSoftware.Shared.Wpf.dll!ActiproSoftware.Windows.Input.InputAdapter.L1i()
ActiproSoftware.Shared.Wpf.dll!ActiproSoftware.Windows.Input.InputAdapter.b1Y()
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler()
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler()
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl()
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl()
PresentationCore.dll!System.Windows.UIElement.RaiseTrustedEvent()
PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()
PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput()
PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput()
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput()
PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage()
PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage()
WindowsBase.dll!MS.Win32.HwndWrapper.WndProc()
WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation()
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall()
WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen()
WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl()
WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc()
[Native to Managed Transition]
[Managed to Native Transition]
WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl()
PresentationFramework.dll!System.Windows.Application.RunDispatcher()
PresentationFramework.dll!System.Windows.Application.RunInternal()
Best regards, Tobias Lingemann.