public static void SetState(Hyperlink h, HyperlinkState state, Brush foregroundBrush = null) { h.TargetName = state.ToString(); if (state == HyperlinkState.Accent) { HyperlinkHelper.SetAccentStyleForHyperlink(h); } else { HyperlinkHelper.SetAccentStyleForHyperlink(h); } }
public static void SetState(Hyperlink h, HyperlinkState state, Brush foregroundBrush = null) { h.TargetName = (state.ToString()); if (state != HyperlinkState.Accent) { if (state == HyperlinkState.MatchForeground) { HyperlinkHelper.SetForegroundStyleForHyperlink(h, foregroundBrush as SolidColorBrush); } else { HyperlinkHelper.SetAccentStyleForHyperlink(h); } } else { HyperlinkHelper.SetAccentStyleForHyperlink(h); } }