private Font GetContentFont(PaletteState state, Font font)
{
// We never do anything for the override states
if (!CommonHelper.IsOverrideState(state))
{
// By default an underline is not added to the short text font
bool underline = false;
// Action to take depends on the link behavior setting
switch (_linkBehavior)
{
case KryptonLinkBehavior.AlwaysUnderline:
underline = true;
break;
case KryptonLinkBehavior.HoverUnderline:
underline = ((state == PaletteState.Tracking) ||
(state == PaletteState.Pressed));
break;
case KryptonLinkBehavior.NeverUnderline:
// Nothing to do
break;
}
// Do we need to add an underline to the font?
if (underline)
font = new Font(font, FontStyle.Underline | font.Style);
}
return font;
}