我有像bellow这样的超链接,我通过点击超链接尝试调用命令!
<Hyperlink Command="{Binding ResidentChangeCommand}"
CommandParameter="ChangeMaritalStatus">
<TextBlock Text="history" />
</Hyperlink>
private ICommand _residentChangeCommand;
public ICommand ResidentChangeCommand {
get {
return _residentChangeCommand ?? (_residentChangeCommand = new DelegateCommand<object>(OnResidentChange));
}
}
public void OnResidentChange(object obj) {
WindowResidentCard window = new WindowResidentCard(obj.ToString());
window.ShowDialog();
}
但没有任何反应!什么问题???有任何想法吗!谢的!!!