RecipeEditViewModel.cs 815 B

123456789101112131415161718192021222324252627282930313233343536
  1. namespace RecipeModule.Dialogs.ViewModels;
  2. internal partial class RecipeEditViewModel : ObservableObject, IDialogAware
  3. {
  4. public DialogCloseListener RequestClose { get; }
  5. [ObservableProperty]
  6. private string? _Title;
  7. [ObservableProperty]
  8. private ImageSource? _ImageSource;
  9. [ObservableProperty]
  10. private ObservableCollection<string>? _TempTest;
  11. public bool CanCloseDialog()
  12. {
  13. return true;
  14. }
  15. public void OnDialogClosed()
  16. {
  17. }
  18. public void OnDialogOpened(IDialogParameters parameters)
  19. {
  20. this.Title = "Recipe Edit";
  21. this.ImageSource = (DrawingImage)Application.Current.Resources["Icon_Recipe"];
  22. this.TempTest = [];
  23. TempTest.Add("0 StandBy");
  24. TempTest.Add("1 Name");
  25. TempTest.Add("2 End");
  26. }
  27. }