WPF Why Use MVVM? [closed]

1 day ago 4
ARTICLE AD BOX

Why does WPF adopt the MVVM pattern, and why must the view model be designed so that it does not know about the view?

<Button Content="Transaction" Margin="10" Style="{StaticResource MaterialDesignRaisedButton}" Command="{Binding NavigateToTransactionsCommand}" > </Button>

Why use a command? Is this not good enough?

<Button Content="Transaction" Margin="10" Style="{StaticResource MaterialDesignRaisedButton}" <Button Click="OpenTransactions" /> > </Button>

What is OpenTransactions()?

Read Entire Article