I've got an issue with validation on a datagrid stealing focus back to the
row with the validation error which is leaving a Popup open on the page.
The popup is created in a user control which is being instantiated when you
edit a cell in the datagrid. It's a bit of a weird issue but the end result
is if you have a validation error the popup that was supposed to open is
left open but is not in its normal position.

As a work around in the constructor of the usercontrol we've put this;

var items = VisualTreeHelper.GetOpenPopups();
foreach (var popup in items)
{
    popup.IsOpen = false;
}

There doesn't seem to be a way to close the popup, rather than hide it.

Anyone know if the popup is closed if it will be garbage collected or will
it hang around for the life of the app?


Debug.WriteLine("Popups: " + items.Count());


I put a debug line to show the count and it never seems to go over 1 popup
that has to be closed, which makes sense the others have already been
closed. Would prefer to kill them but they have no parent.

cheers,
Stephen
_______________________________________________
ozsilverlight mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight

Reply via email to