WPF: Binding to commands in code behind
- by sofri
Hi,
I have an WPF Microsoft Surface Applikation and I'm using MVVM-Pattern.
I have some buttons that are created in code behind.
And I would like to bind commands to them but I only know how that works in the XAML
like this:
<Custom:SurfaceButton Command="{Binding SaveReservationCommandBinding, Mode=OneWay}"/>
But I cannot do it like…