Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Commit

Permalink
Drop down menu with users
Browse files Browse the repository at this point in the history
Added property for ComboBox dropdown options/text, property to contain the selected item and Property to act as the relay to the execution button
  • Loading branch information
lsobtafo committed Mar 13, 2024
1 parent d5d5751 commit e818467
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ActiveDirectoryQuerier/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,29 @@ public ICommand ClearConsoleOutputInActiveDirectoryInfoRelay {
*
* Create a property to act as the relay to the execution button.
*/

//NEW CODE
// Property for ComboBox dropdown options/text
public ObservableCollection<string> ActiveDirectoryCommandsList { get; private set; }

// Property to contain the selected item
private string _selectedComboBoxCommand;
public string SelectedComboBoxCommand
{
get => _selectedComboBoxCommand;
set
{
if (_selectedComboBoxCommand != value)
{
_selectedComboBoxCommand = value;
OnPropertyChanged(nameof(SelectedComboBoxCommand));
}
}
}

// Property to act as the relay to the execution button
public ICommand ExecuteCommandRelay { get; }
//NEW CODE
// [ Constructor ] ------------------------------------------------------------- //

public MainWindowViewModel()

Check warning on line 181 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Non-nullable property 'ActiveDirectoryCommandsList' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 181 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Non-nullable field '_selectedComboBoxCommand' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 181 in ActiveDirectoryQuerier/MainWindowViewModel.cs

View workflow job for this annotation

GitHub Actions / build (x64)

Non-nullable property 'ExecuteCommandRelay' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
Expand Down

0 comments on commit e818467

Please sign in to comment.