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

MenuItemAdv command binding

Thread ID:

Created:

Updated:

Platform:

Replies:

98230 Feb 15,2011 06:50 PM Feb 23,2011 05:03 AM Silverlight 4
loading
Tags: Tools
Keith Reimer
Asked On February 15, 2011 06:50 PM

Hi, I'm trying to use the HierarchicalDataTemplate with command binding and I can't figure out how to bind the command for the items created by the template.

I set the Command on the parent MenuItemAdv, but it only gets called when the parent gets clicked - not when any of its children gets click. That makes sense, but I don't see any other place to bind the command for the templated child items, though.














Where can I bind the command that the children in the hierarchical data call?

Thanks,
Keith



Keith Reimer
Replied On February 15, 2011 07:12 PM

I tried it like this as well:






Which gave me the binding for the command, but then I get an unhandled exception on the click:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; FDM; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; MS-RTC LM 8; eMusic DLM/4; Zune 4.0)
Timestamp: Wed, 16 Feb 2011 00:11:14 UTC


Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Shared.MenuItemAdv.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonDown(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

Line: 54
Char: 13
Code: 0
URI: file:///C:/Users/Keith/Documents/Visual%20Studio%202010/Projects/Sync9MenuTest/Sync9MenuTest/Bin/Debug/Sync9MenuTestTestPage.html





Keith Reimer
Replied On February 15, 2011 07:14 PM

I attached a simple repro project to demonstrate.



Sync9MenuTest_cc8466ff.zip

Keith Reimer
Replied On February 21, 2011 10:30 PM

Can someone take a look at this please? It will soon be a blocking issue for us. Thanks!


Sakthi Kumar A [Syncfusion]
Replied On February 23, 2011 05:03 AM

Hi Keith,

We are able to reproduce the MenuItemAdv command binding issue and we have logged a defect report internally. We have also created a new incident #77537 in our Direct-Trac system, so that we would be able to share the patch details with you. Please refer to the Direct – Trac incident for any further inquiries.

Regards,
Sakthi



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.

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.

;