private Color CheckForContextColor(PaletteState state)
{
// We need an associated ribbon tab
if (_ribbonTab != null)
{
// Does the ribbon tab have a context setting?
if (!string.IsNullOrEmpty(_ribbonTab.ContextName))
{
// Find the context definition for this context
KryptonRibbonContext ribbonContext = _ribbon.RibbonContexts[_ribbonTab.ContextName];
// Should always work, but you never know!
if (ribbonContext != null)
return ribbonContext.ContextColor;
}
}
return Color.Empty;
}