Home » WPFRSS

Ribbon/RibbonWindow in WPF Ribbon V1 causes Word Crash

I developed a simple Word 2007 addin using VS 2010 VSTO, in the addin I simply want to display WPF RibbonWindow like this:

if (WpfApp == null)
      {
        //I get same result when deleteing the following two lines
        WpfApp = new System.Windows.Application();
        WpfApp.ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown;
      }
      //MainWindow is derived from RibbonWindow
      WpfRibbonApplication1.MainWindow window = new WpfRibbonApplication1.MainWindow();
      window.ShowDialog();

Everything including closing MainWindow seems working fine until I close Word. When closing Word, Word crashed with the following error:

Problem signature:
  Problem Event Name: CLR20r3
  Problem Signature 01: winword.exe
  Problem Signature 02: 12.0.4518.1014
  Problem Signature 03: 45428028
  OS Version: 6.1.7600.2.0.0.256.1
  Locale ID: 1033

Additional information about the problem:
  LCID: 1033
  Brand: Office12Crash
  skulcid: 1033

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

 However if I replace MainWindow with Window1 which derives from Window and contains no Ribbon, the crash won't happen. So I think Ribbon/RibbonWindow causes Word's crash. BTW, I didn't see any problem when I use WPF Ribbon preview version.

Any suggestion? Thanks in advance.


<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter