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); }
Hello,
Please try setting the AllowTabClosing property of the XamTabControl to True.