Completed
Last Updated: 14 Oct 2019 09:03 by ADMIN
Release LIB 2019.3.1014
Martin Ivanov
Created on: 11 Sep 2019 12:24
Category: LayoutControl
Type: Bug Report
1
LayoutControl: Data bindings are not evaluated when changing between tabs

Properties bound with UpdateSourceTrigger=LostFocus in the content of LayoutControlTabGroupItem are not updated when changing the selected tab. The LostFocus event is fired after the data context of the corresponding element is removed and the issue appears.

To work this around subscribe to the PreviewMouseLeftButtonDown event of LayoutControlTabGroup and Focus the pressed tab (the new selection).

private void LayoutControlTabGroup_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
	var tabContainers = this.layoutTabGroup.ChildrenOfType<LayoutControlTabGroupItem>();
	var tabUndersMouse = tabContainers.FirstOrDefault(x => x.IsMouseOver);
	if (tabUndersMouse != null)
	{
		tabUndersMouse.Focus();
	}
}

0 comments