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
325
Tab Item Ex not closing
posted

Can you please tell me why tab isn't closing?

<Window x:Class="WpfApplication212.Window6"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window6" Height="300" Width="300" xmlns:igWindows="http://infragistics.com/Windows">
    <Grid>
       
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
       
        <igWindows:XamTabControl x:Name="tabControl">
            <igWindows:TabItemEx Header="tabItemEx" ExecutingCommand="TabItemEx_ExecutingCommand">
                <Grid />
            </igWindows:TabItemEx>
        </igWindows:XamTabControl>
       
        <Button Content="click" Click="Button_Click" Grid.Row="2"></Button>
       
    </Grid>
</Window>

 

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            (tabControl.SelectedItem as TabItemEx).ExecuteCommand(TabItemExCommands.Close);
        }

  • 69686
    posted

    Hello,

    Please try setting the AllowTabClosing property of the XamTabControl to True.