-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factory.EventValueCommand does not handle null properly..(?) #9
Comments
@ruxo The EventValueCommand is meant to be used where the CommandParameter is of the generic type of the Event type. In this case, it'd mean you'd need a converter to pass the parameter of type What are you trying to do? There are a couple of approaches -
|
I'm interested in Event Stream and trying to do MVC with it (inspired by a blog post from http://marisks.net/). In my real XAML, there is also a <TreeViewItem Header="About sample" Tag="AboutDialog.xaml">
<i:Interaction.Triggers><i:EventTrigger EventName="Selected"><fsx:EventToCommand Command="{Binding EventCommand}" EventArgsConverter="{StaticResource selectConverter}" /> </i:EventTrigger> </i:Interaction.Triggers>
</TreeViewItem> Now I'm trying to use buttons instead of the TreeView. I guess I can use EventTrigger to do the same thing but I'm curious if there is a shorter way to do so. So I have to apply a converter. Do I have to implement it myself (something like |
You'd need to make your own converter. If you inherit |
Just post here for reference: http://stackoverflow.com/questions/335849/wpf-commandparameter-is-null-first-time-canexecute-is-called So the true culprit is setting |
I'm trying to use
EventValueCommand
method ofEventViewModelBase
to create a command for a button. My code look like this:and in my XAML, I have a button that fires that command.
When the button clicks, it does not work. I've debug and found that
navCommand.CanExecute
returnfalse
and the root cause isnull
value is passed into the handle function.I'm not sure if I use the function correctly as it is by designed, or is this supposed to be a defect?
The text was updated successfully, but these errors were encountered: