Ejemplo n.º 1
0
        private void AddCategorie_Click(object sender, RoutedEventArgs e)
        {
            AddCategorieButton.Visibility = Visibility.Collapsed;
            ViewModel.ModeOuverture       = ModeOuvertureGestionCategorieEnum.OuvertureAjouterCategorie;
            GridChangeLibelle.Visibility  = Visibility.Visible;
            GridListe.Visibility          = Visibility.Collapsed;

            LibelleTextBox.Focus(FocusState.Keyboard);
        }
Ejemplo n.º 2
0
        private void EditCategorie_Clic(object sender, RoutedEventArgs e)
        {
            ((AppBarButton)sender).IsEnabled = false;
            ViewModel.ModeOuverture          = ModeOuvertureGestionCategorieEnum.OuvertureModifierCategorie;

            var categorie = ((AppBarButton)sender).Tag as Categorie;

            if (categorie != null)
            {
                ViewModel.SelectedCategorie = categorie;
                ViewModel.LibelleSelected   = categorie.Libelle;
            }

            GridChangeLibelle.Visibility  = Visibility.Visible;
            GridListe.Visibility          = Visibility.Collapsed;
            AddCategorieButton.Visibility = Visibility.Collapsed;
            LibelleTextBox.Focus(FocusState.Keyboard);
            ((AppBarButton)sender).IsEnabled = true;
        }