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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MenuAdv crashes webpages it is used on

Thread ID:

Created:

Updated:

Platform:

Replies:

95951 Aug 12,2010 01:55 AM UTC Aug 17,2010 03:37 AM UTC Silverlight 1
loading
Tags: Tools
Thanos Mantas
Asked On August 12, 2010 01:55 AM UTC

Hello,

When using the MenuAdv (and subsequently MenuItemAdv) Silverlight tool, the page that the MenuAdv is used on crashes on startup. This happens before any of the page content is rendered for the user.

The exception that is being thrown is as follows:
Line: 54
Error: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfucsion.Windows.Shared.MenuAdv.OnApplyTemplate()
at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)

Now, this is happening in very simple pages. An example of the XAML that uses the MenuAdv is as follows:









Is the "Template" field in MenuAdv mandatory? If so, how should it be used? This does not seem like a solution, because MenuAdvDemo.xaml seems to function normally without specifying the "Template" field.

Any help would be much appreciated.

Take care,
-Thanos

David C [Syncfusion]
Replied On August 17, 2010 03:37 AM UTC

[Updated on 8/13/2010 7:29 AM by: David C ][Updated Type : Other Information ]

Hi Thanos,

Sorry for the inconvenience. We have analyzed your query and prepared the small sample based on the given code snippet. We are not able to reproduce the issue when we try to run the project. It works fine without any crash. We have attached the sample here which illustrates this. If you feel that still the issue persists could you please modify the sample to reproduce the issue ?. It would be helpful to find an accurate solution.

Sample :-

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=MenuAdvSample2129948464.zip

Please let us know if you have any queries.

Regards,
David C


[Updated on 8/13/2010 3:42 PM by: thanos_mantas@bestech.com]


Hello David,

I am unable to run your example, as it was build in a newer version of Visual Studio (I currently have Visual Studio 2008) with Expression Blend 3. It is worth knowing that we are using Silverlight 3. This might impact this issue, as I believe you have separate libraries for these versions.

I have taken your example, almost word for word, yet my application still crashes with the same error that I outlined earlier.

To give you more context, I'm placing the MenuAdv in a UserControl called "FileMenuBar.xaml", my MainPage.xaml "imports" the menu by calling:


Where "local" is defined as xmlns:local="clr-namespace:MyProject" in the tag.

Please advise,
-Thanos



[Updated on 8/16/2010 8:57 AM by: David C ][Updated Type : Other Information ]

Hi Thanos,

Now we have created the project in VS 2008 with the code snippet you have provided. Still we are not able to reproduce the issue in MenuAdv. It runs in the browser without any crash. We have attached the sample below which illustrates this. If you feel that still the issue persists, could you please modify the sample to reproduce the issue or update us with the new sample to reproduce the issue?. It would be helpful to find an accurate solution for the issue.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=SilverlightApplication1756634365.zip

Please let us know if you have any queries.

Regards,
David C

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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

;