We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Demo: System.NullReferenceException if started in Visual Studio, not if .exe started from folder


I have a problem with the Ribbon control. 

I've installed Essential Studio WPF in 'C:\Program Files (x86)\Syncfusion\Essential Studio\WPF\' on Windows 10.

If i start the demo project  of the ribbon control  in C:\Users\Public\Documents\Syncfusion\WPF\\Tools.WPF\Samples\Ribbon\Office2016\CS\RibbonSample_2017.sln, i can compile the project in debug/release without any error. The program starts, but when i click on the "minimize/collapse ribbon" icon the program crashes.

Error:  System.NullReferenceException: "The object reference was not set to an object instance."

This does not happen if i start the same .exe in the debug folder directly without visual studio (C:\Users\Public\Documents\Syncfusion\WPF\\Tools.WPF\Samples\Ribbon\Office2016\CS\bin\Debug\RibbonSample.exe

What am i doing wrong? I couldnt find any additional information on the help page.
I get the same behaviour if i set up a new project with the ribbon control and fallow the "getting started" in the help section


Attachment: ribbon_null_error_2f306d3c.zip

1 Reply

JP Jagadeesan Pichaimuthu Syncfusion Team August 26, 2019 06:39 AM UTC

Hi Alexander, 
Thank you for contacting Syncfusion Support. 
It is a known issue related to VS 2017 debugger. The Visual Tree is refreshed at runtime after the Windows 10 fall creator update. Due to this we could not get the children of UIElement (RibbonTab) which causes problem with collection.  

Please refer the following link for the same,
Therefore, we suggest you to disable the “Enable UI Debugging Tools for Xaml” in the options of Debug tab of VS 2017 project (Debug (Tab) > Options > Debugging > General > (Uncheck) Enable UI Debugging Tools for Xaml).  
Please let us know if you need any further assistance on this.    

Live Chat Icon For mobile
Up arrow icon