Skip to content

VS TabItem #2090

@ghost

Description

Hi,

Sorry but how do i get this VS TabItem to close i have tried the following:

<TabControl Name="tabControlMain" Margin="0,10,0,0" xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls">
                <Controls:MetroTabItem Header=""
                         CloseButtonEnabled="True"
                         CloseTabCommand="{Binding CloseTabCommand}"
                         CloseTabCommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Header}" />
            </TabControl>
private void CloseTabCommand(object sender, CanExecuteRoutedEventArgs e)
        {
            if (tabControlMain.Items.Count > 0)
                tabControlMain.Items.Remove(tabControlMain.Items[tabControlMain.SelectedIndex]);
        }

But its not showing vs style and if i don't use Controls i cant use CloseTabCommand

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions