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); } }); }
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); } }); }