The code looks well. Do you create the menu structure before the binding, or the Items collections are filled after the page is loaded (for example after a response from a web service)? Since you are using simple List<MenuItem>, RadMenu will not receive notifications if it changes after the control is data-bound for the first time. I would recommend trying to change the List<MenuItem> with ObservableCollection<MenuItem>. You could also check our online examples, that demonstrate the same technique: http://demos.telerik.com/silverlight/#Menu/DataBinding
If this does not help I would need a simple project that could be used to observe the problem.
All the best,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
PlannerTagSerializable ob = (PlannerTagSerializable)sender;
PlannerTagSerializable is my class that contain Pk_TagId.
answered on 11 Aug 2014, 01:01 PM
Can share some more details - how do you use the mentioned ItemsSource? However I assume you might need to reach the DataContext of the TextBlock. The sender in the MouseLeftButtonDown event handler there would be the TextBlock, so you might need to check in the TextBlock DataContext as shown below:
var vm = txtBlock.DataContext as ViewModel; // this is the ViewModel class name
// PlannerTagSerializable ob = (PlannerTagSerializable)sender;
Hope this helps.
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.