Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class App : Application
- {
- /// <summary>
- /// WPF bug or smth else... Fixed in net fx 4.5 but in 4.6.1 not o_O
- /// COM exception in datagrid copypaste
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
- {
- var comException = e.Exception as System.Runtime.InteropServices.COMException;
- if (comException != null && comException.ErrorCode == -2147221040)
- e.Handled = true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement