Hello,
We are using the PrintExtensions class as mentioned in Vlad's post 9 months ago.
Our application is a WinForms app that has an ElementHost we use to load the control. It has started crashing on the following line:
element.Arrange(
new
Rect(
new
Point(0, 0), element.DesiredSize));
It doesn't even throw an exception in Debug mode (F5), it just crashes to desktop. We stepped through the code to identify where the exception occurs and found it on that line. The only other thing I see is some first chance exceptions in the Debug Output window like so right after the exception occurs:
Step into: Stepping over non-user code 'System.Windows.Point.Point'
A first chance exception of type 'System.InvalidOperationException' occurred in PresentationFramework.dll
Step into: Stepping over non-user code 'System.Windows.Threading.ExceptionWrapper.TryCatchWhen'
A first chance exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Step into: Stepping over non-user code 'System.Windows.RoutedEventArgs.InvokeEventHandler'
Step into: Stepping over non-user code 'System.Windows.RoutedEventArgs.InvokeHandler'
Step into: Stepping over non-user code 'System.Windows.UIElement.RaiseEventImpl'
Step into: Stepping over non-user code 'System.Windows.RoutedEventArgs.InvokeHandler'
Step into: Stepping over non-user code 'System.Windows.UIElement.ReRaiseEventAs'
Step into: Stepping over non-user code 'System.Windows.RoutedEventArgs.InvokeHandler'
Step into: Stepping over non-user code 'System.Windows.UIElement.RaiseEventImpl'
Step into: Stepping over non-user code 'System.Windows.UIElement.RaiseEvent'
Step into: Stepping over non-user code 'System.Windows.Threading.Dispatcher.InvokeImpl'
Step into: Stepping over non-user code 'System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop'
Step into: Stepping over non-user code 'System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner'
Step into: Stepping over non-user code 'SchedApp.SchedAppFrame.Dispose'
Step into: Stepping over non-user code 'System.ComponentModel.Component.Dispose'
Step into: Stepping over non-user code 'System.Windows.Forms.ApplicationContext.Dispose'
Step into: Stepping over non-user code 'System.Windows.Forms.Application.ThreadContext.DisposeThreadWindows'
Step into: Stepping over non-user code 'System.Windows.Forms.Application.ThreadContext.Dispose'
I'm not quite sure where to look for more information. So the FrameworkElement coming into the FixedDocument is of type Telerik.Windows.Controls.RadGridView, is the Arrange method being overridden? How would I troubleshoot what looks like an exception in the System.Windows.Point.Point structure?