Exemplo n.º 1
0
 public void enableLink(SymLink link)
 {
     MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(
         delegate(object sender, System.Windows.Input.MouseButtonEventArgs args)
     {
         try
         {
             NavigateTo(link.filename, link.line, link.column);
         }
         catch { }
     });
     MouseEnter += new System.Windows.Input.MouseEventHandler(
         delegate(object sender, System.Windows.Input.MouseEventArgs args)
     {
         TextDecorations.Add(System.Windows.TextDecorations.Underline);
     });
     MouseLeave += new System.Windows.Input.MouseEventHandler(
         delegate(object sender, System.Windows.Input.MouseEventArgs args)
     {
         foreach (var td in System.Windows.TextDecorations.Underline)
         {
             TextDecorations.Remove(td);
         }
     });
 }
Exemplo n.º 2
0
 public void enableLink()
 {
     MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(
         delegate(object sender, System.Windows.Input.MouseButtonEventArgs args)
     {
         // Text = "clicked!";
     });
     MouseEnter += new System.Windows.Input.MouseEventHandler(
         delegate(object sender, System.Windows.Input.MouseEventArgs args)
     {
         TextDecorations.Add(System.Windows.TextDecorations.Underline);
     });
     MouseLeave += new System.Windows.Input.MouseEventHandler(
         delegate(object sender, System.Windows.Input.MouseEventArgs args)
     {
         foreach (var td in System.Windows.TextDecorations.Underline)
         {
             TextDecorations.Remove(td);
         }
     });
 }