Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="eventArgs"></param>
        private void OnTabViewTabCloseRequested(TabViewTabCloseRequestedEventArgs eventArgs)
        {
            TabUiItem   tabUiItem   = (eventArgs.Item as TabUiItem);
            TabViewItem tabViewItem = (eventArgs.Tab as TabViewItem);

            this.CurrentTabUiItems.Remove(tabUiItem);

            this.CheckTabItemsEmptyTabs();
        }
Exemple #2
0
        private void TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
        {
            sender.TabItems.Remove(args.Tab);

            if (sender.TabItems.Count == 0)
            // no more tabs open, close the application
            {
                Application.Current.Exit();
            }
        }
 // Remove the requested tab from the TabView
 private void Tabs_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     if (sender.TabItems.Count == 1)
     {
         sender.TabItems.Remove(args.Tab);
         var newTab = new TabViewItem();
         newTab.IconSource = new MUXC.SymbolIconSource()
         {
             Symbol = Symbol.Document
         };
         newTab.Header       = "New Tab";
         newTab.IsTapEnabled = true;
         Frame frame = new Frame();
         newTab.Content = frame;
         frame.Navigate(typeof(CodeEditor));
         sender.TabItems.Add(newTab);
     }
     else
     {
         sender.TabItems.Remove(args.Tab);
     }
 }
 private void TabViewItemsSourceSample_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     // Remove the requested MyData object from the collection.
     myDatas.Remove(args.Item as MyData);
 }
Exemple #5
0
 private void TabStrip_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     RemoveTab(args.Item as TabItem);
 }
 protected void TabStrip_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     CloseTab(args.Item as TabItem);
 }
Exemple #7
0
 private void TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     sender.TabItems.Remove(args.Tab);
 }
Exemple #8
0
 private void TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     ProfileTabs.Remove(args.Item as ProfileTab);
 }
 private void Tabs_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs e)
 {
     sender.TabItems.Remove(e.Tab);
 }
Exemple #10
0
 private void TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     ClosePage(args.Tab);
 }
Exemple #11
0
 private async void OnTabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs e)
 {
     await ViewModel.TryCloseTabAsync(e.Item);
 }
 private void OnTabClose(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     tabView.TabItems.Remove(args.Tab);
 }
Exemple #13
0
 private void TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
 {
     Data.CloseTab(args.Tab as ModernTab);
 }