コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }