Exemplo n.º 1
0
        private void ClickCloseButton(object sender, RoutedEventArgs e)
        {
            Button       btn = sender as Button;
            AdminTabItem ti  = btn.TemplatedParent as AdminTabItem;
            TabControl   tc  = ti.Parent as TabControl;

            tc.Items.Remove(ti);
            ВыровнитьШиринуВкладок();
        }
Exemplo n.º 2
0
        private void Bd_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
            Border       bd = sender as Border;
            AdminTabItem ti = bd.TemplatedParent as AdminTabItem;

            TabControl tc = ti.Parent as TabControl;

            tc.Items.Remove(ti);
            ВыровнитьШиринуВкладок();
        }