void RaiseHyperlinkClick(System.Windows.Documents.Hyperlink hyperlink) { RoutedEventArgs click = new RoutedEventArgs(System.Windows.Documents.Hyperlink.ClickEvent, hyperlink); hyperlink.RaiseEvent(click); ICommand command = hyperlink.Command; if (command != null && command.CanExecute(hyperlink.CommandParameter) && hyperlink.IsEnabled) { command.Execute(hyperlink.CommandParameter); } }
public void InternalClick(Hyperlink element) { Contract.Assert(element != null); AssertInputable(element); element.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, element)); }