Hi
I have a LayoutDocumentPane and I need to track the contained layoutDocument that has focus (IsLastFocusedDocument==true) when ever it changes. The method should also work when the layoutdocuments have been undocked.
Currently my solution is to assign a propertyChanged event to each layoutdocument and then filter using the below code:
var tmp = dockingManager.Layout.Descendents().OfType(); int numDoc = tmp.Count(); for (int i = 0; i < numDoc; i++) if (tmp.ElementAt(i).IsLastFocusedDocument) updateSomething();
but when doing this the event assigned to each layoutdocument will call the updateSomethin() method which should only be called once. Can someone please tell me how to do this ?
Thx