Skip to content

Commit 68f004c

Browse files
committed
docs: why the edit event handler is not a Command in the ViewModel
1 parent bac9e84 commit 68f004c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Desktop/Project/TasksList.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ public TasksList(TaskListViewModel viewModel)
1919
new TaskCreation(creationViewModel);
2020
}
2121

22+
/// <remarks>
23+
/// This event handler in the code behind complies with the MVVM architectural
24+
/// style: the View (which this code behind is part of) only has concerns of
25+
/// the View.
26+
/// <para>
27+
/// If this event handler had code related with the control of the use
28+
/// case, it will be moved to a ViewModel (since it is its responsibility).
29+
/// </para>
30+
/// </remarks>
2231
private void Edit(object sender, MouseButtonEventArgs e)
2332
{
2433
if (sender is not ListBoxItem { DataContext: Task task })

0 commit comments

Comments
 (0)