Skip to content

Commit a0c7fec

Browse files
authored
Remove command initialization from constructor
Removed constructor initialization for commands.
1 parent f3e626b commit a0c7fec

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Avalonia.Samples/MVVM/CommandSample/ViewModels/CommunityToolkitCommandsViewModel.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ namespace CommandSample.ViewModels;
1515
/// </remarks>
1616
public partial class CommunityToolkitCommandsViewModel : ObservableObject // Note: Since our ViewModelBase isn't an ObservableObject, we have to specify it on our own. This may be different on your side.
1717
{
18-
// We can use the constructor to initialize the Commands.
19-
public CommunityToolkitCommandsViewModel()
20-
{
21-
// Init OpenThePodBayDoorsDirectCommand
22-
OpenThePodBayDoorsDirectCommand = new RelayCommand(OpenThePodBayDoors);
23-
}
24-
2518
/// <summary>
2619
/// This command will ask HAL-9000 to open the pod bay doors
2720
/// </summary>

0 commit comments

Comments
 (0)