microsoft / XamlBehaviors

This is the official home for UWP XAML Behaviors on GitHub.
MIT License
697 stars 112 forks source link

Invokecommandaction invalid #138

Open HaoLife opened 5 years ago

HaoLife commented 5 years ago

Hyperlink and InvokeCommandAction are used together with the Binding.

            <Hyperlink>
                <Hyperlink.Inlines>
                    <Run Text="test"/>
                </Hyperlink.Inlines>
                <interactivity:Interaction.Behaviors>
                    <local:EventTriggerBehavior EventName="Click">
                        <local:InvokeCommandAction Command="{Binding TestCommand}" CommandParameter="{x:Bind Title}"  />
                    </local:EventTriggerBehavior>
                </interactivity:Interaction.Behaviors>
            </Hyperlink>

CommandProperty won't take effect. CommandParameterProperty effective

I don't know why he is invalid, but Hyperlinkbutton can.