-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
To retrieve the data that was passed via command parameter one have to use additional steps.
For example:
<fsxaml:EventToCommand Command="{Binding DataContext.SomeMsg, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" CommandParameter="{Binding SomeProp}" /><@ vm.SomeMsg @> |> Bind.cmdParam (unbox<obj*bool> >> fst >> string >> Messages.SomeMsg)because getParameter function looks like:
let getParameter (param : obj) =
match self.CommandParameter, self.PassEventArgsToCommand with
| (null, true) -> self.EventArgsConverter.Convert (param :?> EventArgs) self.EventArgsConverterParameter
| param -> param :> obj maybe it will be better to not include self.PassEventArgsToCommand in the second case?
like
let getParameter (param : obj) =
match self.CommandParameter, self.PassEventArgsToCommand with
| (null, true) -> self.EventArgsConverter.Convert (param :?> EventArgs) self.EventArgsConverterParameter
| p, _ -> p Then it will be consist with docs:
The paramter passed to the ICommand. If this is set, the EventArgs are ignored
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels