Answer the question
In order to leave comments, you need to log in
Why doesn't Core:InvokeCommandAction work?
Hello. There is such a self-written control element:
<controls:ToggleList x:Name="toggleList" Grid.Row="4" x:Uid="PublishersToggleList" Items="{Binding PublishersList}">
<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="SelectedItemChanged">
<Core:InvokeCommandAction Command="{Binding PublishersChandgedCommand}"
CommandParameter="{Binding SelectedItem, ElementName=toggleList, Mode=OneWay}"/>
</Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</controls:ToggleList>
public RelayCommand<Publisher> PublishersChandgedCommand
{
get
{
return new RelayCommand<Publisher>((arg) =>
{
if (arg != null)
{
SelectByPublisher(arg);
}
});
}
<controls:ToggleList x:Name="toggleList" Grid.Row="4" x:Uid="PublishersToggleList" Items="{Binding AutorList}">
<Interactivity:Interaction.Behaviors>
<Core:EventTriggerBehavior EventName="SelectedItemChanged">
<Core:InvokeCommandAction Command="{Binding AutorListChandgedCommand}"
CommandParameter="{Binding SelectedItem, ElementName=toggleList, Mode=OneWay}"/>
</Core:EventTriggerBehavior>
</Interactivity:Interaction.Behaviors>
</controls:ToggleList>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question