protected override Size ArrangeOverride(Size finalSize)
{
if (_hwndSource != null && _hwndSource.RootVisual != null) {
UIElement root = (UIElement)_hwndSource.RootVisual;
// We are a simple pass-through element.
root.Arrange(new Rect(finalSize));
return root.RenderSize;
} else {
// We don't have a child yet.
return finalSize;
}
}