Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Prism 4.1 can't use InvokeCommandAction

$
0
0

I develop WPF desktop application.

I am trying to use InvoiceCommandAction for binding Close event to command

I read here

http://msdn.microsoft.com/en-us/library/gg405471%28v=pandp.40%29

<TextBox><i:Interaction.Triggers><i:EventTrigger EventName="KeyUp"><prism:InvokeCommandAction Command="{Binding MyCommand}" /></i:EventTrigger></i:Interaction.Triggers></TextBox> 

But the main question what should be in i set ?

1. I added reference to

Microsoft.Practices.Prism.Interactivity.dll

2. And I set

xmlns:i="clr-namespace:Microsoft.Practices.Prism.Interactivity;assembly=Microsoft.Practices.Prism.Interactivity"

But it wrote that Interaction.Triggers doesn't exists in this namespace.

Also I am truing to find sample which using it in 4.1. But there is no such example. Can you give some example on WPF which use to bind Close event to command.

Also Iam trying using code from here

http://stackoverflow.com/questions/3683450/handling-the-window-closing-event-with-wpf-mvvm-light-toolkit

<i:Interaction.Triggers><i:EventTrigger EventName="Closing"><command:EventToCommand Command="{Binding WindowClosing}" /></i:EventTrigger></i:Interaction.Triggers>




My .NET Extras. Coming soon : MVVM Dialog Service, EmptyIfNull ( LINQ ), CombineAsPath, Easy File Size Info


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>