Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
XamTabItemEx Right-click context menu options.
posted

Hi,

I have a Xamtabcontrol to which I dynamically add Tab items .

I need to display options for close tab, open in new window etc as options when they right -click on the header part of the TabItemEx.

How do I accomplish this?

Thanks!

Parents
  • 69686
    Verified Answer
    posted

    Doesn't a standard context menu work for you?

    TabItemEx tabItem = new TabItemEx();

    tabItem.ContextMenu = this.FindResource("myContextmenu") as ContextMenu;

    where :

           <ContextMenu x:Key="myContextmenu">

                <MenuItem Header="option 1"/>

                <MenuItem Header="option 2"/>

            </ContextMenu>

Reply Children
No Data