private void EditItemsToggleSwitchChecked(object sender, System.Windows.RoutedEventArgs e) { AcceptButton.IsEnabled = true; CancelButton.IsEnabled = true; DeleteButton.IsEnabled = true; FirstNameLabel.IsEnabled = true; LastNameLabel.IsEnabled = true; UsernameLabel.IsEnabled = true; UserTypeLabel.IsEnabled = true; PasswordChangeLabel.IsEnabled = true; EmailAddressLabel.IsEnabled = true; FirstNameTextBox.IsEnabled = true; LastNameTextBox.IsEnabled = true; UsernameTextBox.IsEnabled = true; EmailAddressTextBox.IsEnabled = true; UserTypeComboBox.IsEnabled = true; PasswordChangeToggleSwitch.IsEnabled = true; MainGroupBoxGrid.BlurDisable(); ButtonsGrid.BlurDisable(); DeleteButton.IsEnabled = (Utility.AdminUserId == _currentId) ? false : true; }
private void EditItemsToggleSwitchChecked(object sender, System.Windows.RoutedEventArgs e) { var TextBoxes = MainGroupBoxGrid.Children .OfType <System.Windows.Controls.TextBox>() .AsEnumerable() ; var TextEdites = MainGroupBoxGrid.Children .OfType <DevExpress.Xpf.Editors.TextEdit>() .AsEnumerable() ; var Lables = MainGroupBoxGrid.Children .OfType <System.Windows.Controls.Label>() .AsEnumerable() ; var Buttons1 = ButtonsGrid.Children .OfType <DevExpress.Xpf.Core.SimpleButton>() .AsEnumerable() ; var Buttons2 = MemberButtonsGrid.Children .OfType <DevExpress.Xpf.Core.SimpleButton>() .AsEnumerable() ; foreach (System.Windows.Controls.TextBox textbox in TextBoxes) { textbox.IsEnabled = true; } foreach (DevExpress.Xpf.Editors.TextEdit textedit in TextEdites) { textedit.IsEnabled = true; } foreach (System.Windows.Controls.Label label in Lables) { label.IsEnabled = true; } foreach (DevExpress.Xpf.Core.SimpleButton button in Buttons1) { button.IsEnabled = true; } foreach (DevExpress.Xpf.Core.SimpleButton button in Buttons2) { button.IsEnabled = true; } GendersCombobox.IsEnabled = true; MemberImage.IsEnabled = true; if (MembersGridControl.ItemsSource != null) { MainGroupBoxGrid.BlurDisable(); ButtonsGrid.BlurDisable(); } }