[Refactor] Replace backing fields with auto-properties in view models

This commit is contained in:
2025-11-24 01:40:50 +00:00
parent e9842195e1
commit 5fe7f574d6
12 changed files with 57 additions and 73 deletions

View File

@@ -37,7 +37,6 @@ public sealed partial class FileViewViewModel : ViewModelBase
string _informationalVersion;
[ObservableProperty]
bool _isStatusVisible;
FileModel? _selectedFile;
[ObservableProperty]
string _status;
@@ -62,10 +61,10 @@ public sealed partial class FileViewViewModel : ViewModelBase
public FileModel? SelectedFile
{
get => _selectedFile;
get;
set
{
SetProperty(ref _selectedFile, value);
SetProperty(ref field, value);
OnPropertyChanged(nameof(IsFileInfoAvailable));
OnPropertyChanged(nameof(SelectedFileIsNotDirectory));
OnPropertyChanged(nameof(SelectedFileLength));