How to bind navigate uri to uxmenubar?

6 replies. Last post: June 7, 2011 5:01 AM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
xu guochunMember

I use mvvm mode to bind itemsource to uxmenu bar. 

<Intersoft:UXMenuBar ItemsSource="{Binding Items}" DisplayMemberPath="Text"  ImageMemberPath="Icon" CollectionMemberPath="SubItems"  Style="{StaticResource UXMenuBarStyle1}" Visibility="{Binding HasLogin}"
    >

When i run my project,i can see the menu item generated properly.But how can i bind the navigate uri to menuitem?

Here is the viewmodel code:

ObservableCollection<MenuItem> mi = new ObservableCollection<MenuItem>();

 foreach (Module nm in mRet)
            {
               mi.Add(new MenuItem()
                {
                    Text=nm.MoudleMenuName==""?nm.ModuleName:nm.MoudleMenuName,
                    Icon="Images/"+nm.SmallIconAddress,
                    NavUri=nm.ModuleUrl,
                    ModuleCode=nm.ModuleCode,
                    SubItems = this.GetThisLevelMenuItem(nLevel + 1, nm.ModuleCode)

                });            
            }

 

All times are GMT -5. The time now is 3:14 AM.
Previous Next