Esempio n. 1
0
        private void Tabs_TabClosing(object sender, Microsoft.Toolkit.Uwp.UI.Controls.TabClosingEventArgs e)
        {
            if (ViewModel.ColTabs.Count == 1)
            {
                byte[] bb = new byte[0];
                ViewModel.ColTabs.Add(new VidDoc()
                {
                    Name    = "New File",
                    ccc     = 0,
                    IsShow1 = Visibility.Collapsed
                              //  BiteFile=bb
                });

                //   cout++;

                Tabs.SelectedIndex = 0;
            }

            //  var x = PivotItemsContainer.SelectedIndex;
            //   ViewModel.ColTabs.RemoveAt(0);
            // TabViewNotification.Show("You're closing the '" + e.Tab.Header + "' tab.", 2000);
            //  var f = e.Tab.Tag;
            //TabView tabs1 = (TabView)sender;
            //    tabs1.SelectedIndex = -1;
            //   tabs1.SelectedItem = null;
            //   MessageDialog d = new MessageDialog(tabs1.SelectedIndex.ToString());
            //  await d.ShowAsync();
        }
Esempio n. 2
0
        private void TabDepartement_TabClosing(object sender, Microsoft.Toolkit.Uwp.UI.Controls.TabClosingEventArgs e)
        {
            if (departements.Count() == 1)
            {
                Departement nouveauDepart = new Departement {
                    Nom = "Nouveau département"
                };
                depart.create(nouveauDepart);
                departements.Add(nouveauDepart);
                Tabs.SelectedItem      = nouveauDepart;
                departementSelectionne = nouveauDepart;
            }
            Departement departement = (Departement)e.Item;

            depart.delete(departement);
        }
        private void TabViewItem_Closing(object sender, TabClosingEventArgs e)
        {
            var item = ItemFromContainer(e.Tab);

            var args = new TabClosingEventArgs(item, e.Tab);

            TabClosing?.Invoke(this, args);

            if (!args.Cancel)
            {
                if (ItemsSource != null)
                {
                    _removeItemsSourceMethod?.Invoke(ItemsSource, new object[] { item });
                }
                else
                {
                    Items.Remove(item);
                }
            }
        }
Esempio n. 4
0
        private void TabEC_TabClosing(object sender, Microsoft.Toolkit.Uwp.UI.Controls.TabClosingEventArgs e)
        {
            EC ec = (EC)e.Item;

            EC.delete(ec);
        }