locked
Infragistic MenuItem Bold when ever user clicks RRS feed

  • Question

  •  Hi Every-one,

    I have Created a Menu and Menu-items  &  I need to Highlight Menu-item  bold by default and when ever other

    Menu-item Selected it needs to be highlighted ...i have 10 Menus each having minimum 4-5 Menuitems ...

    "Click" Event backend i need to have lot of events ..Can any one Please help me on it...Please find the below code

                       

       <ig:OutlookBarGroup Key="IssuesGroup"

                                        Header="ISSUES"

                                        IsSelected="True"

                                        Style="{StaticResource SelectedGroupStyle}">

                        <ig:XamMenu x:Name="mnuView" MenuOrientation="Vertical">

                            <ig:XamMenuItem x:Name="mnuAutomationTeam"

                                            Click="mnuAutomationTeam_Click"

                                            FontWeight="Bold"

                                            Foreground="Red"

                                            Header="Automation Team"

                                            Tag="Automation" />

                            <ig:XamMenuItem x:Name="mnuLCTeam"

                                            Click="mnuLCTeam_Click"

                                            Header="LC Team"

                                            Tag="LCTeam" />

                            <ig:XamMenuItem x:Name="mnuAnalysis"

                                            Header="Analysis"

                                            Tag="Analysis" />

                            <ig:XamMenuItem x:Name="mnuHazmat"

                                            Header="Hazmat"

                                            Tag="Hazmat" />

                            <ig:XamMenuItem x:Name="mnuBittingTeam"

                                            Header="Bitting Team"

                                            Tag="BittingTeam" />

                        </ig:XamMenu>

                    </ig:OutlookBarGroup>


    Thursday, January 3, 2013 2:53 AM

Answers

All replies

  • Why are you creating a separate event handler. you are assigning each item a Tag. Just check for the Tag in the Event handler e.g. 

    MenuItemclicked

    and do the processing. like the code below:

    private void MenuItemclicked(object sender, RoutedEventArgs e)
          {
             Button btnClicked = (Button)sender;
             if (btnClicked != null)
             {
                switch (btnClicked.Tag.ToString())
                {
                   case "Automation":
                      // do open
                      break;
                   case "LCTeam":
                      //do close
                      break;
                   case "Analysis":
                      // Do display
                      break;
                }
             }
          }

    About the highlight. Can you please elaborate on the expected result.

    Thursday, January 3, 2013 10:00 AM
  • Hi 

    Thanks for the reply.

    i have Main menu Like Tree View, Issues is made bold /highlighted when select ,now sub menu items like "Automation" ,LC Team and Analysis i need to bold /highlight when user clicks ..by default when "ISSUES" is selected Automation should be bold and rest should work vice versa...

    eg

    Issues 

    Automatio

            LC Team

    Analysis

    when LC Team clicked

    Issues 

           Automation

            LC Team

    Analysis

       


    Thursday, January 3, 2013 2:32 PM
  • Hi Lohith Kumar SR,

    Since you are using Infragistic menuItem, then please post you question to it's forum

    http://www.infragistics.com/community/forums/default.aspx?GroupID=67

    Best Regards


    Mark Yu - MSFT
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by iwpfModerator Monday, January 14, 2013 5:33 AM
    Friday, January 11, 2013 7:18 AM
    Moderator