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
75
Responding to close event on XamTabControl
posted

How do i wire up an event to the TabHeaderClose button on a XamTabControl, so that I can do a "Do you want to save" before the tab is closed.

Parents
No Data
Reply
  • 54937
    Offline posted

    The TabItemEx.Closing event is a bubble routed event so you can handle it on the TabItemEx or the xamTabControl by either adding a handler for this event in code or in xaml.

    e.g. to handle this on the tabcontrol:

        <igWindows:XamTabControl 
            igWindows:TabItemEx.Closing="XamTabControl_Closing" 
            ShowTabHeaderCloseButton="True">
     
     
    private void XamTabControl_Closing(object sender, Infragistics.Windows.Controls.Events.TabClosingEventArgs e)
    {
        TabItemEx tab = e.OriginalSource as TabItemEx;
     
        // TODO
    }
Children