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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can I prevent the pivotgrid from calling the loaded event before these properties are initialized

Platform: WPF |
Control: PivotGridControl
Tags: general, wpf

The PivotGrid Loaded event was called before the PivotGrid gets initialized which leads the event to be deal with null InternalGrid and we hereby let you know that the properties of the GroupingBar or InternalGrid can be accessed only after the PivotGrid gets initialized. We have two solutions to prevent calling the Loaded Event prior to initialization of PivotGrid.


Calling the PivotGrid Loaded Event after InitializeComponent () gets called will resolve this issue as shown in below code:



We have a Dispatcher delegate Event Handler which allows the Event to be handled after the initialization. The code snippet for the same is shown below:


public MainWindow()




this.pivotGrid1.Loaded += new RoutedEventHandler(pivotGrid1_Loaded);


InitializeComponent(); }




C:\Users\labuser\Dropbox\Screenshots\Screenshot 2014-06-06 10.40.27.png

Figure: A properly loaded Pivot Grid



2X faster development

The ultimate WPF UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile