static Size InvokeMeasureOverride(IntPtr fwe_ptr, Size availableSize, ref MoonError error)
{
FrameworkElement fe = null;
try {
fe = (FrameworkElement)NativeDependencyObjectHelper.Lookup(fwe_ptr);
return(fe.MeasureOverride(availableSize));
} catch (Exception ex) {
try {
if (fe != null)
{
LayoutInformation.SetLayoutExceptionElement(Deployment.Current.Dispatcher, fe);
}
error = new MoonError(ex);
} catch (Exception ex2) {
try {
Console.WriteLine("Leaked exception: {0}", ex2);
} catch {
// Ignore
}
}
}
return(new Size());
}