Пример #1
0
        static Size InvokeArrangeOverride(IntPtr fwe_ptr, Size finalSize, ref MoonError error)
        {
            FrameworkElement fe = null;

            try {
                fe = (FrameworkElement)NativeDependencyObjectHelper.Lookup(fwe_ptr);
                return(fe.ArrangeOverride(finalSize));
            } 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());
        }