Hi... I have been looking for this on Stack Overflow, but couldnt find an answer to this yet so I hope this isnt a duplicate...
I have an app using the MVVM pattern, I like to keep things clean, but sometimes a little code behind seems cleaner than the XAML workaround.
I want to know if it is possible to trigger a command from the codebehind.
I have set up a command reference in my view already (see below)
<local:CommandReference
x:Key="CommandReferencePreviewReportsCommand"
Command="{Binding PreviewReportsCommand}" />
What I want to do is be able to trigger the command reference or the ICommand from the c# code behind of the view. Does anyone know how to do this?