Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public void InternalClick(Hyperlink element)
 {
     Contract.Assert(element != null);
     AssertInputable(element);
     element.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, element));
 }