Skip to content

Commit b01a18d

Browse files
Fix mvvmtk0045 warning for StateContainerViewModel (CommunityToolkit#2400)
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
1 parent 1bcee8c commit b01a18d

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

samples/CommunityToolkit.Maui.Sample/ViewModels/Layouts/StateContainerViewModel.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,28 @@ namespace CommunityToolkit.Maui.Sample.ViewModels.Layouts;
66
public partial class StateContainerViewModel : BaseViewModel
77
{
88
[ObservableProperty]
9-
string? currentState, gridState, noAnimateState, notFoundState, fullPageState;
9+
public partial string? CurrentState { get; set; }
10+
11+
[ObservableProperty]
12+
public partial string? GridState { get; set; }
13+
14+
[ObservableProperty]
15+
public partial string? NoAnimateState { get; set; }
16+
17+
[ObservableProperty]
18+
public partial string? NotFoundState { get; set; }
19+
20+
[ObservableProperty]
21+
public partial string? FullPageState { get; set; }
1022

1123
[ObservableProperty, NotifyCanExecuteChangedFor(nameof(ToggleGridStateCommand))]
12-
bool canGridStateChange = true;
24+
public partial bool CanGridStateChange { get; set; } = true;
1325

1426
[ObservableProperty, NotifyCanExecuteChangedFor(nameof(CycleStatesCommand))]
15-
bool canCycleStateChange = true;
27+
public partial bool CanCycleStateChange { get; set; } = true;
1628

1729
[ObservableProperty, NotifyCanExecuteChangedFor(nameof(ToggleFullPageStateCommand))]
18-
bool canFullPageStateChange = true;
30+
public partial bool CanFullPageStateChange { get; set; } = true;
1931

2032
[ObservableProperty]
2133
public partial bool CanAnimationStateChange { get; set; } = true;

0 commit comments

Comments
 (0)