嗨,我在“LabelLink”控件的单击事件上绑定方法时遇到问题。我使用伪 LabelLink 控件,我想每个人都知道这个带有文本框和超链接的解决方案。
这是我的代码:
<TextBlock Margin="10,12,10,4">
<Hyperlink Name="RegLink"
NavigateUri="http://registracia.azet.sk/"
Micro:Message.Attach="[Event Click]=[Action OpenDefaultBrowser(NavigateUri)]"
FontSize="12">Registrácia</Hyperlink>
问题是我只能在框架元素上绑定方法。
我得到这个编译错误:
Cannot attach type "ActionMessage" to type "Hyperlink". Instances of type "ActionMessage" can only be attached to objects of type "FrameworkElement".
我用谷歌搜索,芽没有找到任何合适的解决方案。
感谢您的建议。
我尝试使用 textBlock 或 Label 控件制作一个假的 linkLabel,但它们没有单击事件处理程序。