diff --git a/Documents/Help/Changelog.md b/Documents/Help/Changelog.md
index 9adbf18d0..9748f81e5 100644
--- a/Documents/Help/Changelog.md
+++ b/Documents/Help/Changelog.md
@@ -3,6 +3,7 @@
=======
## 2024-11-xx - Build 2411 - November 2024
+* Resolved [#1356](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1356), **[Breaking Change]** AppButton colours don't change while switching themes
* Resolved [#1301](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1301), **[Regression]** When Maximised - intergrated KryptonRibbon has titlebar issues
* Resolved [#1383](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1383), Closing last Page in undocked page group prevents addition of further Pages via `KryptonDockingManager.AddToWorkspace` (fix courtesy of [stizler](https://github.com/stigzler))
* Resolved [#1336](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1336), **[Regression]** KryptonForm has "Black Line" under Titlebar when maximised
diff --git a/README.md b/README.md
index a8034758b..6f0dbcbe0 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,6 @@
-
* [NuGet Information](#nuget-information)
* [Nightly](#nightly)
* [Canary](#canary)
@@ -180,6 +179,8 @@ Follow the links to see the different objects and layouts that this framework al
## V90.## (2024-11-xx - Build 2411 - November 2024)
There are list of changes that have occurred during the development of the V90.## version
+- [#1356](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1356), AppButton colours don't change while switching themes
+- - See https://github.com/Krypton-Suite/Standard-Toolkit/issues/1356#issuecomment-2039412890
- [#1206](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1206), Remove the `Font Size` (as it is already covered by the actual font !)
- [#1224](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1224), Move `GlobalPaletteMode` into `GlobalPalette` and rename
- BaseFont is now part of the KryptonManager class, and will override the applied palette font(s)
diff --git a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs
index b7af4010f..63f28a2a4 100644
--- a/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs
+++ b/Source/Krypton Components/Krypton.Navigator/ButtonSpecs/ButtonSpecNavRemap.cs
@@ -134,7 +134,7 @@ public ButtonSpecNavRemap(PaletteBase target,
{
Debug.Assert(buttonSpec != null);
- _buttonSpec = buttonSpec;
+ _buttonSpec = buttonSpec!;
_remapTarget = remapTarget;
}
#endregion
diff --git a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs
index e97cf1d24..838ae3718 100644
--- a/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs
+++ b/Source/Krypton Components/Krypton.Navigator/Palette/PaletteRibbonGeneralRedirect.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -39,7 +37,7 @@ public PaletteRibbonGeneralNavRedirect([DisallowNull] PaletteRedirect redirect,
NeedPaint = needPaint;
// Store the inherit instances
- _inherit = new PaletteRibbonGeneralInheritRedirect(redirect);
+ _inherit = new PaletteRibbonGeneralInheritRedirect(redirect!);
// Set default values
_textFont = null;
@@ -225,37 +223,15 @@ public Color GetRibbonTabRowBackgroundSolidColor(PaletteState state) =>
public float GetRibbonTabRowGradientRaftingAngle(PaletteState state) =>
_inherit.GetRibbonTabRowGradientRaftingAngle(state);
- #endregion
-
- #region RibbonTabRowGradientColor1
-
- ///
- public Color GetRibbonTabRowGradientColor1(PaletteState state) => _inherit.GetRibbonTabRowGradientColor1(state);
-
- #endregion
-
- #region RibbonAppButtonDarkColor
-
- ///
- public Color GetRibbonAppButtonDarkColor(PaletteState state) => _inherit.GetRibbonAppButtonDarkColor(state);
-
#endregion
- #region RibbonAppButtonLightColor
+ #region RibbonTabRowGradientColor1
///
- public Color GetRibbonAppButtonLightColor(PaletteState state) => _inherit.GetRibbonAppButtonLightColor(state);
-
- #endregion
-
- #region RibbonAppButtonTextColor
-
- ///
- public Color GetRibbonAppButtonTextColor(PaletteState state) => _inherit.GetRibbonAppButtonTextColor(state);
+ public Color GetRibbonTabRowGradientColor1(PaletteState state) => _inherit.GetRibbonTabRowGradientColor1(state);
#endregion
-
#region GetRibbonShape
///
/// Gets the ribbon shape.
diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbon.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbon.cs
index 7eedb2324..0071a00ec 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbon.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbon.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
- *
+ *
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
- * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
*/
#endregion
@@ -46,12 +44,10 @@ public RibbonButtonSpecAnyCollection(KryptonRibbon owner)
#endregion
#region Static Fields
-
private static readonly MethodInfo _containerSelect;
#endregion
#region Instance Fields
- // Private
private NeedPaintHandler _needPaintGroups;
private VisualPopupMinimized? _minimizedPopup;
private KryptonContextMenu? _kcm;
@@ -100,7 +96,6 @@ public RibbonButtonSpecAnyCollection(KryptonRibbon owner)
private PaletteBackStyle _backInactiveStyle;
private KryptonRibbonTab? _minSelectedTab;
private KryptonRibbonTab? _selectedTab;
-
#endregion
#region Events
@@ -698,7 +693,17 @@ public string SelectedContext
[MergableProperty(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Localizable(true)]
- public RibbonAppButton RibbonAppButton { get; private set; }
+ public RibbonFileAppButton RibbonFileAppButton { get; private set; }
+
+ ///
+ /// Gets the set of ribbon application button display strings.
+ ///
+ [Category(@"Values")]
+ [Description(@"Collection of ribbon 'File app tab' settings.")]
+ [MergableProperty(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ [Localizable(true)]
+ public RibbonFileAppTab RibbonFileAppTab { get; private set; }
///
/// Gets the styles for various ribbon elements.
@@ -1406,7 +1411,7 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
}
// Check if a shortcut is triggered on the application button context menu
- if (RibbonAppButton.AppButtonMenuItems.ProcessShortcut(keyData))
+ if (RibbonFileAppButton.AppButtonMenuItems.ProcessShortcut(keyData))
{
ActionOccurred();
return true;
@@ -2563,7 +2568,9 @@ private void CreateStorageObjects()
_ribbonGeneralInherit = new PaletteRibbonGeneralInheritRedirect(Redirector);
- RibbonAppButton = new RibbonAppButton(this, _ribbonGeneralInherit);
+ RibbonFileAppButton = new RibbonFileAppButton(this);
+ RibbonFileAppTab = new RibbonFileAppTab(this);
+
RibbonStyles = new PaletteRibbonStyles(this, NeedPaintPaletteDelegate);
StateCommon = new PaletteRibbonRedirect(Redirector, PaletteBackStyle.PanelClient, NeedPaintPaletteDelegate);
StateDisabled = new PaletteRibbonDisabled(StateCommon, NeedPaintPaletteDelegate);
@@ -2598,7 +2605,7 @@ private void CreateViewManager()
CaptionArea = new ViewDrawRibbonCaptionArea(this, Redirector, NeedPaintDelegate);
// Create tabs area containing the tabs, pendant buttons etc...
- TabsArea = new ViewLayoutRibbonTabsArea(this, Redirector, CaptionArea, CaptionArea.ContextTitles!, NeedPaintDelegate);
+ TabsArea = new ViewLayoutRibbonTabsArea(this, Redirector, CaptionArea, CaptionArea.ContextTitles, NeedPaintDelegate);
// Create groups area containing the groups of the selected tab
GroupsArea = new ViewLayoutRibbonGroupsArea(this, Redirector, _needPaintGroups);
diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonQATButton.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonQATButton.cs
index d8957b698..b8e601f0a 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonQATButton.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Controls Ribbon/KryptonRibbonQATButton.cs
@@ -253,7 +253,7 @@ public string Text
[Bindable(true)]
[Category(@"Appearance")]
[Description(@"Color to draw as transparent in the ToolTipImage.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[Localizable(true)]
public Color ToolTipImageTransparentColor { get; set; }
diff --git a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupAppMenu.cs b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupAppMenu.cs
index 4fa9238fc..b7bb3a4c1 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupAppMenu.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Controls Visuals/VisualPopupAppMenu.cs
@@ -1,14 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
@@ -34,11 +30,11 @@ internal class VisualPopupAppMenu : VisualPopup
#endregion
#region Identity
+
///
/// Initialize a new instance of the VisualPopupAppMenu class.
///
/// Owning ribbon instance.
- /// Originating app button instance.
/// Local palette setting to use initially.
/// Palette mode setting to use initially.
/// Redirector used for obtaining palette values.
@@ -46,7 +42,6 @@ internal class VisualPopupAppMenu : VisualPopup
/// Screen location of the lower half of the app button.
/// Was the context menu activated by a keyboard action.
public VisualPopupAppMenu(KryptonRibbon ribbon,
- RibbonAppButton appButton,
PaletteBase? palette,
PaletteMode paletteMode,
PaletteRedirect redirector,
@@ -72,7 +67,7 @@ public VisualPopupAppMenu(KryptonRibbon ribbon,
// Create provider instance
_provider = new AppButtonMenuProvider((ViewContextMenuManager)ViewManager,
- _ribbon.RibbonAppButton.AppButtonMenuItems,
+ _ribbon.RibbonFileAppButton.AppButtonMenuItems,
_viewColumns, palette, paletteMode,
redirector, NeedPaintDelegate);
@@ -82,12 +77,12 @@ public VisualPopupAppMenu(KryptonRibbon ribbon,
CreateAppButtonBottom();
CreateButtonSpecView();
- CreateContextMenuView(appButton);
+ CreateContextMenuView(_ribbon.RibbonFileAppButton);
CreateRecentDocumentsView();
CreateInnerBacking(CreateInsideCanvas());
CreateOuterBacking();
CreateOutsideDocker();
- CreateButtonManager(appButton);
+ CreateButtonManager(_ribbon.RibbonFileAppButton);
// With keyboard activate we select the first valid item
if (keyboardActivated)
@@ -100,7 +95,7 @@ private void CreateButtonSpecView() =>
// Layout docker used to contain the generated button specs
_viewButtonSpecDocker = new ViewLayoutDocker();
- private void CreateContextMenuView(RibbonAppButton appButton)
+ private void CreateContextMenuView(RibbonFileAppButton fileAppButton)
{
// Ask the top level collection to generate the child view elements
var topCollection = new KryptonContextMenuCollection();
@@ -109,7 +104,7 @@ private void CreateContextMenuView(RibbonAppButton appButton)
ImageColumn = false
};
topCollection.Add(topItems);
- foreach (KryptonContextMenuItemBase item in appButton.AppButtonMenuItems)
+ foreach (KryptonContextMenuItemBase item in fileAppButton.AppButtonMenuItems)
{
topItems.Items.Add(item);
}
@@ -119,7 +114,7 @@ private void CreateContextMenuView(RibbonAppButton appButton)
private void CreateRecentDocumentsView()
{
// Do we need to add the recent docs view?
- if (_ribbon.RibbonAppButton.AppButtonShowRecentDocs)
+ if (_ribbon.RibbonFileAppButton.AppButtonShowRecentDocs)
{
// Create a dummy vertical menu separator for separating recent documents from menu items
var dummySep1 = new KryptonContextMenuSeparator
@@ -127,7 +122,7 @@ private void CreateRecentDocumentsView()
Horizontal = false
};
_viewColumns.Add(new ViewDrawMenuSeparator(dummySep1, _provider.ProviderStateCommon.Separator));
- _viewColumns.Add(new ViewLayoutSeparator(0, _ribbon.RibbonAppButton.AppButtonMinRecentSize.Height));
+ _viewColumns.Add(new ViewLayoutSeparator(0, _ribbon.RibbonFileAppButton.AppButtonMinRecentSize.Height));
// Use a layout that draws the background color of the recent docs area
var recentDocsBack = new ViewDrawRibbonAppMenuDocs(_ribbon);
@@ -138,7 +133,7 @@ private void CreateRecentDocumentsView()
recentDocsBack.Add(documentStack);
// Use fixed width separator to enforce a minimum width to column
- documentStack.Add(new ViewLayoutSeparator(_ribbon.RibbonAppButton.AppButtonMinRecentSize.Width, 0));
+ documentStack.Add(new ViewLayoutSeparator(_ribbon.RibbonFileAppButton.AppButtonMinRecentSize.Width, 0));
// Add the recent document title
documentStack.Add(new ViewDrawRibbonRecentDocs(_ribbon));
@@ -150,9 +145,9 @@ private void CreateRecentDocumentsView()
// Then generate an item per recent document entry
var index = 1;
- foreach (KryptonRibbonRecentDoc recentDoc in _ribbon.RibbonAppButton.AppButtonRecentDocs)
+ foreach (KryptonRibbonRecentDoc recentDoc in _ribbon.RibbonFileAppButton.AppButtonRecentDocs)
{
- documentStack.Add(new ViewDrawRibbonAppMenuRecentDec(_ribbon, _provider, recentDoc, _ribbon.RibbonAppButton.AppButtonMaxRecentSize.Width, NeedPaintDelegate, index++));
+ documentStack.Add(new ViewDrawRibbonAppMenuRecentDec(_ribbon, _provider, recentDoc, _ribbon.RibbonFileAppButton.AppButtonMaxRecentSize.Width, NeedPaintDelegate, index++));
}
// Add separator entry which is then used to fill remained space
@@ -212,10 +207,10 @@ private void CreateOutsideDocker()
ViewManager!.Root = _drawOutsideDocker;
}
- private void CreateButtonManager(RibbonAppButton appButton)
+ private void CreateButtonManager(RibbonFileAppButton fileAppButton)
{
_buttonManager = new ButtonSpecManagerLayoutAppButton((ViewContextMenuManager)ViewManager!,
- this, Redirector, appButton.AppButtonSpecs, null,
+ this, Redirector, fileAppButton.AppButtonSpecs, null,
[_viewButtonSpecDocker],
[_ribbon.StateCommon],
[PaletteMetricInt.None],
@@ -235,11 +230,12 @@ protected override void Dispose(bool disposing)
if (disposing)
{
// Must unhook from the palette paint event
- if (_palette != null)
+ if (_palette != null!)
{
_palette.PalettePaint -= OnPaletteNeedPaint;
_palette.BasePaletteChanged -= OnBaseChanged;
_palette.BaseRendererChanged -= OnBaseChanged;
+ _palette = null!;
}
if (_buttonManager != null!)
@@ -334,7 +330,7 @@ public override bool DoesCurrentMouseDownEndAllTracking(Message m, Point pt)
if (_appButtonBottom.Visible)
{
// If mouse is over the top half of the button (which is in the non-client area of
- // the owner ribbon) then we do not want to end all tracking from this method. Otherwise
+ // the owner ribbon) then we do not want to end all tracking from this method. Otherwise,
// if the mouse is inside the bottom half of the button then we do end tracking!
if (RectangleToClient(_rectAppButtonTopHalf).Contains(pt))
{
@@ -489,7 +485,7 @@ private void SetPalette(PaletteBase palette)
if (palette != _palette)
{
// Unhook from current palette events
- if (_palette != null)
+ if (_palette != null!)
{
_palette.PalettePaint -= OnPaletteNeedPaint;
_palette.BasePaletteChanged -= OnBaseChanged;
@@ -500,13 +496,13 @@ private void SetPalette(PaletteBase palette)
_palette = palette;
// Update redirector to use palette as source for obtaining values
- if (Redirector != null)
+ if (Redirector != null!)
{
Redirector.Target = _palette;
}
// Hook to new palette events
- if (_palette != null)
+ if (_palette != null!)
{
// Get the renderer associated with the palette
Renderer = _palette.GetRenderer();
@@ -519,7 +515,7 @@ private void SetPalette(PaletteBase palette)
private void OnBaseChanged(object sender, EventArgs e) =>
// Change in base renderer or base palette require we fetch the latest renderer
- Renderer = _palette?.GetRenderer();
+ Renderer = _palette.GetRenderer();
private void OnButtonSpecPaint(object sender, NeedLayoutEventArgs e) => OnNeedPaint(sender, new NeedLayoutEventArgs(false));
diff --git a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs
index 2ffe2c925..5f3e20f5c 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Designers/Designers/KryptonRibbonDesigner.cs
@@ -1,14 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
@@ -21,7 +17,7 @@ internal class KryptonRibbonDesigner : ParentControlDesigner
private IDesignerHost _designerHost;
private ISelectionService _selectionService;
private IComponentChangeService _changeService;
- private DesignerVerbCollection _verbs;
+ private DesignerVerbCollection _verbs = [];
private DesignerVerb _toggleHelpersVerb;
private DesignerVerb _addTabVerb;
private DesignerVerb _clearTabsVerb;
@@ -95,9 +91,9 @@ public override ICollection AssociatedComponents
compound.AddRange(_ribbon!.ButtonSpecs);
compound.AddRange(_ribbon.QATButtons);
compound.AddRange(_ribbon.RibbonContexts);
- compound.AddRange(_ribbon.RibbonAppButton.AppButtonMenuItems);
- compound.AddRange(_ribbon.RibbonAppButton.AppButtonRecentDocs);
- compound.AddRange(_ribbon.RibbonAppButton.AppButtonSpecs);
+ compound.AddRange(_ribbon.RibbonFileAppButton.AppButtonMenuItems);
+ compound.AddRange(_ribbon.RibbonFileAppButton.AppButtonRecentDocs);
+ compound.AddRange(_ribbon.RibbonFileAppButton.AppButtonSpecs);
// Add all the objects for each tab
foreach (KryptonRibbonTab ribbonTab in _ribbon.RibbonTabs)
@@ -135,9 +131,8 @@ public override DesignerVerbCollection Verbs
get
{
// Create verbs first time around
- if (_verbs == null)
+ if (_verbs.Count == 0)
{
- _verbs = [];
_toggleHelpersVerb = new DesignerVerb(@"Toggle Helpers", OnToggleHelpers);
_addTabVerb = new DesignerVerb(@"Add Tab", OnAddTab);
_clearTabsVerb = new DesignerVerb(@"Clear Tabs", OnClearTabs);
@@ -241,7 +236,7 @@ private void OnSelectedTabChanged(object sender, EventArgs e)
private void UpdateVerbStatus()
{
- if (_verbs != null)
+ if (_verbs.Count != 0)
{
_clearTabsVerb.Enabled = _ribbon!.RibbonTabs.Count > 0;
}
@@ -326,7 +321,7 @@ private void OnRibbonMouseUp(object sender, MouseEventArgs e)
};
_selectionService.SetSelectedComponents(selectionList, SelectionTypes.Auto);
- // Force the layout to be update for any change in selection
+ // Force the layout to be updated for any change in selection
_ribbon?.PerformLayout();
}
}
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs
index cae3365a6..1128bc03d 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/AppButtonToolTipToContent.cs
@@ -1,14 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
@@ -31,7 +27,7 @@ internal class AppButtonToolTipToContent : IContentValues
public AppButtonToolTipToContent([DisallowNull] KryptonRibbon ribbon)
{
Debug.Assert(ribbon != null);
- _ribbon = ribbon;
+ _ribbon = ribbon!;
}
#endregion
@@ -51,26 +47,26 @@ public AppButtonToolTipToContent([DisallowNull] KryptonRibbon ribbon)
///
/// The state for which the image is needed.
/// Image value.
- public Image? GetImage(PaletteState state) => _ribbon.RibbonAppButton.AppButtonToolTipImage;
+ public Image? GetImage(PaletteState state) => _ribbon.RibbonFileAppButton.AppButtonToolTipImage;
///
/// Gets the image color that should be transparent.
///
/// The state for which the image is needed.
/// Color value.
- public Color GetImageTransparentColor(PaletteState state) => _ribbon.RibbonAppButton.AppButtonToolTipImageTransparentColor;
+ public Color GetImageTransparentColor(PaletteState state) => _ribbon.RibbonFileAppButton.AppButtonToolTipImageTransparentColor;
///
/// Gets the content short text.
///
/// String value.
- public string GetShortText() => _ribbon.RibbonAppButton.AppButtonToolTipTitle;
+ public string GetShortText() => _ribbon.RibbonFileAppButton.AppButtonToolTipTitle;
///
/// Gets the content long text.
///
/// String value.
- public string GetLongText() => _ribbon.RibbonAppButton.AppButtonToolTipBody;
+ public string GetLongText() => _ribbon.RibbonFileAppButton.AppButtonToolTipBody;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/ApplicationTabToContent.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/FileApplicationTabToContent.cs
similarity index 66%
rename from Source/Krypton Components/Krypton.Ribbon/Palette/ApplicationTabToContent.cs
rename to Source/Krypton Components/Krypton.Ribbon/Palette/FileApplicationTabToContent.cs
index b98d63c81..effec025e 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Palette/ApplicationTabToContent.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/FileApplicationTabToContent.cs
@@ -1,20 +1,18 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
+using static System.Windows.Forms.AxHost;
+
namespace Krypton.Ribbon
{
- internal class ApplicationTabToContent : RibbonToContent
+ internal class FileApplicationTabToContent : RibbonToContent
{
#region Instance Fields
private readonly KryptonRibbon _ribbon;
@@ -26,7 +24,7 @@ internal class ApplicationTabToContent : RibbonToContent
///
/// Reference to owning ribbon control..
/// Source for general ribbon settings.
- public ApplicationTabToContent(KryptonRibbon ribbon,
+ public FileApplicationTabToContent(KryptonRibbon ribbon,
PaletteRibbonGeneral ribbonGeneral)
: base(ribbonGeneral) =>
_ribbon = ribbon;
@@ -39,28 +37,49 @@ public ApplicationTabToContent(KryptonRibbon ribbon,
///
/// Palette value should be applicable to this state.
/// Color value.
- public override Color GetContentShortTextColor1(PaletteState state) => _ribbon.RibbonAppButton.AppButtonTextColor;
+ public override Color GetContentShortTextColor1(PaletteState state) => RibbonFileAppTabTextColor(state);
///
/// Gets the second color for the short text.
///
/// Palette value should be applicable to this state.
/// Color value.
- public override Color GetContentShortTextColor2(PaletteState state) => _ribbon.RibbonAppButton.AppButtonTextColor;
+ public override Color GetContentShortTextColor2(PaletteState state) => RibbonFileAppTabTextColor(state);
+
+ private Color RibbonFileAppTabTextColor(PaletteState state)
+ {
+ PaletteRibbonFileAppTab palette;
+
+ // Find the correct palette to use that matches the button state
+ switch (state)
+ {
+ default:
+ case PaletteState.Normal:
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ break;
+ case PaletteState.Tracking:
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ break;
+ case PaletteState.Pressed:
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ break;
+ }
+ return palette.GetRibbonFileAppTabTextColor(state);
+ }
///
/// Gets the first color for the long text.
///
/// Palette value should be applicable to this state.
/// Color value.
- public override Color GetContentLongTextColor1(PaletteState state) => _ribbon.RibbonAppButton.AppButtonTextColor;
+ public override Color GetContentLongTextColor1(PaletteState state) => RibbonFileAppTabTextColor(state);
///
/// Gets the second color for the long text.
///
/// Palette value should be applicable to this state.
/// Color value.
- public override Color GetContentLongTextColor2(PaletteState state) => _ribbon.RibbonAppButton.AppButtonTextColor;
+ public override Color GetContentLongTextColor2(PaletteState state) => RibbonFileAppTabTextColor(state);
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRedirectRibbonAeroOverride.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRedirectRibbonAeroOverride.cs
index 8dd06f48a..457554e10 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRedirectRibbonAeroOverride.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRedirectRibbonAeroOverride.cs
@@ -1,14 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
@@ -131,8 +127,6 @@ private Color LightBackground(Color retColor) =>
Math.Min(retColor.G, (byte)60),
Math.Min(retColor.B, (byte)60));
-
-
private bool RibbonShapeIs2010OrHigher() => _ribbon.RibbonShape is PaletteRibbonShape.Office2010 or PaletteRibbonShape.VisualStudio2010 or PaletteRibbonShape.VisualStudio2010 or PaletteRibbonShape.Office2013 or PaletteRibbonShape.Microsoft365 or PaletteRibbonShape.VisualStudio;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonNormal.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonNormal.cs
index 94cd4256c..79e068f76 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonNormal.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonNormal.cs
@@ -36,6 +36,7 @@ public PaletteRibbonNormal(PaletteRibbonRedirect inherit,
NeedPaintHandler needPaint)
: base(inherit, needPaint)
{
+ RibbonFileAppTab = new PaletteRibbonFileAppTab(inherit.RibbonFileAppTab, needPaint);
// Create storage that maps onto the inherit instances
_ribbonGroupCheckBoxText = new PaletteRibbonText(inherit.RibbonGroupCheckBoxText, needPaint);
_ribbonGroupButtonText = new PaletteRibbonText(inherit.RibbonGroupButtonText, needPaint);
@@ -87,6 +88,17 @@ public override void SetInherit(PaletteRibbonRedirect inherit)
}
#endregion
+
+ ///
+ /// Gets the set of ribbon application button display strings.
+ ///
+ [Category(@"Values")]
+ [Description(@"Collection of ribbon 'File app button' settings.")]
+ [MergableProperty(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public virtual PaletteRibbonFileAppTab RibbonFileAppTab { get; }
+ private bool ShouldSerializeRibbonFileAppTab() => !RibbonFileAppTab.IsDefault;
+
#region RibbonGroupCheckBoxText
///
/// Gets access to the ribbon group check box label palette details.
@@ -95,7 +107,6 @@ public override void SetInherit(PaletteRibbonRedirect inherit)
[Description(@"Overrides for defining ribbon group check box label appearance.")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public virtual PaletteRibbonText RibbonGroupCheckBoxText => _ribbonGroupCheckBoxText;
-
private bool ShouldSerializeRibbonGroupCheckBoxText() => !_ribbonGroupCheckBoxText.IsDefault;
#endregion
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs
index b3b528aa7..23f0c719a 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/PaletteRibbonRedirect.cs
@@ -89,46 +89,48 @@ public PaletteRibbonRedirect([DisallowNull] PaletteRedirect redirect,
: base(redirect)
{
Debug.Assert(redirect != null);
-
+ var _redirect = redirect!;
// Store the provided paint notification delegate
NeedPaint = needPaint;
// Create the style redirection instances
- RibbonGroupButton = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
- RibbonGroupClusterButton = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, needPaint);
- RibbonGroupCollapsedButton = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
- RibbonGroupDialogButton = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
- RibbonKeyTip = new PaletteTripleRedirect(redirect, PaletteBackStyle.ControlToolTip, PaletteBorderStyle.ControlToolTip, PaletteContentStyle.LabelKeyTip, needPaint);
- RibbonQATButton = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
- RibbonScroller = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, needPaint);
+ RibbonGroupButton = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
+ RibbonGroupClusterButton = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, needPaint);
+ RibbonGroupCollapsedButton = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
+ RibbonGroupDialogButton = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
+ RibbonKeyTip = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ControlToolTip, PaletteBorderStyle.ControlToolTip, PaletteContentStyle.LabelKeyTip, needPaint);
+ RibbonQATButton = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ButtonButtonSpec, PaletteBorderStyle.ButtonButtonSpec, PaletteContentStyle.ButtonButtonSpec, needPaint);
+ RibbonScroller = new PaletteTripleRedirect(_redirect, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, needPaint);
// Create the redirection instances
- _ribbonAppButtonInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonAppButton);
- _ribbonAppMenuInnerInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonAppMenuInner);
- _ribbonAppMenuOuterInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonAppMenuOuter);
- _ribbonAppMenuDocsInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonAppMenuDocs);
- _ribbonAppMenuDocsTitleInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonAppMenuDocsTitle);
- _ribbonAppMenuDocsEntryInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonAppMenuDocsEntry);
- _ribbonGeneralInherit = new PaletteRibbonGeneralInheritRedirect(redirect);
- _ribbonGroupBackAreaInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupArea);
- _ribbonGroupButtonTextInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonGroupButtonText);
- _ribbonGroupCheckBoxTextInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonGroupCheckBoxText);
- _ribbonGroupCollapsedBackInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedBack);
- _ribbonGroupCollapsedBorderInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedBorder);
- _ribbonGroupCollapsedFrameBackInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack);
- _ribbonGroupCollapsedFrameBorderInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder);
- _ribbonGroupCollapsedTextInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonGroupCollapsedText);
- _ribbonGroupNormalBorderInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupNormalBorder);
- _ribbonGroupNormalTitleInherit = new PaletteRibbonDoubleInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonGroupNormalTitle, PaletteRibbonTextStyle.RibbonGroupNormalTitle);
- _ribbonGroupRadioButtonTextInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonGroupRadioButtonText);
- _ribbonGroupLabelTextInherit = new PaletteRibbonTextInheritRedirect(redirect, PaletteRibbonTextStyle.RibbonGroupLabelText);
- _ribbonTabInherit = new PaletteRibbonDoubleInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonTab, PaletteRibbonTextStyle.RibbonTab);
- _ribbonQATFullbarInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonQATFullbar);
- _ribbonQATMinibarInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonQATMinibar);
- _ribbonQATOverflowInherit = new PaletteRibbonBackInheritRedirect(redirect, PaletteRibbonBackStyle.RibbonQATOverflow);
+ _ribbonAppButtonInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonAppButton);
+ var ribbonFileAppTabInherit = new PaletteRibbonFileAppTabInheritRedirect(_redirect);
+ _ribbonAppMenuInnerInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonAppMenuInner);
+ _ribbonAppMenuOuterInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonAppMenuOuter);
+ _ribbonAppMenuDocsInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonAppMenuDocs);
+ _ribbonAppMenuDocsTitleInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonAppMenuDocsTitle);
+ _ribbonAppMenuDocsEntryInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonAppMenuDocsEntry);
+ _ribbonGeneralInherit = new PaletteRibbonGeneralInheritRedirect(_redirect);
+ _ribbonGroupBackAreaInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupArea);
+ _ribbonGroupButtonTextInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonGroupButtonText);
+ _ribbonGroupCheckBoxTextInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonGroupCheckBoxText);
+ _ribbonGroupCollapsedBackInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedBack);
+ _ribbonGroupCollapsedBorderInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedBorder);
+ _ribbonGroupCollapsedFrameBackInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBack);
+ _ribbonGroupCollapsedFrameBorderInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupCollapsedFrameBorder);
+ _ribbonGroupCollapsedTextInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonGroupCollapsedText);
+ _ribbonGroupNormalBorderInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupNormalBorder);
+ _ribbonGroupNormalTitleInherit = new PaletteRibbonDoubleInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonGroupNormalTitle, PaletteRibbonTextStyle.RibbonGroupNormalTitle);
+ _ribbonGroupRadioButtonTextInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonGroupRadioButtonText);
+ _ribbonGroupLabelTextInherit = new PaletteRibbonTextInheritRedirect(_redirect, PaletteRibbonTextStyle.RibbonGroupLabelText);
+ _ribbonTabInherit = new PaletteRibbonDoubleInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonTab, PaletteRibbonTextStyle.RibbonTab);
+ _ribbonQATFullbarInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonQATFullbar);
+ _ribbonQATMinibarInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonQATMinibar);
+ _ribbonQATOverflowInherit = new PaletteRibbonBackInheritRedirect(_redirect, PaletteRibbonBackStyle.RibbonQATOverflow);
// Create storage that maps onto the inherit instances
_ribbonAppButton = new PaletteRibbonBack(_ribbonAppButtonInherit, needPaint);
+ RibbonFileAppTab = new PaletteRibbonFileAppTab(ribbonFileAppTabInherit, needPaint);
_ribbonAppMenuInner = new PaletteRibbonBack(_ribbonAppMenuInnerInherit, needPaint);
_ribbonAppMenuOuter = new PaletteRibbonBack(_ribbonAppMenuOuterInherit, needPaint);
_ribbonAppMenuDocs = new PaletteRibbonBack(_ribbonAppMenuDocsInherit, needPaint);
@@ -152,7 +154,7 @@ public PaletteRibbonRedirect([DisallowNull] PaletteRedirect redirect,
_ribbonQATMinibarActive = new PaletteRibbonBack(_ribbonQATMinibarInherit, needPaint);
_ribbonQATMinibarInactive = new PaletteRibbonBack(_ribbonQATMinibarInherit, needPaint);
_ribbonQATOverflow = new PaletteRibbonBack(_ribbonQATOverflowInherit, needPaint);
- _ribbonImages = new PaletteRibbonImages(redirect, NeedPaintDelegate);
+ _ribbonImages = new PaletteRibbonImages(_redirect, NeedPaintDelegate);
}
#endregion
@@ -239,9 +241,18 @@ public override void SetRedirector(PaletteRedirect redirect)
[Description(@"Overrides for defining application button appearance.")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public virtual PaletteRibbonBack RibbonAppButton => _ribbonAppButton;
-
private bool ShouldSerializeRibbonAppButton() => !_ribbonAppButton.IsDefault;
+ #endregion
+ #region RibbonFileAppTab
+ ///
+ /// Gets access to the application button palette details.
+ ///
+ [Category(@"Visuals")]
+ [Description(@"Overrides for defining application button appearance.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public virtual PaletteRibbonFileAppTab RibbonFileAppTab { get; }
+ private bool ShouldSerializeRibbonFileAppTab() => !RibbonFileAppTab.IsDefault;
#endregion
#region RibbonAppMenuOuter
@@ -343,9 +354,7 @@ public override void SetRedirector(PaletteRedirect redirect)
[Description(@"Overrides for defining ribbon group check box label appearance.")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public virtual PaletteRibbonText RibbonGroupCheckBoxText => _ribbonGroupCheckBoxText;
-
private bool ShouldSerializeRibbonGroupCheckBoxText() => !_ribbonGroupCheckBoxText.IsDefault;
-
#endregion
#region RibbonGroupButtonText
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonFileAppButton.cs
similarity index 71%
rename from Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs
rename to Source/Krypton Components/Krypton.Ribbon/Palette/RibbonFileAppButton.cs
index cdc5b9e63..05d492f49 100644
--- a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonAppButton.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonFileAppButton.cs
@@ -1,28 +1,22 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
namespace Krypton.Ribbon
{
///
- /// Storage for application button related properties.
+ /// Storage for File application button related properties.
///
- public class RibbonAppButton : Storage
+ public class RibbonFileAppButton : Storage
{
#region Static Fields
private static readonly Image? _defaultAppImage = GenericImageResources.AppButtonDefault;
- private const string DEFAULT_APP_TEXT = @"File";
- private readonly IPaletteRibbonGeneral _palette;
- private static readonly Color _defaultAppBaseColorDark = Color.FromArgb(31, 72, 161);
- private static readonly Color _defaultAppBaseColorLight = Color.FromArgb(84, 158, 243);
#endregion
#region Type Definitions
@@ -50,25 +44,17 @@ public AppMenuButtonSpecCollection(KryptonRibbon owner)
private readonly KryptonContextMenuItems _appButtonMenuItems;
private bool _appButtonVisible;
private bool _formCloseBoxVisible;
- private Color _appButtonBaseColorDark;
- private Color _appButtonBaseColorLight;
- private Color _appButtonTextColor;
- private string _appButtonText;
#endregion
#region Identity
///
- /// Initialize a new instance of the RibbonAppButton class.
+ /// Initialize a new instance of the RibbonFileAppButton class.
///
/// Reference to owning ribbon instance.
- /// Source for palette values.
- public RibbonAppButton([DisallowNull] KryptonRibbon ribbon, [DisallowNull] IPaletteRibbonGeneral palette)
+ public RibbonFileAppButton([DisallowNull] KryptonRibbon ribbon)
{
Debug.Assert(ribbon != null);
- Debug.Assert(palette != null);
-
- _ribbon = ribbon;
- _palette = palette;
+ _ribbon = ribbon!;
// Default values
_appButtonMenuItems = new KryptonContextMenuItems
@@ -81,16 +67,11 @@ public RibbonAppButton([DisallowNull] KryptonRibbon ribbon, [DisallowNull] IPale
AppButtonToolTipTitle = string.Empty;
AppButtonToolTipBody = string.Empty;
AppButtonToolTipImageTransparentColor = Color.Empty;
- AppButtonToolTipStyle = LabelStyle.SuperTip;
AppButtonMinRecentSize = new Size(250, 250);
AppButtonMaxRecentSize = new Size(350, 350);
AppButtonShowRecentDocs = true;
_appButtonVisible = true;
_formCloseBoxVisible = false;
- _appButtonBaseColorDark = _palette.GetRibbonAppButtonDarkColor(PaletteState.Normal);
- _appButtonBaseColorLight = _palette.GetRibbonAppButtonLightColor(PaletteState.Normal);
- _appButtonTextColor = _palette.GetRibbonAppButtonTextColor(PaletteState.Normal);
- _appButtonText = KryptonManager.Strings.RibbonStrings.AppButtonText;
}
#endregion
@@ -101,10 +82,6 @@ public RibbonAppButton([DisallowNull] KryptonRibbon ribbon, [DisallowNull] IPale
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public override bool IsDefault => (AppButtonImage == _defaultAppImage) &&
- (AppButtonText == KryptonManager.Strings.RibbonStrings.AppButtonText) &&
- (AppButtonBaseColorDark == _palette.GetRibbonAppButtonDarkColor(PaletteState.Normal)) &&
- (AppButtonBaseColorLight == _palette.GetRibbonAppButtonLightColor(PaletteState.Normal)) &&
- (AppButtonTextColor == _palette.GetRibbonAppButtonTextColor(PaletteState.Normal)) &&
(AppButtonMenuItems.Count == 0) &&
(AppButtonRecentDocs.Count == 0) &&
AppButtonMinRecentSize.Equals(new Size(250, 250)) &&
@@ -150,103 +127,6 @@ public Image? AppButtonImage
#endregion
- #region AppButtonBaseColorDark
- ///
- /// Gets and sets the darker base color used for drawing an Office 2010 style application button.
- ///
- [Bindable(true)]
- [Category(@"Appearance")]
- [Description(@"Darker base color used for drawing an Office 2010 style application button.")]
- [KryptonDefaultColor()]
- [DefaultValue(typeof(Color), "31, 72, 161")]
- public Color AppButtonBaseColorDark
- {
- get => _appButtonBaseColorDark;
-
- set
- {
- if (_appButtonBaseColorDark != value)
- {
- _appButtonBaseColorDark = value;
- _ribbon.PerformNeedPaint(true);
- }
- }
- }
- #endregion
-
- #region AppButtonBaseColorLight
- ///
- /// Gets and sets the lighter base color used for drawing an Office 2010 style application button.
- ///
- [Bindable(true)]
- [Category(@"Appearance")]
- [Description(@"Lighter base color used for drawing an Office 2010 style application button.")]
- [KryptonDefaultColor()]
- [DefaultValue(typeof(Color), "84, 158, 243")]
- public Color AppButtonBaseColorLight
- {
- get => _appButtonBaseColorLight;
-
- set
- {
- if (_appButtonBaseColorLight != value)
- {
- _appButtonBaseColorLight = value;
- _ribbon.PerformNeedPaint(true);
- }
- }
- }
- #endregion
-
- #region AppButtonTextColor
- ///
- /// Gets and sets the text color used for drawing an Office 2010 style application button.
- ///
- [Bindable(true)]
- [Category(@"Appearance")]
- [Description(@"Text color used for drawing an Office 2010 style application button.")]
- [KryptonDefaultColor()]
- [DefaultValue(typeof(Color), "White")]
- public Color AppButtonTextColor
- {
- get => _appButtonTextColor;
-
- set
- {
- if (_appButtonTextColor != value)
- {
- _appButtonTextColor = value;
- _ribbon.PerformNeedPaint(true);
- }
- }
- }
- #endregion
-
- #region AppButtonText
- ///
- /// Gets and sets the text used for drawing an Office 2010 style application button.
- ///
- [Bindable(true)]
- [Category(@"Appearance")]
- [Description(@"Text used for drawing an Office 2010 style application button.")]
- [KryptonDefaultColor()]
- [DefaultValue(nameof(File))]
- [Localizable(true)]
- public string AppButtonText
- {
- get => _appButtonText;
-
- set
- {
- if (_appButtonText != value)
- {
- _appButtonText = value;
- _ribbon.PerformNeedPaint(true);
- }
- }
- }
- #endregion
-
#region AppButtonContextMenu
///
/// Gets and sets the context menu items for the application button.
@@ -316,6 +196,7 @@ public string AppButtonText
#endregion
#region AppButtonToolTipStyle
+
///
/// Gets and sets the tooltip label style for the application button.
///
@@ -323,8 +204,9 @@ public string AppButtonText
[Description(@"Tooltip style for the application button.")]
[DefaultValue(typeof(LabelStyle), "SuperTip")]
[Localizable(true)]
- public LabelStyle AppButtonToolTipStyle { get; set; }
-
+ public LabelStyle AppButtonToolTipStyle { get; set; } = LabelStyle.SuperTip;
+ private void ResetAppButtonToolTipStyle() => AppButtonToolTipStyle = LabelStyle.SuperTip;
+ private bool ShouldSerializeAppButtonToolTipStyle() => AppButtonToolTipStyle != LabelStyle.SuperTip;
#endregion
#region ToolTipShadow
@@ -335,10 +217,8 @@ public string AppButtonText
[Description(@"Button tooltip Shadow.")]
[DefaultValue(true)]
public bool ToolTipShadow { get; set; } = true; // Backward compatible -> "Material Design" suggests this to be false
-
- private bool ShouldSerializeToolTipShadow() => !ToolTipShadow;
-
private void ResetToolTipShadow() => ToolTipShadow = true;
+ private bool ShouldSerializeToolTipShadow() => !ToolTipShadow;
#endregion
#region AppButtonToolTipImage
@@ -361,7 +241,7 @@ public string AppButtonText
[Bindable(true)]
[Category(@"Appearance")]
[Description(@"Color to draw as transparent in the ToolTipImage.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[Localizable(true)]
public Color AppButtonToolTipImageTransparentColor { get; set; }
diff --git a/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonFileAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonFileAppTab.cs
new file mode 100644
index 000000000..1034868c6
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Ribbon/Palette/RibbonFileAppTab.cs
@@ -0,0 +1,72 @@
+#region BSD License
+/*
+ * New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2024 - 2024. All rights reserved.
+ */
+#endregion
+
+namespace Krypton.Ribbon
+{
+ ///
+ /// Storage for the "File application tab" related properties.
+ ///
+ public class RibbonFileAppTab : Storage
+ {
+ #region Instance Fields
+ private readonly KryptonRibbon _ribbon;
+ private string _fileAppTabText;
+ #endregion
+
+ #region Identity
+ ///
+ /// Initialize a new instance of the RibbonFileAppButton class.
+ ///
+ /// Reference to owning ribbon instance.
+ /// Source for palette values.
+ public RibbonFileAppTab([DisallowNull] KryptonRibbon ribbon)
+ {
+ Debug.Assert(ribbon != null);
+
+ _ribbon = ribbon!;
+
+ ResetFileAppTabText();
+ }
+ #endregion
+
+ #region IsDefault
+ ///
+ /// Gets a value indicating if all values are default.
+ ///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public override bool IsDefault => !ShouldSerializeFileAppTabText();
+ #endregion
+
+ #region FileAppTabText
+ ///
+ /// Gets and sets the text used for drawing an Office 2010 style application button.
+ ///
+ [Bindable(true)]
+ [Category(@"Appearance")]
+ [Description(@"Text used for drawing an Office 2010 style application button.")]
+ [KryptonDefaultColor]
+ [DefaultValue(nameof(File))]
+ [Localizable(true)]
+ public string FileAppTabText
+ {
+ get => _fileAppTabText;
+
+ set
+ {
+ if (_fileAppTabText != value)
+ {
+ _fileAppTabText = value;
+ _ribbon.PerformNeedPaint(true);
+ }
+ }
+ }
+ private void ResetFileAppTabText() => _fileAppTabText = KryptonManager.Strings.RibbonStrings.AppButtonText;
+ private bool ShouldSerializeFileAppTabText() => _fileAppTabText != KryptonManager.Strings.RibbonStrings.AppButtonText;
+ #endregion
+ }
+}
diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs
index 6689fb8b1..9a218af6d 100644
--- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppButton.cs
@@ -27,7 +27,6 @@ internal class ViewDrawRibbonAppButton : ViewLeaf
private Rectangle _clipRect;
private readonly Size _size;
private readonly Size _sizeFull; // = new(39, 39);
- private readonly Size _sizeTop; // = new(39, 22);
private readonly Size _sizeBottom; // = new(39, 17);
#endregion
@@ -42,12 +41,12 @@ public ViewDrawRibbonAppButton([DisallowNull] KryptonRibbon ribbon, bool bottomH
Debug.Assert(ribbon != null);
_sizeFull = new Size((int)(39 * FactorDpiX), (int)(39 * FactorDpiY));
- _sizeTop = new Size((int)(39 * FactorDpiX), (int)(22 * FactorDpiY));
+ var sizeTop = new Size((int)(39 * FactorDpiX), (int)(22 * FactorDpiY));
_sizeBottom = new Size((int)(39 * FactorDpiX), (int)(17 * FactorDpiY));
- _ribbon = ribbon;
+ _ribbon = ribbon!;
_bottomHalf = bottomHalf;
- _size = _bottomHalf ? _sizeBottom : _sizeTop;
+ _size = _bottomHalf ? _sizeBottom : sizeTop;
_mementos = new IDisposable[3];
}
@@ -109,7 +108,7 @@ public override void Layout([DisallowNull] ViewLayoutContext context)
Debug.Assert(context != null);
// We take on all the available display area
- ClientRectangle = context.DisplayRectangle;
+ ClientRectangle = context!.DisplayRectangle;
_clipRect = ClientRectangle;
// Update to reflect full size of actual button
@@ -164,13 +163,13 @@ public override void RenderBefore(RenderContext context)
}
// Draw the background
- _mementos[memento] = context.Renderer.RenderRibbon.DrawRibbonApplicationButton(_ribbon.RibbonShape, context, ClientRectangle, State, palette, _mementos[memento]!);
+ _mementos[memento] = context.Renderer.RenderRibbon.DrawRibbonApplicationButton(_ribbon.RibbonShape, context, ClientRectangle, State, palette, _mementos[memento]);
- // If there is an application button to be drawn
- if (_ribbon.RibbonAppButton.AppButtonImage != null)
+ // If there is an application button image to be drawn
+ Image? localImage = _ribbon.RibbonFileAppButton.AppButtonImage;
+ if (localImage != null)
{
// We always draw the image a 24x24 image (if dpi = 1!)
- Image? localImage = _ribbon.RibbonAppButton.AppButtonImage;
localImage = CommonHelper.ScaleImageForSizedDisplay(localImage, localImage.Width * FactorDpiX,
localImage.Height * FactorDpiY);
diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs
index e76a5a26b..52610b5fa 100644
--- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonCaptionArea.cs
@@ -33,7 +33,7 @@ internal class ViewDrawRibbonCaptionArea : ViewDrawDocker
private ViewLayoutSeparator _spaceInsteadOfAppButton;
private ViewLayoutRibbonQATMini _captionQAT;
private ViewLayoutRibbonQATMini _nonCaptionQAT;
- private ViewLayoutRibbonContextTitles? _contextTiles;
+ private ViewLayoutRibbonContextTitles _contextTiles;
private ViewDrawRibbonCompoRightBorder _compRightBorder;
private AppButtonController? _appButtonController;
private AppTabController? _appTabController;
@@ -93,7 +93,7 @@ protected override void Dispose(bool disposing)
{
_captionAppButton.OwnerForm = null;
_kryptonForm.AllowIconDisplay = true;
- _kryptonForm.RevokeViewElement(_contextTiles!, ViewDockStyle.Fill);
+ _kryptonForm.RevokeViewElement(_contextTiles, ViewDockStyle.Fill);
_kryptonForm.RevokeViewElement(_captionAppButton, ViewDockStyle.Left);
_kryptonForm.RevokeViewElement(_captionQAT, ViewDockStyle.Left);
_integrated = false;
@@ -192,7 +192,7 @@ public void AppButtonChanged() =>
/// Update the visible state of the caption area based on integration, app button, contexts and qat location.
///
public void UpdateVisible() => Visible = !_integrated &&
- (_ribbon.RibbonAppButton.AppButtonVisible ||
+ (_ribbon.RibbonFileAppButton.AppButtonVisible ||
(_ribbon.QATLocation == QATLocation.Above) ||
(_ribbon.RibbonContexts.Count > 0));
#endregion
@@ -242,7 +242,7 @@ public void UpdateQAT()
///
public void AppButtonVisibleChanged()
{
- var appButtonVisible = _ribbon.RibbonAppButton.AppButtonVisible && (_ribbon.RibbonShape == PaletteRibbonShape.Office2007);
+ var appButtonVisible = _ribbon.RibbonFileAppButton.AppButtonVisible && (_ribbon.RibbonShape == PaletteRibbonShape.Office2007);
if (_captionAppButton.Visible != appButtonVisible)
{
// Update visible state of the app button to reflect current state
@@ -328,7 +328,7 @@ public Padding RealWindowBorders
///
/// Gets access to the layout view used for the context titles.
///
- public ViewLayoutRibbonContextTitles? ContextTitles => _contextTiles;
+ public ViewLayoutRibbonContextTitles ContextTitles => _contextTiles;
#endregion
@@ -547,13 +547,13 @@ private void OnFormChromeCheck(object? sender, EventArgs e)
_compoRightInjected = true;
}
- _kryptonForm.InjectViewElement(_contextTiles!, ViewDockStyle.Fill);
+ _kryptonForm.InjectViewElement(_contextTiles, ViewDockStyle.Fill);
}
else
{
_captionAppButton.OwnerForm = null;
_captionQAT.OwnerForm = null;
- _kryptonForm.RevokeViewElement(_contextTiles!, ViewDockStyle.Fill);
+ _kryptonForm.RevokeViewElement(_contextTiles, ViewDockStyle.Fill);
// At runtime under vista we do not remove the compo right border
if (_ribbon.InDesignMode)
@@ -574,8 +574,8 @@ private void OnFormChromeCheck(object? sender, EventArgs e)
//TODO: call this function when palette is changing
var newAllowIconDisplay = !_integrated
- || !_ribbon.RibbonAppButton.AppButtonVisible
- || (_ribbon.RibbonAppButton.AppButtonVisible
+ || !_ribbon.RibbonFileAppButton.AppButtonVisible
+ || (_ribbon.RibbonFileAppButton.AppButtonVisible
&& _ribbon.RibbonShape is PaletteRibbonShape.Office2010 or PaletteRibbonShape.VisualStudio2010 or PaletteRibbonShape.Office2013 or PaletteRibbonShape.Microsoft365 or PaletteRibbonShape.VisualStudio
)
;
diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonFileAppTab.cs
similarity index 75%
rename from Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs
rename to Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonFileAppTab.cs
index 0a94a0ee3..781f5147d 100644
--- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonAppTab.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonFileAppTab.cs
@@ -1,30 +1,26 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
namespace Krypton.Ribbon
{
///
- /// Draws half of an application tab.
+ /// Draws the "File Application tab"
///
- internal class ViewDrawRibbonAppTab : ViewComposite,
+ internal class ViewDrawRibbonFileAppTab : ViewComposite,
IContentValues
{
#region Instance Fields
private readonly KryptonRibbon _ribbon;
private IDisposable?[] _mementos;
private readonly PaletteRibbonGeneral _paletteGeneral;
- private readonly ApplicationTabToContent _contentProvider;
+ private readonly FileApplicationTabToContent _contentProvider;
private readonly Padding _preferredBorder; // = new(17, 4, 17, 3);
#endregion
@@ -33,7 +29,7 @@ internal class ViewDrawRibbonAppTab : ViewComposite,
/// Initialize a new instance of the ViewDrawRibbonAppTab class.
///
/// Owning control instance.
- public ViewDrawRibbonAppTab([DisallowNull] KryptonRibbon ribbon)
+ public ViewDrawRibbonFileAppTab([DisallowNull] KryptonRibbon ribbon)
{
Debug.Assert(ribbon != null);
@@ -43,7 +39,7 @@ public ViewDrawRibbonAppTab([DisallowNull] KryptonRibbon ribbon)
// Use a class to convert from application tab to content interface
_paletteGeneral = _ribbon.StateCommon.RibbonGeneral;
- _contentProvider = new ApplicationTabToContent(_ribbon, _paletteGeneral);
+ _contentProvider = new FileApplicationTabToContent(_ribbon, _paletteGeneral);
// Create and add the draw content for display inside the tab
Add(new ViewDrawContent(_contentProvider, this, VisualOrientation.Top));
@@ -120,19 +116,41 @@ public override void Layout([DisallowNull] ViewLayoutContext context)
/// Rendering context.
public override void RenderBefore([DisallowNull] RenderContext context)
{
- var memento = State switch
+ IPaletteRibbonFileAppTab palette;
+ int memento;
+ var localState = State;
+ // Find the correct palette to use that matches the button state
+ switch (State)
{
- PaletteState.Tracking => 1,
- PaletteState.Tracking | PaletteState.FocusOverride => 2,
- PaletteState.Pressed => 3,
- _ => 0
- };
+ default:
+ case PaletteState.Normal:
+ if (_ribbon.Enabled)
+ {
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ memento = 0;
+ }
+ else
+ {
+ localState = PaletteState.Disabled;
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ memento = 3;
+ }
+ break;
+ case PaletteState.Tracking:
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ memento = 1;
+ break;
+ case PaletteState.Pressed:
+ palette = _ribbon.StateNormal.RibbonFileAppTab;
+ memento = 2;
+ break;
+ }
// Draw the background
- _mementos[memento] = context.Renderer.RenderRibbon.DrawRibbonApplicationTab(_ribbon.RibbonShape, context, ClientRectangle, State,
- _ribbon.RibbonAppButton.AppButtonBaseColorDark,
- _ribbon.RibbonAppButton.AppButtonBaseColorLight,
- _mementos[memento]!);
+ _mementos[memento] = context.Renderer.RenderRibbon.DrawRibbonFileApplicationTab(_ribbon.RibbonShape, context, ClientRectangle,
+ localState,
+ palette,
+ _mementos[memento]);
}
#endregion
@@ -156,8 +174,8 @@ public override void RenderBefore([DisallowNull] RenderContext context)
///
/// Title string.
public string GetShortText() => _ribbon.RibbonShape == PaletteRibbonShape.Office2013
- ? _ribbon.RibbonAppButton.AppButtonText.ToUpper()
- : _ribbon.RibbonAppButton.AppButtonText;
+ ? _ribbon.RibbonFileAppTab.FileAppTabText.ToUpper()
+ : _ribbon.RibbonFileAppTab.FileAppTabText;
///
/// Gets the long text used as the secondary ribbon title.
diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs
index df38a7a7a..ef928c9b4 100644
--- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonAppTab.cs
@@ -34,7 +34,7 @@ public ViewLayoutRibbonAppTab([DisallowNull] KryptonRibbon ribbon)
Debug.Assert(ribbon != null);
_ribbon = ribbon;
- AppTab = new ViewDrawRibbonAppTab(ribbon);
+ AppTab = new ViewDrawRibbonFileAppTab(ribbon);
// Dock it against the appropriate edge
Add(AppTab, ViewDockStyle.Bottom);
@@ -55,7 +55,7 @@ public override string ToString() =>
///
/// Gets the view element that represents the button.
///
- public ViewDrawRibbonAppTab AppTab { get; }
+ public ViewDrawRibbonFileAppTab AppTab { get; }
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs
index bd594f75b..34303e2d2 100644
--- a/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs
+++ b/Source/Krypton Components/Krypton.Ribbon/View Layout/ViewLayoutRibbonTabsArea.cs
@@ -1,14 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
- * Modified: Monday 12th April, 2021 @ 18:00 GMT
- *
*/
#endregion
@@ -247,8 +243,8 @@ public void CheckRibbonSize()
public void AppButtonVisibleChanged()
{
// Update visible state of the app button/tab to reflect current state
- LayoutAppButton.Visible = _ribbon.RibbonAppButton.AppButtonVisible && (_ribbon.RibbonShape == PaletteRibbonShape.Office2007);
- LayoutAppTab.Visible = _ribbon.RibbonAppButton.AppButtonVisible && (_ribbon.RibbonShape != PaletteRibbonShape.Office2007);
+ LayoutAppButton.Visible = _ribbon.RibbonFileAppButton.AppButtonVisible && (_ribbon.RibbonShape == PaletteRibbonShape.Office2007);
+ LayoutAppTab.Visible = _ribbon.RibbonFileAppButton.AppButtonVisible && (_ribbon.RibbonShape != PaletteRibbonShape.Office2007);
_leftSeparator.SeparatorSize = (_ribbon.RibbonShape == PaletteRibbonShape.Office2007) ? new Size(BUTTON_TAB_GAP_2007, BUTTON_TAB_GAP_2007) : new Size(BUTTON_TAB_GAP_2010, BUTTON_TAB_GAP_2010);
// If no app button then need separator to stop first tab being to close to the left edge
@@ -256,9 +252,9 @@ public void AppButtonVisibleChanged()
ViewDrawRibbonCaptionArea? viewDrawRibbonCaptionArea = _ribbon.CaptionArea;
if (viewDrawRibbonCaptionArea?.KryptonForm != null)
{
- if (viewDrawRibbonCaptionArea.KryptonForm.CloseBox != _ribbon.RibbonAppButton.FormCloseBoxVisible)
+ if (viewDrawRibbonCaptionArea.KryptonForm.CloseBox != _ribbon.RibbonFileAppButton.FormCloseBoxVisible)
{
- viewDrawRibbonCaptionArea.KryptonForm.CloseBox = _ribbon.RibbonAppButton.FormCloseBoxVisible;
+ viewDrawRibbonCaptionArea.KryptonForm.CloseBox = _ribbon.RibbonFileAppButton.FormCloseBoxVisible;
viewDrawRibbonCaptionArea.PerformFormChromeCheck();
}
}
@@ -539,8 +535,8 @@ private void CreateViewElements(PaletteRedirect redirect)
[_ribbon.StateCommon],
[PaletteMetricInt.HeaderButtonEdgeInsetPrimary],
[PaletteMetricPadding.RibbonButtonPadding],
- _ribbon.CreateToolStripRenderer,
- NeedPaintDelegate);
+ _ribbon.CreateToolStripRenderer,
+ NeedPaintDelegate);
// Create the manager for handling tooltips
ToolTipManager = new ToolTipManager(new ToolTipValues(null)); // use default, as each button "could" have different values ??!!??
@@ -551,7 +547,7 @@ private void CreateViewElements(PaletteRedirect redirect)
private void SetupParentMonitoring()
{
- // We have to know when the parent of the ribbon changes so we can then hook
+ // We have to know when the parent of the ribbon changes, so we can then hook
// into monitoring the mdi active child status of the top level form, this is
// required to get the pendant buttons to operate as needed.
_ribbon.ParentChanged += OnRibbonParentChanged;
@@ -574,7 +570,7 @@ private void OnRibbonParentChanged(object sender, EventArgs e)
_formContainer.MdiChildActivate -= OnRibbonMdiChildActivate;
}
- // Find the new top level form (which might be an mdi container)
+ // Find the new top level form (which might be a mdi container)
_formContainer = _ribbon.FindForm();
// Monitor changes in active mdi child
@@ -722,7 +718,7 @@ private void OnAppButtonClicked(object sender, EventArgs e)
}
// Create the actual control used to show the context menu
- _appMenu = new VisualPopupAppMenu(_ribbon, _ribbon.RibbonAppButton,
+ _appMenu = new VisualPopupAppMenu(_ribbon,
_ribbon.LocalCustomPalette, _ribbon.PaletteMode,
_ribbon.GetRedirector(),
appRectTop, appRectBottom,
@@ -809,7 +805,7 @@ private void OnShowToolTip(object sender, ToolTipEventArgs e)
case ViewLayoutRibbonAppButton:
case ViewLayoutRibbonAppTab:
{
- // Create a content that recovers values from a the ribbon for the app button/tab
+ // Create a content that recovers values from the ribbon for the app button/tab
var appButtonContent = new AppButtonToolTipToContent(_ribbon);
// Is there actually anything to show for the tooltip
@@ -818,8 +814,8 @@ private void OnShowToolTip(object sender, ToolTipEventArgs e)
sourceContent = appButtonContent;
// Grab the style from the app button settings
- toolTipStyle = _ribbon.RibbonAppButton.AppButtonToolTipStyle;
- shadow = _ribbon.RibbonAppButton.ToolTipShadow;
+ toolTipStyle = _ribbon.RibbonFileAppButton.AppButtonToolTipStyle;
+ shadow = _ribbon.RibbonFileAppButton.ToolTipShadow;
// Display below the mouse cursor
screenRect.Height += SystemInformation.CursorSize.Height / 3 * 2;
@@ -884,7 +880,7 @@ private void OnShowToolTip(object sender, ToolTipEventArgs e)
{
sourceContent = groupItem.ToolTipValues;
- // Grab the style from the group radio button button settings
+ // Grab the style from the group radio button settings
toolTipStyle = groupItem.ToolTipValues.ToolTipStyle;
shadow = groupItem.ToolTipValues.ToolTipShadow;
@@ -917,7 +913,7 @@ private void OnShowToolTip(object sender, ToolTipEventArgs e)
_visualPopupToolTip.Disposed += OnVisualPopupToolTipDisposed;
- // The popup tooltip control always adds on a border above/below so we negate that here.
+ // The popup tooltip control always adds on a border above/below, so we negate that here.
screenRect.Height -= 20;
_visualPopupToolTip.ShowRelativeTo(e.Target, screenRect.Location);
}
@@ -935,7 +931,7 @@ private void OnVisualPopupToolTipDisposed(object sender, EventArgs e)
var popupToolTip = (VisualPopupToolTip)sender;
popupToolTip.Disposed -= OnVisualPopupToolTipDisposed;
- // Not showing a popup page any more
+ // Not showing a popup page anymore
_visualPopupToolTip = null;
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpec.cs b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpec.cs
index 6d06c86c8..9dc5afd95 100644
--- a/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpec.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/ButtonSpec/ButtonSpec.cs
@@ -203,7 +203,7 @@ public Image? Image
[Localizable(true)]
[Category(@"Appearance")]
[Description(@"Button image transparent color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _imageTransparentColor;
@@ -314,7 +314,7 @@ public Image? ToolTipImage
[Localizable(true)]
[Category(@"ToolTip")]
[Description(@"Button image transparent color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolTipImageTransparentColor
{
get => _toolTipImageTransparentColor;
@@ -530,7 +530,7 @@ public bool AllowInheritToolTipTitle
[Localizable(true)]
[Category(@"Appearance")]
[Description(@"Image color to remap to container foreground.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ColorMap
{
get => _colorMap;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommand.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommand.cs
index 4c1467cd6..a6917acd0 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommand.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommand.cs
@@ -335,7 +335,7 @@ public Image? ImageLarge
[Localizable(true)]
[Category(@"Appearance")]
[Description(@"Command image transparent color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _imageTransparentColor;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs
index 47f4ea74f..3b7c58ca2 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCustomPaletteBase.cs
@@ -1750,16 +1750,16 @@ public override Color GetRibbonTabRowGradientColor1(PaletteState state) =>
GetPaletteRibbonGeneral(state).GetRibbonTabRowGradientColor1(state);
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) =>
- GetPaletteRibbonGeneral(state).GetRibbonAppButtonDarkColor(state);
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) =>
+ GetPaletteRibbonFileAppTab(state).GetRibbonFileAppTabBottomColor(state);
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) =>
- GetPaletteRibbonGeneral(state).GetRibbonAppButtonLightColor(state);
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) =>
+ GetPaletteRibbonFileAppTab(state).GetRibbonFileAppTabTopColor(state);
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) =>
- GetPaletteRibbonGeneral(state).GetRibbonAppButtonTextColor(state);
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) =>
+ GetPaletteRibbonFileAppTab(state).GetRibbonFileAppTabTextColor(state);
///
/// Gets the font for the ribbon text.
@@ -3947,7 +3947,9 @@ private PaletteElementColor GetTrackBar(PaletteElement element, PaletteState sta
private IPaletteRibbonGeneral GetPaletteRibbonGeneral() => Ribbon.RibbonGeneral;
- private IPaletteRibbonGeneral GetPaletteRibbonGeneral(PaletteState state) => Ribbon.RibbonGeneral;
+ private IPaletteRibbonGeneral GetPaletteRibbonGeneral(PaletteState _ /*state*/) => Ribbon.RibbonGeneral;
+
+ private IPaletteRibbonFileAppTab GetPaletteRibbonFileAppTab(PaletteState _ /*state*/) => Ribbon.RibbonFileAppTab;
private IPaletteRibbonBack GetPaletteRibbonBack(PaletteRibbonBackStyle style, PaletteState state)
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTaskDialogCommand.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTaskDialogCommand.cs
index e0cf8eff7..79cb87221 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTaskDialogCommand.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTaskDialogCommand.cs
@@ -204,7 +204,7 @@ public Image? Image
[Localizable(true)]
[Category(@"Appearance")]
[Description(@"Command image transparent color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _imageTransparentColor;
diff --git a/Source/Krypton Components/Krypton.Toolkit/General/Definitions.cs b/Source/Krypton Components/Krypton.Toolkit/General/Definitions.cs
index b72b9f787..2e47328a7 100644
--- a/Source/Krypton Components/Krypton.Toolkit/General/Definitions.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/General/Definitions.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -481,7 +479,7 @@ public interface IKryptonCommand
KryptonCommandType CommandType { get; set; }
///
- /// Generates a Execute event for a command.
+ /// Generates an Execute event for a command.
///
void PerformExecute();
}
@@ -1047,7 +1045,7 @@ public enum LabelStyle
TitleControl,
///
- /// Specifies a alternate label for use on a panel style background.
+ /// Specifies an alternate label for use on a panel style background.
///
AlternatePanel,
@@ -1986,7 +1984,7 @@ public enum KryptonMessageBoxDefaultButton
///
/// Options for .
///
- public enum KryptonMessageBoxResult : int
+ public enum KryptonMessageBoxResult
{
None = DialogResult.None,
Ok = DialogResult.OK,
@@ -2366,6 +2364,7 @@ public enum InformationBoxButtons
///
YesNoCancel,
+ // TODO: Remove User buttons
///
/// The message box contains Yes, No, and a user-defined buttons.
///
diff --git a/Source/Krypton Components/Krypton.Toolkit/General/GlobalStaticValues.cs b/Source/Krypton Components/Krypton.Toolkit/General/GlobalStaticValues.cs
index f0c0e1974..34f7460dc 100644
--- a/Source/Krypton Components/Krypton.Toolkit/General/GlobalStaticValues.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/General/GlobalStaticValues.cs
@@ -67,13 +67,13 @@ public class GlobalStaticValues
public static readonly Color TAB_ROW_GRADIENT_FIRST_COLOR = Color.Transparent;
/// The default ribbon application button dark color
- public static readonly Color DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR = Color.FromArgb(31, 72, 161);
+ public static readonly Color DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR = Color.FromArgb(31, 72, 161);
/// The default ribbon application button light color
- public static readonly Color DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR = Color.FromArgb(84, 158, 243);
+ public static readonly Color DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR = Color.FromArgb(84, 158, 243);
/// The default ribbon application button text color
- public static readonly Color DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR = Color.White;
+ public static readonly Color DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR = Color.White;
#region Arrays
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBack.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBack.cs
index 78fb857fd..8c5e54d29 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBack.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBack/PaletteBack.cs
@@ -236,7 +236,7 @@ public PaletteGraphicsHint GetBackGraphicsHint(PaletteState state) =>
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Main background color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color1
{
@@ -283,7 +283,7 @@ public Color Color1
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Secondary background color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color2
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs
index 0168ef9dc..ed6cce20b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteBorder/PaletteBorder.cs
@@ -309,7 +309,7 @@ public PaletteGraphicsHint GetBorderGraphicsHint(PaletteState state) =>
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Main border color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color1
{
@@ -367,7 +367,7 @@ public Color Color1
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Secondary border color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color2
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs
index 99878b980..9ad60e4fc 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContent.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -86,7 +84,7 @@ public PaletteContent([DisallowNull] IPaletteContent inherit,
Debug.Assert(inherit != null);
// Remember inheritance
- _inherit = inherit;
+ _inherit = inherit!;
// Store the provided paint notification delegate
NeedPaint = needPaint;
@@ -459,7 +457,7 @@ public PaletteRectangleAlign GetContentShortTextColorAlign(PaletteState state) =
///
/// Palette value should be applicable to this state.
/// Angle used for color drawing.
- public float GetContentShortTextColorAngle(PaletteState state) => ShortText.ColorAngle != -1
+ public float GetContentShortTextColorAngle(PaletteState state) => ShortText.ColorAngle != -1f
? ShortText.ColorAngle
: _inherit.GetContentShortTextColorAngle(state);
@@ -630,7 +628,7 @@ public PaletteRectangleAlign GetContentLongTextColorAlign(PaletteState state) =>
/// Palette value should be applicable to this state.
/// Angle used for color drawing.
public float GetContentLongTextColorAngle(PaletteState state) =>
- LongText.ColorAngle != -1
+ LongText.ColorAngle != -1f
? LongText.ColorAngle
: _inherit.GetContentLongTextColorAngle(state);
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentImage.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentImage.cs
index c525b1ce9..1e91f62c9 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentImage.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentImage.cs
@@ -211,7 +211,7 @@ public PaletteImageEffect Effect
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Color to remap in the image.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color ImageColorMap
{
@@ -251,7 +251,7 @@ public Color ImageColorMap
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Color to use in place of the image map.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color ImageColorTo
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentJustText.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentJustText.cs
index 3c1dce5ca..17d060141 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentJustText.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentJustText.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -18,14 +16,6 @@ namespace Krypton.Toolkit
public class PaletteContentJustText : PaletteContent
{
#region Identity
- ///
- /// Initialize a new instance of the PaletteContentJustText class.
- ///
- public PaletteContentJustText()
- : this(null, null)
- {
- }
-
///
/// Initialize a new instance of the PaletteContentJustText class.
///
@@ -40,7 +30,7 @@ public PaletteContentJustText(IPaletteContent inherit)
///
/// Source for inheriting defaulted values.
/// Delegate for notifying paint requests.
- public PaletteContentJustText(IPaletteContent? inherit,
+ public PaletteContentJustText(IPaletteContent inherit,
NeedPaintHandler? needPaint)
: base(inherit, needPaint)
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs
index 0f9e6780f..5386db4aa 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteContent/PaletteContentText.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -442,7 +440,7 @@ public virtual InheritBool MultiLine
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Main color for the text.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public virtual Color Color1
{
@@ -482,7 +480,7 @@ public virtual Color Color1
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Secondary color for the text.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public virtual Color Color2
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDefinitions.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDefinitions.cs
index fdd09bfc8..990907852 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDefinitions.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDefinitions.cs
@@ -844,31 +844,45 @@ public interface IPaletteRibbonGeneral
/// Palette value should be applicable to this state.
/// Color value.
Color GetRibbonQATButtonLight(PaletteState state);
-
- /// Gets the ribbon tab row gradient first color.
+
+ /// Gets the ribbon tab row gradient first color.
/// Palette value should be applicable to this state.
/// The gradient first color.
Color GetRibbonTabRowGradientColor1(PaletteState state);
- /// Gets the ribbon app button dark color.
+ /// Gets the ribbon tab row gradient rafting angle.
/// Palette value should be applicable to this state.
- /// The app button dark color.
- Color GetRibbonAppButtonDarkColor(PaletteState state);
+ /// The gradient rafting angle.
+ float GetRibbonTabRowGradientRaftingAngle(PaletteState state);
+ }
+ #endregion
- /// Gets the ribbon app button light color.
+ #region IPaletteRibbonFileAppTab
+ ///
+ /// Exposes a palette source for ribbon background specifications.
+ ///
+ public interface IPaletteRibbonFileAppTab
+ {
+ ///
+ /// Gets the Application File Tab Top Colour
+ ///
/// Palette value should be applicable to this state.
- /// The app button light color.
- Color GetRibbonAppButtonLightColor(PaletteState state);
+ /// Color value.
+ Color GetRibbonFileAppTabTopColor(PaletteState state);
- /// Gets the ribbon app button text color.
+ ///
+ /// Gets the Application File Tab Bottom Colour
+ ///
/// Palette value should be applicable to this state.
- /// The app button text color.
- Color GetRibbonAppButtonTextColor(PaletteState state);
+ /// Color value.
+ Color GetRibbonFileAppTabBottomColor(PaletteState state);
- /// Gets the ribbon tab row gradient rafting angle.
+ ///
+ /// Gets the Application File Tab Text Colour
+ ///
/// Palette value should be applicable to this state.
- /// The gradient rafting angle.
- float GetRibbonTabRowGradientRaftingAngle(PaletteState state);
+ /// Color value.
+ Color GetRibbonFileAppTabTextColor(PaletteState state);
}
#endregion
@@ -3083,7 +3097,7 @@ public enum PaletteImageStyle
///
/// Specifies the an image is aligned.
///
- [Flags()]
+ [Flags]
[TypeConverter(typeof(PaletteDrawBordersConverter))]
public enum PaletteDrawBorders
{
@@ -3708,7 +3722,7 @@ public enum PaletteTextHotkeyPrefix
#endregion
#region Enum PaletteColorIndex
- internal enum PaletteColorIndex : int
+ internal enum PaletteColorIndex
{
ButtonCheckedGradientBegin = 0,
ButtonCheckedGradientEnd,
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleRedirect.cs
index c3d8a73fb..a5176227a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleRedirect.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteDouble/PaletteDoubleRedirect.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -27,6 +25,7 @@ public class PaletteDoubleRedirect : Storage,
#region Identity
+ ///
protected PaletteDoubleRedirect()
{
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirect.cs
index 2f4e793a0..846a0a086 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirect.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirect.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -27,11 +25,12 @@ public class PaletteRedirect : PaletteBase, IGlobalId
/// Initialize a new instance of the PaletteRedirect class.
///
/// Initial palette target for redirection.
+ /// target can be null when performing a drag-drop operation (Amongst other usages !!)
public PaletteRedirect(PaletteBase? target)
{
Id = CommonHelper.NextId;
// Remember incoming target
- _target = target!;
+ _target = target;
}
#endregion
@@ -54,8 +53,8 @@ public virtual PaletteBase? Target
/// InheritBool value.
public override InheritBool UseThemeFormChromeBorderWidth
{
- get => _target.UseThemeFormChromeBorderWidth;
- set => _target.UseThemeFormChromeBorderWidth = value;
+ get => _target!.UseThemeFormChromeBorderWidth;
+ set => _target!.UseThemeFormChromeBorderWidth = value;
}
#endregion
@@ -65,7 +64,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Gets the renderer to use for this palette.
///
/// Renderer to use for drawing palette settings.
- public override IRenderer GetRenderer() => _target.GetRenderer();
+ public override IRenderer GetRenderer() => _target!.GetRenderer();
#endregion
@@ -76,7 +75,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Background style.
/// Palette value should be applicable to this state.
/// InheritBool value.
- public override InheritBool GetBackDraw(PaletteBackStyle style, PaletteState state) => _target.GetBackDraw(style, state);
+ public override InheritBool GetBackDraw(PaletteBackStyle style, PaletteState state) => _target!.GetBackDraw(style, state);
///
/// Gets the graphics drawing hint for the background.
@@ -132,7 +131,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Background style.
/// Palette value should be applicable to this state.
/// Image instance.
- public override Image? GetBackImage(PaletteBackStyle style, PaletteState state) => _target.GetBackImage(style, state);
+ public override Image? GetBackImage(PaletteBackStyle style, PaletteState state) => _target?.GetBackImage(style, state);
///
/// Gets the background image style.
@@ -159,7 +158,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Border style.
/// Palette value should be applicable to this state.
/// InheritBool value.
- public override InheritBool GetBorderDraw(PaletteBorderStyle style, PaletteState state) => _target.GetBorderDraw(style, state);
+ public override InheritBool GetBorderDraw(PaletteBorderStyle style, PaletteState state) => _target!.GetBorderDraw(style, state);
///
/// Gets a value indicating which borders to draw.
@@ -239,7 +238,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Border style.
/// Palette value should be applicable to this state.
/// Image instance.
- public override Image? GetBorderImage(PaletteBorderStyle style, PaletteState state) => _target.GetBorderImage(style, state);
+ public override Image? GetBorderImage(PaletteBorderStyle style, PaletteState state) => _target?.GetBorderImage(style, state);
///
/// Gets the border image style.
@@ -265,7 +264,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// InheritBool value.
- public override InheritBool GetContentDraw(PaletteContentStyle style, PaletteState state) => _target.GetContentDraw(style, state);
+ public override InheritBool GetContentDraw(PaletteContentStyle style, PaletteState state) => _target!.GetContentDraw(style, state);
///
/// Gets a value indicating if content should be drawn with focus indication.
@@ -324,7 +323,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// Font value.
- public override Font? GetContentShortTextFont(PaletteContentStyle style, PaletteState state) => _target!.GetContentShortTextFont(style, state);
+ public override Font? GetContentShortTextFont(PaletteContentStyle style, PaletteState state) => _target?.GetContentShortTextFont(style, state);
///
/// Gets the font for the short text by generating a new font instance.
@@ -332,7 +331,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// Font value.
- public override Font? GetContentShortTextNewFont(PaletteContentStyle style, PaletteState state) => _target!.GetContentShortTextNewFont(style, state);
+ public override Font? GetContentShortTextNewFont(PaletteContentStyle style, PaletteState state) => _target?.GetContentShortTextNewFont(style, state);
///
/// Gets the rendering hint for the short text.
@@ -356,7 +355,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// InheritBool value.
- public override InheritBool GetContentShortTextMultiLine(PaletteContentStyle style, PaletteState state) => _target.GetContentShortTextMultiLine(style, state);
+ public override InheritBool GetContentShortTextMultiLine(PaletteContentStyle style, PaletteState state) => _target!.GetContentShortTextMultiLine(style, state);
///
/// Gets the text trimming to use for short text.
@@ -436,7 +435,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// Image instance.
- public override Image? GetContentShortTextImage(PaletteContentStyle style, PaletteState state) => _target.GetContentShortTextImage(style, state);
+ public override Image? GetContentShortTextImage(PaletteContentStyle style, PaletteState state) => _target?.GetContentShortTextImage(style, state);
///
/// Gets the background image style.
@@ -460,7 +459,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// Font value.
- public override Font? GetContentLongTextFont(PaletteContentStyle style, PaletteState state) => _target!.GetContentLongTextFont(style, state);
+ public override Font? GetContentLongTextFont(PaletteContentStyle style, PaletteState state) => _target?.GetContentLongTextFont(style, state);
///
/// Gets the font for the long text by generating a new font instance.
@@ -468,7 +467,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// Font value.
- public override Font? GetContentLongTextNewFont(PaletteContentStyle style, PaletteState state) => _target!.GetContentLongTextNewFont(style, state);
+ public override Font? GetContentLongTextNewFont(PaletteContentStyle style, PaletteState state) => _target?.GetContentLongTextNewFont(style, state);
///
/// Gets the rendering hint for the long text.
@@ -484,7 +483,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// InheritBool value.
- public override InheritBool GetContentLongTextMultiLine(PaletteContentStyle style, PaletteState state) => _target.GetContentLongTextMultiLine(style, state);
+ public override InheritBool GetContentLongTextMultiLine(PaletteContentStyle style, PaletteState state) => _target!.GetContentLongTextMultiLine(style, state);
///
/// Gets the text trimming to use for long text.
@@ -572,7 +571,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Content style.
/// Palette value should be applicable to this state.
/// Image instance.
- public override Image? GetContentLongTextImage(PaletteContentStyle style, PaletteState state) => _target.GetContentLongTextImage(style, state);
+ public override Image? GetContentLongTextImage(PaletteContentStyle style, PaletteState state) => _target?.GetContentLongTextImage(style, state);
///
/// Gets the background image style for the long text.
@@ -623,7 +622,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Palette value should be applicable to this state.
/// Requested metric.
/// InheritBool value.
- public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) => _target.GetMetricBool(state, metric);
+ public override InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric) => _target!.GetMetricBool(state, metric);
///
/// Gets a padding metric value.
@@ -641,59 +640,59 @@ public override InheritBool UseThemeFormChromeBorderWidth
///
/// Is the node expanded
/// Appropriate image for drawing; otherwise null.
- public override Image? GetTreeViewImage(bool expanded) => _target.GetTreeViewImage(expanded);
+ public override Image? GetTreeViewImage(bool expanded) => _target?.GetTreeViewImage(expanded);
///
- /// Gets a check box image appropriate for the provided state.
+ /// Gets a checkbox image appropriate for the provided state.
///
- /// Is the check box enabled.
- /// Is the check box checked/unchecked/indeterminate.
- /// Is the check box being hot tracked.
- /// Is the check box being pressed.
+ /// Is the checkbox enabled.
+ /// Is the checkbox checked/unchecked/indeterminate.
+ /// Is the checkbox being hot tracked.
+ /// Is the checkbox being pressed.
/// Appropriate image for drawing; otherwise null.
- public override Image? GetCheckBoxImage(bool enabled, CheckState checkState, bool tracking, bool pressed) => _target.GetCheckBoxImage(enabled, checkState, tracking, pressed);
+ public override Image? GetCheckBoxImage(bool enabled, CheckState checkState, bool tracking, bool pressed) => _target?.GetCheckBoxImage(enabled, checkState, tracking, pressed);
///
- /// Gets a check box image appropriate for the provided state.
+ /// Gets a checkbox image appropriate for the provided state.
///
/// Is the radio button enabled.
/// Is the radio button checked.
/// Is the radio button being hot tracked.
/// Is the radio button being pressed.
/// Appropriate image for drawing; otherwise null.
- public override Image? GetRadioButtonImage(bool enabled, bool checkState, bool tracking, bool pressed) => _target.GetRadioButtonImage(enabled, checkState, tracking, pressed);
+ public override Image? GetRadioButtonImage(bool enabled, bool checkState, bool tracking, bool pressed) => _target?.GetRadioButtonImage(enabled, checkState, tracking, pressed);
///
- /// Gets a drop down button image appropriate for the provided state.
+ /// Gets a drop-down button image appropriate for the provided state.
///
/// PaletteState for which image is required.
- public override Image? GetDropDownButtonImage(PaletteState state) => _target.GetDropDownButtonImage(state);
+ public override Image? GetDropDownButtonImage(PaletteState state) => _target?.GetDropDownButtonImage(state);
///
/// Gets a checked image appropriate for a context menu item.
///
/// Appropriate image for drawing; otherwise null.
- public override Image? GetContextMenuCheckedImage() => _target.GetContextMenuCheckedImage();
+ public override Image? GetContextMenuCheckedImage() => _target?.GetContextMenuCheckedImage();
///
/// Gets a indeterminate image appropriate for a context menu item.
///
/// Appropriate image for drawing; otherwise null.
- public override Image? GetContextMenuIndeterminateImage() => _target.GetContextMenuIndeterminateImage();
+ public override Image? GetContextMenuIndeterminateImage() => _target?.GetContextMenuIndeterminateImage();
///
/// Gets an image indicating a sub-menu on a context menu item.
///
/// Appropriate image for drawing; otherwise null.
- public override Image? GetContextMenuSubMenuImage() => _target!.GetContextMenuSubMenuImage();
+ public override Image? GetContextMenuSubMenuImage() => _target?.GetContextMenuSubMenuImage();
///
- /// Gets a check box image appropriate for the provided state.
+ /// Gets a checkbox image appropriate for the provided state.
///
/// Enum of the button to fetch.
/// State of the button to fetch.
/// Appropriate image for drawing; otherwise null.
- public override Image? GetGalleryButtonImage(PaletteRibbonGalleryButton button, PaletteState state) => _target.GetGalleryButtonImage(button, state);
+ public override Image? GetGalleryButtonImage(PaletteRibbonGalleryButton button, PaletteState state) => _target?.GetGalleryButtonImage(button, state);
#endregion
@@ -703,7 +702,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
///
/// Style of button spec.
/// Icon value.
- public override Icon? GetButtonSpecIcon(PaletteButtonSpecStyle style) => _target.GetButtonSpecIcon(style);
+ public override Icon? GetButtonSpecIcon(PaletteButtonSpecStyle style) => _target?.GetButtonSpecIcon(style);
///
/// Gets the image to display for the button.
@@ -711,7 +710,7 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Style of button spec.
/// State for which image is required.
/// Image value.
- public override Image? GetButtonSpecImage(PaletteButtonSpecStyle style, PaletteState state) => _target.GetButtonSpecImage(style, state);
+ public override Image? GetButtonSpecImage(PaletteButtonSpecStyle style, PaletteState state) => _target?.GetButtonSpecImage(style, state);
///
/// Gets the image transparent color.
@@ -725,14 +724,14 @@ public override InheritBool UseThemeFormChromeBorderWidth
///
/// Style of button spec.
/// String value.
- public override string GetButtonSpecShortText(PaletteButtonSpecStyle style) => _target.GetButtonSpecShortText(style);
+ public override string GetButtonSpecShortText(PaletteButtonSpecStyle style) => _target!.GetButtonSpecShortText(style);
///
/// Gets the long text to display for the button.
///
/// Style of button spec.
/// String value.
- public override string GetButtonSpecLongText(PaletteButtonSpecStyle style) => _target.GetButtonSpecLongText(style);
+ public override string GetButtonSpecLongText(PaletteButtonSpecStyle style) => _target!.GetButtonSpecLongText(style);
///
/// Gets the tooltip title text to display for the button.
@@ -900,8 +899,6 @@ public override InheritBool UseThemeFormChromeBorderWidth
/// Color value.
public override Color GetRibbonMinimizeBarLight(PaletteState state) => _target!.GetRibbonMinimizeBarLight(state);
-
-
///
/// Gets the color for the tab separator.
///
@@ -945,20 +942,16 @@ public override InheritBool UseThemeFormChromeBorderWidth
public override Color GetRibbonQATButtonLight(PaletteState state) => _target!.GetRibbonQATButtonLight(state);
///
- public override Color GetRibbonTabRowGradientColor1(PaletteState state) =>
- _target!.GetRibbonTabRowGradientColor1(state);
+ public override Color GetRibbonTabRowGradientColor1(PaletteState state) => _target!.GetRibbonTabRowGradientColor1(state);
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) =>
- _target!.GetRibbonAppButtonDarkColor(state);
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _target!.GetRibbonFileAppTabBottomColor(state);
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) =>
- _target!.GetRibbonAppButtonLightColor(state);
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _target!.GetRibbonFileAppTabTopColor(state);
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) =>
- _target!.GetRibbonAppButtonTextColor(state);
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _target!.GetRibbonFileAppTabTextColor(state);
/// Gets the ribbon tab row gradient rafting angle.
/// Palette value should be applicable to this state.
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectBack.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectBack.cs
index efd7322b6..8df02b883 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectBack.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectBack.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -18,15 +16,15 @@ namespace Krypton.Toolkit
public class PaletteRedirectBack : PaletteRedirect
{
#region Instance Fields
- private IPaletteBack _disabled;
- private IPaletteBack _normal;
- private IPaletteBack _pressed;
- private IPaletteBack _tracking;
- private IPaletteBack _checkedNormal;
- private IPaletteBack _checkedPressed;
- private IPaletteBack _checkedTracking;
- private IPaletteBack _focusOverride;
- private IPaletteBack _normalDefaultOverride;
+ private IPaletteBack? _disabled;
+ private IPaletteBack? _normal;
+ private IPaletteBack? _pressed;
+ private IPaletteBack? _tracking;
+ private IPaletteBack? _checkedNormal;
+ private IPaletteBack? _checkedPressed;
+ private IPaletteBack? _checkedTracking;
+ private IPaletteBack? _focusOverride;
+ private IPaletteBack? _normalDefaultOverride;
#endregion
#region Identity
@@ -66,15 +64,15 @@ public PaletteRedirectBack(PaletteBase target,
/// Redirection for focus override state requests.
/// Redirection for normal default override state requests.
public PaletteRedirectBack(PaletteBase target,
- IPaletteBack disabled,
- IPaletteBack normal,
- IPaletteBack pressed,
- IPaletteBack tracking,
- IPaletteBack checkedNormal,
- IPaletteBack checkedPressed,
- IPaletteBack checkedTracking,
- IPaletteBack focusOverride,
- IPaletteBack normalDefaultOverride)
+ IPaletteBack? disabled,
+ IPaletteBack? normal,
+ IPaletteBack? pressed,
+ IPaletteBack? tracking,
+ IPaletteBack? checkedNormal,
+ IPaletteBack? checkedPressed,
+ IPaletteBack? checkedTracking,
+ IPaletteBack? focusOverride,
+ IPaletteBack? normalDefaultOverride)
: base(target)
{
// Remember state specific inheritance
@@ -131,9 +129,9 @@ public virtual void ResetRedirectStates()
/// InheritBool value.
public override InheritBool GetBackDraw(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackDraw(state) ?? Target.GetBackDraw(style, state);
+ return inherit?.GetBackDraw(state) ?? Target!.GetBackDraw(style, state);
}
///
@@ -144,9 +142,9 @@ public override InheritBool GetBackDraw(PaletteBackStyle style, PaletteState sta
/// PaletteGraphicsHint value.
public override PaletteGraphicsHint GetBackGraphicsHint(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackGraphicsHint(state) ?? Target.GetBackGraphicsHint(style, state);
+ return inherit?.GetBackGraphicsHint(state) ?? Target!.GetBackGraphicsHint(style, state);
}
///
@@ -157,9 +155,9 @@ public override PaletteGraphicsHint GetBackGraphicsHint(PaletteBackStyle style,
/// Color value.
public override Color GetBackColor1(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackColor1(state) ?? Target.GetBackColor1(style, state);
+ return inherit?.GetBackColor1(state) ?? Target!.GetBackColor1(style, state);
}
///
@@ -170,9 +168,9 @@ public override Color GetBackColor1(PaletteBackStyle style, PaletteState state)
/// Color value.
public override Color GetBackColor2(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackColor2(state) ?? Target.GetBackColor2(style, state);
+ return inherit?.GetBackColor2(state) ?? Target!.GetBackColor2(style, state);
}
///
@@ -183,9 +181,9 @@ public override Color GetBackColor2(PaletteBackStyle style, PaletteState state)
/// Color drawing style.
public override PaletteColorStyle GetBackColorStyle(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackColorStyle(state) ?? Target.GetBackColorStyle(style, state);
+ return inherit?.GetBackColorStyle(state) ?? Target!.GetBackColorStyle(style, state);
}
///
@@ -196,9 +194,9 @@ public override PaletteColorStyle GetBackColorStyle(PaletteBackStyle style, Pale
/// Color alignment style.
public override PaletteRectangleAlign GetBackColorAlign(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackColorAlign(state) ?? Target.GetBackColorAlign(style, state);
+ return inherit?.GetBackColorAlign(state) ?? Target!.GetBackColorAlign(style, state);
}
///
@@ -209,9 +207,9 @@ public override PaletteRectangleAlign GetBackColorAlign(PaletteBackStyle style,
/// Angle used for color drawing.
public override float GetBackColorAngle(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackColorAngle(state) ?? Target.GetBackColorAngle(style, state);
+ return inherit?.GetBackColorAngle(state) ?? Target!.GetBackColorAngle(style, state);
}
///
@@ -222,9 +220,9 @@ public override float GetBackColorAngle(PaletteBackStyle style, PaletteState sta
/// Image instance.
public override Image? GetBackImage(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackImage(state) ?? Target.GetBackImage(style, state);
+ return inherit?.GetBackImage(state) ?? Target!.GetBackImage(style, state);
}
///
@@ -235,9 +233,9 @@ public override float GetBackColorAngle(PaletteBackStyle style, PaletteState sta
/// Image style value.
public override PaletteImageStyle GetBackImageStyle(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackImageStyle(state) ?? Target.GetBackImageStyle(style, state);
+ return inherit?.GetBackImageStyle(state) ?? Target!.GetBackImageStyle(style, state);
}
///
@@ -248,14 +246,14 @@ public override PaletteImageStyle GetBackImageStyle(PaletteBackStyle style, Pale
/// Image alignment style.
public override PaletteRectangleAlign GetBackImageAlign(PaletteBackStyle style, PaletteState state)
{
- IPaletteBack inherit = GetInherit(state);
+ IPaletteBack? inherit = GetInherit(state);
- return inherit?.GetBackImageAlign(state) ?? Target.GetBackImageAlign(style, state);
+ return inherit?.GetBackImageAlign(state) ?? Target!.GetBackImageAlign(style, state);
}
#endregion
#region Implementation
- private IPaletteBack GetInherit(PaletteState state)
+ private IPaletteBack? GetInherit(PaletteState state)
{
switch (state)
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonBack.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonBack.cs
index 87be3feb6..dcfe9ebd8 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonBack.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonBack.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -18,12 +16,12 @@ namespace Krypton.Toolkit
public class PaletteRedirectRibbonBack : PaletteRedirect
{
#region Instance Fields
- private IPaletteRibbonBack _disabledBack;
- private IPaletteRibbonBack _normalBack;
- private IPaletteRibbonBack _pressedBack;
- private IPaletteRibbonBack _trackingBack;
- private IPaletteRibbonBack _selectedBack;
- private IPaletteRibbonBack _focusOverrideBack;
+ private IPaletteRibbonBack? _disabledBack;
+ private IPaletteRibbonBack? _normalBack;
+ private IPaletteRibbonBack? _pressedBack;
+ private IPaletteRibbonBack? _trackingBack;
+ private IPaletteRibbonBack? _selectedBack;
+ private IPaletteRibbonBack? _focusOverrideBack;
#endregion
#region Identity
@@ -60,12 +58,12 @@ public PaletteRedirectRibbonBack(PaletteBase target,
/// Redirection for selected states requests.
/// Redirection for back focus override state requests.
public PaletteRedirectRibbonBack(PaletteBase target,
- IPaletteRibbonBack disabledBack,
- IPaletteRibbonBack normalBack,
- IPaletteRibbonBack pressedBack,
- IPaletteRibbonBack trackingBack,
- IPaletteRibbonBack selectedBack,
- IPaletteRibbonBack focusOverrideBack)
+ IPaletteRibbonBack? disabledBack,
+ IPaletteRibbonBack? normalBack,
+ IPaletteRibbonBack? pressedBack,
+ IPaletteRibbonBack? trackingBack,
+ IPaletteRibbonBack? selectedBack,
+ IPaletteRibbonBack? focusOverrideBack)
: base(target)
{
// Remember state specific inheritance
@@ -144,7 +142,7 @@ public virtual void ResetRedirectStates()
/// Color value.
public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
return inherit?.GetRibbonBackColorStyle(state) ?? Target.GetRibbonBackColorStyle(style, state);
}
@@ -159,7 +157,7 @@ public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBac
/// Color value.
public override Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
return inherit?.GetRibbonBackColor1(state) ?? Target.GetRibbonBackColor1(style, state);
}
@@ -174,7 +172,7 @@ public override Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
return inherit?.GetRibbonBackColor2(state) ?? Target.GetRibbonBackColor2(style, state);
}
@@ -189,7 +187,7 @@ public override Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
return inherit?.GetRibbonBackColor3(state) ?? Target.GetRibbonBackColor3(style, state);
}
@@ -204,7 +202,7 @@ public override Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor4(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
return inherit?.GetRibbonBackColor4(state) ?? Target.GetRibbonBackColor4(style, state);
}
@@ -219,7 +217,7 @@ public override Color GetRibbonBackColor4(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
return inherit?.GetRibbonBackColor5(state) ?? Target.GetRibbonBackColor5(style, state);
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonDouble.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonDouble.cs
index 669586b0c..4c564ddf6 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonDouble.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectRibbonDouble.cs
@@ -18,18 +18,18 @@ namespace Krypton.Toolkit
public class PaletteRedirectRibbonDouble : PaletteRedirect
{
#region Instance Fields
- private IPaletteRibbonBack _disabledBack;
- private IPaletteRibbonBack _normalBack;
- private IPaletteRibbonBack _pressedBack;
- private IPaletteRibbonBack _trackingBack;
- private IPaletteRibbonBack _selectedBack;
- private IPaletteRibbonBack _focusOverrideBack;
- private IPaletteRibbonText _disabledText;
- private IPaletteRibbonText _normalText;
- private IPaletteRibbonText _pressedText;
- private IPaletteRibbonText _trackingText;
- private IPaletteRibbonText _selectedText;
- private IPaletteRibbonText _focusOverrideText;
+ private IPaletteRibbonBack? _disabledBack;
+ private IPaletteRibbonBack? _normalBack;
+ private IPaletteRibbonBack? _pressedBack;
+ private IPaletteRibbonBack? _trackingBack;
+ private IPaletteRibbonBack? _selectedBack;
+ private IPaletteRibbonBack? _focusOverrideBack;
+ private IPaletteRibbonText? _disabledText;
+ private IPaletteRibbonText? _normalText;
+ private IPaletteRibbonText? _pressedText;
+ private IPaletteRibbonText? _trackingText;
+ private IPaletteRibbonText? _selectedText;
+ private IPaletteRibbonText? _focusOverrideText;
#endregion
#region Identity
@@ -61,18 +61,18 @@ public PaletteRedirectRibbonDouble(PaletteBase target)
/// Redirection for text selected states requests.
/// Redirection for text focus override state requests.
public PaletteRedirectRibbonDouble(PaletteBase target,
- IPaletteRibbonBack disabledBack,
- IPaletteRibbonBack normalBack,
- IPaletteRibbonBack pressedBack,
- IPaletteRibbonBack trackingBack,
- IPaletteRibbonBack selectedBack,
- IPaletteRibbonBack focusOverrideBack,
- IPaletteRibbonText disabledText,
- IPaletteRibbonText normalText,
- IPaletteRibbonText pressedText,
- IPaletteRibbonText trackingText,
- IPaletteRibbonText selectedText,
- IPaletteRibbonText focusOverrideText
+ IPaletteRibbonBack? disabledBack,
+ IPaletteRibbonBack? normalBack,
+ IPaletteRibbonBack? pressedBack,
+ IPaletteRibbonBack? trackingBack,
+ IPaletteRibbonBack? selectedBack,
+ IPaletteRibbonBack? focusOverrideBack,
+ IPaletteRibbonText? disabledText,
+ IPaletteRibbonText? normalText,
+ IPaletteRibbonText? pressedText,
+ IPaletteRibbonText? trackingText,
+ IPaletteRibbonText? selectedText,
+ IPaletteRibbonText? focusOverrideText
)
: base(target)
{
@@ -166,9 +166,9 @@ public virtual void ResetRedirectStates()
/// Color value.
public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
- return inherit?.GetRibbonBackColorStyle(state) ?? Target.GetRibbonBackColorStyle(style, state);
+ return inherit?.GetRibbonBackColorStyle(state) ?? Target!.GetRibbonBackColorStyle(style, state);
}
#endregion
@@ -181,9 +181,9 @@ public override PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBac
/// Color value.
public override Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
- return inherit?.GetRibbonBackColor1(state) ?? Target.GetRibbonBackColor1(style, state);
+ return inherit?.GetRibbonBackColor1(state) ?? Target!.GetRibbonBackColor1(style, state);
}
#endregion
@@ -196,9 +196,9 @@ public override Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
- return inherit?.GetRibbonBackColor2(state) ?? Target.GetRibbonBackColor2(style, state);
+ return inherit?.GetRibbonBackColor2(state) ?? Target!.GetRibbonBackColor2(style, state);
}
#endregion
@@ -211,9 +211,9 @@ public override Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
- return inherit?.GetRibbonBackColor3(state) ?? Target.GetRibbonBackColor3(style, state);
+ return inherit?.GetRibbonBackColor3(state) ?? Target!.GetRibbonBackColor3(style, state);
}
#endregion
@@ -226,9 +226,9 @@ public override Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor4(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
- return inherit?.GetRibbonBackColor4(state) ?? Target.GetRibbonBackColor4(style, state);
+ return inherit?.GetRibbonBackColor4(state) ?? Target!.GetRibbonBackColor4(style, state);
}
#endregion
@@ -241,9 +241,9 @@ public override Color GetRibbonBackColor4(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state)
{
- IPaletteRibbonBack inherit = GetBackInherit(state);
+ IPaletteRibbonBack? inherit = GetBackInherit(state);
- return inherit?.GetRibbonBackColor5(state) ?? Target.GetRibbonBackColor5(style, state);
+ return inherit?.GetRibbonBackColor5(state) ?? Target!.GetRibbonBackColor5(style, state);
}
#endregion
@@ -256,14 +256,14 @@ public override Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteS
/// Color value.
public override Color GetRibbonTextColor(PaletteRibbonTextStyle style, PaletteState state)
{
- IPaletteRibbonText inherit = GetTextInherit(state);
+ IPaletteRibbonText? inherit = GetTextInherit(state);
- return inherit?.GetRibbonTextColor(state) ?? Target.GetRibbonTextColor(style, state);
+ return inherit?.GetRibbonTextColor(state) ?? Target!.GetRibbonTextColor(style, state);
}
#endregion
#region Implementation
- private IPaletteRibbonBack GetBackInherit(PaletteState state)
+ private IPaletteRibbonBack? GetBackInherit(PaletteState state)
{
switch (state)
{
@@ -288,7 +288,7 @@ private IPaletteRibbonBack GetBackInherit(PaletteState state)
}
}
- private IPaletteRibbonText GetTextInherit(PaletteState state)
+ private IPaletteRibbonText? GetTextInherit(PaletteState state)
{
switch (state)
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectTriple.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectTriple.cs
index 648ee43fc..878009566 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectTriple.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRedirect/PaletteRedirectTriple.cs
@@ -240,7 +240,7 @@ public override InheritBool GetBackDraw(PaletteBackStyle style, PaletteState sta
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackDraw(state) : Target!.GetBackDraw(style, state);
+ return inherit?.PaletteBack.GetBackDraw(state) ?? Target!.GetBackDraw(style, state);
}
///
@@ -253,7 +253,7 @@ public override PaletteGraphicsHint GetBackGraphicsHint(PaletteBackStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackGraphicsHint(state) : Target!.GetBackGraphicsHint(style, state);
+ return inherit?.PaletteBack.GetBackGraphicsHint(state) ?? Target!.GetBackGraphicsHint(style, state);
}
///
@@ -266,7 +266,7 @@ public override Color GetBackColor1(PaletteBackStyle style, PaletteState state)
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackColor1(state) : Target!.GetBackColor1(style, state);
+ return inherit?.PaletteBack.GetBackColor1(state) ?? Target!.GetBackColor1(style, state);
}
///
@@ -279,7 +279,7 @@ public override Color GetBackColor2(PaletteBackStyle style, PaletteState state)
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackColor2(state) : Target!.GetBackColor2(style, state);
+ return inherit?.PaletteBack.GetBackColor2(state) ?? Target!.GetBackColor2(style, state);
}
///
@@ -292,7 +292,7 @@ public override PaletteColorStyle GetBackColorStyle(PaletteBackStyle style, Pale
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackColorStyle(state) : Target!.GetBackColorStyle(style, state);
+ return inherit?.PaletteBack.GetBackColorStyle(state) ?? Target!.GetBackColorStyle(style, state);
}
///
@@ -305,7 +305,7 @@ public override PaletteRectangleAlign GetBackColorAlign(PaletteBackStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackColorAlign(state) : Target!.GetBackColorAlign(style, state);
+ return inherit?.PaletteBack.GetBackColorAlign(state) ?? Target!.GetBackColorAlign(style, state);
}
///
@@ -318,7 +318,7 @@ public override float GetBackColorAngle(PaletteBackStyle style, PaletteState sta
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackColorAngle(state) : Target!.GetBackColorAngle(style, state);
+ return inherit?.PaletteBack.GetBackColorAngle(state) ?? Target!.GetBackColorAngle(style, state);
}
///
@@ -331,7 +331,7 @@ public override float GetBackColorAngle(PaletteBackStyle style, PaletteState sta
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackImage(state) : Target!.GetBackImage(style, state);
+ return inherit?.PaletteBack.GetBackImage(state) ?? Target!.GetBackImage(style, state);
}
///
@@ -344,7 +344,7 @@ public override PaletteImageStyle GetBackImageStyle(PaletteBackStyle style, Pale
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackImageStyle(state) : Target!.GetBackImageStyle(style, state);
+ return inherit?.PaletteBack.GetBackImageStyle(state) ?? Target!.GetBackImageStyle(style, state);
}
///
@@ -357,7 +357,7 @@ public override PaletteRectangleAlign GetBackImageAlign(PaletteBackStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBack.GetBackImageAlign(state) : Target!.GetBackImageAlign(style, state);
+ return inherit?.PaletteBack.GetBackImageAlign(state) ?? Target!.GetBackImageAlign(style, state);
}
#endregion
@@ -372,7 +372,7 @@ public override InheritBool GetBorderDraw(PaletteBorderStyle style, PaletteState
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderDraw(state) : Target!.GetBorderDraw(style, state);
+ return inherit?.PaletteBorder?.GetBorderDraw(state) ?? Target!.GetBorderDraw(style, state);
}
///
@@ -385,7 +385,7 @@ public override PaletteDrawBorders GetBorderDrawBorders(PaletteBorderStyle style
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderDrawBorders(state) : Target!.GetBorderDrawBorders(style, state);
+ return inherit?.PaletteBorder?.GetBorderDrawBorders(state) ?? Target!.GetBorderDrawBorders(style, state);
}
///
@@ -398,7 +398,7 @@ public override PaletteGraphicsHint GetBorderGraphicsHint(PaletteBorderStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderGraphicsHint(state) : Target!.GetBorderGraphicsHint(style, state);
+ return inherit?.PaletteBorder?.GetBorderGraphicsHint(state) ?? Target!.GetBorderGraphicsHint(style, state);
}
///
@@ -411,7 +411,7 @@ public override Color GetBorderColor1(PaletteBorderStyle style, PaletteState sta
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderColor1(state) : Target!.GetBorderColor1(style, state);
+ return inherit?.PaletteBorder?.GetBorderColor1(state) ?? Target!.GetBorderColor1(style, state);
}
///
@@ -424,7 +424,7 @@ public override Color GetBorderColor2(PaletteBorderStyle style, PaletteState sta
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderColor2(state) : Target!.GetBorderColor2(style, state);
+ return inherit?.PaletteBorder?.GetBorderColor2(state) ?? Target!.GetBorderColor2(style, state);
}
///
@@ -437,7 +437,7 @@ public override PaletteColorStyle GetBorderColorStyle(PaletteBorderStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderColorStyle(state) : Target!.GetBorderColorStyle(style, state);
+ return inherit?.PaletteBorder?.GetBorderColorStyle(state) ?? Target!.GetBorderColorStyle(style, state);
}
///
@@ -450,7 +450,7 @@ public override PaletteRectangleAlign GetBorderColorAlign(PaletteBorderStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderColorAlign(state) : Target!.GetBorderColorAlign(style, state);
+ return inherit?.PaletteBorder?.GetBorderColorAlign(state) ?? Target!.GetBorderColorAlign(style, state);
}
///
@@ -463,7 +463,7 @@ public override float GetBorderColorAngle(PaletteBorderStyle style, PaletteState
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderColorAngle(state) : Target!.GetBorderColorAngle(style, state);
+ return inherit?.PaletteBorder?.GetBorderColorAngle(state) ?? Target!.GetBorderColorAngle(style, state);
}
///
@@ -476,7 +476,7 @@ public override int GetBorderWidth(PaletteBorderStyle style, PaletteState state)
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderWidth(state) : Target!.GetBorderWidth(style, state);
+ return inherit?.PaletteBorder?.GetBorderWidth(state) ?? Target!.GetBorderWidth(style, state);
}
///
@@ -489,7 +489,7 @@ public override float GetBorderRounding(PaletteBorderStyle style, PaletteState s
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderRounding(state) : Target!.GetBorderRounding(style, state);
+ return inherit?.PaletteBorder?.GetBorderRounding(state) ?? Target!.GetBorderRounding(style, state);
}
///
@@ -502,7 +502,7 @@ public override float GetBorderRounding(PaletteBorderStyle style, PaletteState s
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderImage(state) : Target!.GetBorderImage(style, state);
+ return inherit?.PaletteBorder?.GetBorderImage(state) ?? Target!.GetBorderImage(style, state);
}
///
@@ -515,7 +515,7 @@ public override PaletteImageStyle GetBorderImageStyle(PaletteBorderStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderImageStyle(state) : Target!.GetBorderImageStyle(style, state);
+ return inherit?.PaletteBorder?.GetBorderImageStyle(state) ?? Target!.GetBorderImageStyle(style, state);
}
///
@@ -528,7 +528,7 @@ public override PaletteRectangleAlign GetBorderImageAlign(PaletteBorderStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteBorder!.GetBorderImageAlign(state) : Target!.GetBorderImageAlign(style, state);
+ return inherit?.PaletteBorder?.GetBorderImageAlign(state) ?? Target!.GetBorderImageAlign(style, state);
}
#endregion
@@ -543,7 +543,7 @@ public override InheritBool GetContentDraw(PaletteContentStyle style, PaletteSta
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentDraw(state) : Target!.GetContentDraw(style, state);
+ return inherit?.PaletteContent?.GetContentDraw(state) ?? Target!.GetContentDraw(style, state);
}
///
@@ -556,7 +556,7 @@ public override InheritBool GetContentDrawFocus(PaletteContentStyle style, Palet
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentDrawFocus(state) : Target!.GetContentDrawFocus(style, state);
+ return inherit?.PaletteContent?.GetContentDrawFocus(state) ?? Target!.GetContentDrawFocus(style, state);
}
///
@@ -569,7 +569,7 @@ public override PaletteRelativeAlign GetContentImageH(PaletteContentStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentImageH(state) : Target!.GetContentImageH(style, state);
+ return inherit?.PaletteContent?.GetContentImageH(state) ?? Target!.GetContentImageH(style, state);
}
///
@@ -582,7 +582,7 @@ public override PaletteRelativeAlign GetContentImageV(PaletteContentStyle style,
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentImageV(state) : Target!.GetContentImageV(style, state);
+ return inherit?.PaletteContent?.GetContentImageV(state) ?? Target!.GetContentImageV(style, state);
}
///
@@ -595,7 +595,7 @@ public override PaletteImageEffect GetContentImageEffect(PaletteContentStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentImageEffect(state) : Target!.GetContentImageEffect(style, state);
+ return inherit?.PaletteContent?.GetContentImageEffect(state) ?? Target!.GetContentImageEffect(style, state);
}
///
@@ -608,7 +608,7 @@ public override Color GetContentImageColorMap(PaletteContentStyle style, Palette
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentImageColorMap(state) : Target!.GetContentImageColorMap(style, state);
+ return inherit?.PaletteContent?.GetContentImageColorMap(state) ??Target!.GetContentImageColorMap(style, state);
}
///
@@ -621,7 +621,7 @@ public override Color GetContentImageColorTo(PaletteContentStyle style, PaletteS
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentImageColorTo(state) : Target!.GetContentImageColorTo(style, state);
+ return inherit?.PaletteContent?.GetContentImageColorTo(state) ?? Target!.GetContentImageColorTo(style, state);
}
///
@@ -634,7 +634,7 @@ public override Color GetContentImageColorTo(PaletteContentStyle style, PaletteS
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextFont(state) : Target!.GetContentShortTextFont(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextFont(state) ?? Target!.GetContentShortTextFont(style, state);
}
///
@@ -647,7 +647,7 @@ public override PaletteTextHint GetContentShortTextHint(PaletteContentStyle styl
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextHint(state) : Target!.GetContentShortTextHint(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextHint(state) ?? Target!.GetContentShortTextHint(style, state);
}
///
@@ -660,7 +660,7 @@ public override PaletteTextHotkeyPrefix GetContentShortTextPrefix(PaletteContent
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextPrefix(state) : Target!.GetContentShortTextPrefix(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextPrefix(state) ?? Target!.GetContentShortTextPrefix(style, state);
}
///
@@ -673,9 +673,7 @@ public override InheritBool GetContentShortTextMultiLine(PaletteContentStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextMultiLine(state)
- : Target!.GetContentShortTextMultiLine(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextMultiLine(state) ?? Target!.GetContentShortTextMultiLine(style, state);
}
///
@@ -688,7 +686,7 @@ public override PaletteTextTrim GetContentShortTextTrim(PaletteContentStyle styl
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextTrim(state) : Target!.GetContentShortTextTrim(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextTrim(state) ?? Target!.GetContentShortTextTrim(style, state);
}
///
@@ -701,7 +699,7 @@ public override PaletteRelativeAlign GetContentShortTextH(PaletteContentStyle st
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextH(state) : Target!.GetContentShortTextH(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextH(state) ?? Target!.GetContentShortTextH(style, state);
}
///
@@ -714,7 +712,7 @@ public override PaletteRelativeAlign GetContentShortTextV(PaletteContentStyle st
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextV(state) : Target!.GetContentShortTextV(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextV(state) ?? Target!.GetContentShortTextV(style, state);
}
///
@@ -727,9 +725,7 @@ public override PaletteRelativeAlign GetContentShortTextMultiLineH(PaletteConten
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextMultiLineH(state)
- : Target!.GetContentShortTextMultiLineH(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextMultiLineH(state) ?? Target!.GetContentShortTextMultiLineH(style, state);
}
///
@@ -742,7 +738,7 @@ public override Color GetContentShortTextColor1(PaletteContentStyle style, Palet
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextColor1(state) : Target!.GetContentShortTextColor1(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextColor1(state) ?? Target!.GetContentShortTextColor1(style, state);
}
///
@@ -755,7 +751,7 @@ public override Color GetContentShortTextColor2(PaletteContentStyle style, Palet
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextColor2(state) : Target!.GetContentShortTextColor2(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextColor2(state) ?? Target!.GetContentShortTextColor2(style, state);
}
///
@@ -768,9 +764,7 @@ public override PaletteColorStyle GetContentShortTextColorStyle(PaletteContentSt
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextColorStyle(state)
- : Target!.GetContentShortTextColorStyle(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextColorStyle(state) ?? Target!.GetContentShortTextColorStyle(style, state);
}
///
@@ -783,9 +777,7 @@ public override PaletteRectangleAlign GetContentShortTextColorAlign(PaletteConte
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextColorAlign(state)
- : Target!.GetContentShortTextColorAlign(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextColorAlign(state) ?? Target!.GetContentShortTextColorAlign(style, state);
}
///
@@ -798,9 +790,7 @@ public override float GetContentShortTextColorAngle(PaletteContentStyle style, P
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextColorAngle(state)
- : Target!.GetContentShortTextColorAngle(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextColorAngle(state) ?? Target!.GetContentShortTextColorAngle(style, state);
}
///
@@ -813,7 +803,7 @@ public override float GetContentShortTextColorAngle(PaletteContentStyle style, P
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentShortTextImage(state) : Target!.GetContentShortTextImage(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextImage(state) ?? Target!.GetContentShortTextImage(style, state);
}
///
@@ -826,9 +816,7 @@ public override PaletteImageStyle GetContentShortTextImageStyle(PaletteContentSt
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextImageStyle(state)
- : Target!.GetContentShortTextImageStyle(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextImageStyle(state) ?? Target!.GetContentShortTextImageStyle(style, state);
}
///
@@ -841,9 +829,7 @@ public override PaletteRectangleAlign GetContentShortTextImageAlign(PaletteConte
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentShortTextImageAlign(state)
- : Target!.GetContentShortTextImageAlign(style, state);
+ return inherit?.PaletteContent?.GetContentShortTextImageAlign(state) ?? Target!.GetContentShortTextImageAlign(style, state);
}
///
@@ -856,7 +842,7 @@ public override PaletteRectangleAlign GetContentShortTextImageAlign(PaletteConte
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextFont(state) : Target!.GetContentLongTextFont(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextFont(state) ?? Target!.GetContentLongTextFont(style, state);
}
///
@@ -869,7 +855,7 @@ public override PaletteTextHint GetContentLongTextHint(PaletteContentStyle style
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextHint(state) : Target!.GetContentLongTextHint(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextHint(state) ?? Target!.GetContentLongTextHint(style, state);
}
///
@@ -882,7 +868,7 @@ public override InheritBool GetContentLongTextMultiLine(PaletteContentStyle styl
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextMultiLine(state) : Target!.GetContentLongTextMultiLine(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextMultiLine(state) ?? Target!.GetContentLongTextMultiLine(style, state);
}
///
@@ -895,7 +881,7 @@ public override PaletteTextTrim GetContentLongTextTrim(PaletteContentStyle style
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextTrim(state) : Target!.GetContentLongTextTrim(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextTrim(state) ?? Target!.GetContentLongTextTrim(style, state);
}
///
@@ -908,7 +894,7 @@ public override PaletteTextHotkeyPrefix GetContentLongTextPrefix(PaletteContentS
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextPrefix(state) : Target!.GetContentLongTextPrefix(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextPrefix(state) ?? Target!.GetContentLongTextPrefix(style, state);
}
///
@@ -921,7 +907,7 @@ public override PaletteRelativeAlign GetContentLongTextH(PaletteContentStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextH(state) : Target!.GetContentLongTextH(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextH(state) ?? Target!.GetContentLongTextH(style, state);
}
///
@@ -934,7 +920,7 @@ public override PaletteRelativeAlign GetContentLongTextV(PaletteContentStyle sty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextV(state) : Target!.GetContentLongTextV(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextV(state) ?? Target!.GetContentLongTextV(style, state);
}
///
@@ -947,9 +933,7 @@ public override PaletteRelativeAlign GetContentLongTextMultiLineH(PaletteContent
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentLongTextMultiLineH(state)
- : Target!.GetContentLongTextMultiLineH(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextMultiLineH(state) ?? Target!.GetContentLongTextMultiLineH(style, state);
}
///
@@ -962,7 +946,7 @@ public override Color GetContentLongTextColor1(PaletteContentStyle style, Palett
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextColor1(state) : Target!.GetContentLongTextColor1(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextColor1(state) ?? Target!.GetContentLongTextColor1(style, state);
}
///
@@ -975,7 +959,7 @@ public override Color GetContentLongTextColor2(PaletteContentStyle style, Palett
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextColor2(state) : Target!.GetContentLongTextColor2(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextColor2(state) ?? Target!.GetContentLongTextColor2(style, state);
}
///
@@ -988,9 +972,7 @@ public override PaletteColorStyle GetContentLongTextColorStyle(PaletteContentSty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentLongTextColorStyle(state)
- : Target!.GetContentLongTextColorStyle(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextColorStyle(state)?? Target!.GetContentLongTextColorStyle(style, state);
}
///
@@ -1003,9 +985,7 @@ public override PaletteRectangleAlign GetContentLongTextColorAlign(PaletteConten
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentLongTextColorAlign(state)
- : Target!.GetContentLongTextColorAlign(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextColorAlign(state) ?? Target!.GetContentLongTextColorAlign(style, state);
}
///
@@ -1018,9 +998,7 @@ public override float GetContentLongTextColorAngle(PaletteContentStyle style, Pa
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentLongTextColorAngle(state)
- : Target!.GetContentLongTextColorAngle(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextColorAngle(state) ?? Target!.GetContentLongTextColorAngle(style, state);
}
///
@@ -1033,7 +1011,7 @@ public override float GetContentLongTextColorAngle(PaletteContentStyle style, Pa
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentLongTextImage(state) : Target!.GetContentLongTextImage(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextImage(state) ?? Target!.GetContentLongTextImage(style, state);
}
///
@@ -1046,9 +1024,7 @@ public override PaletteImageStyle GetContentLongTextImageStyle(PaletteContentSty
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentLongTextImageStyle(state)
- : Target!.GetContentLongTextImageStyle(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextImageStyle(state) ?? Target!.GetContentLongTextImageStyle(style, state);
}
///
@@ -1061,9 +1037,7 @@ public override PaletteRectangleAlign GetContentLongTextImageAlign(PaletteConten
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null
- ? inherit.PaletteContent!.GetContentLongTextImageAlign(state)
- : Target!.GetContentLongTextImageAlign(style, state);
+ return inherit?.PaletteContent?.GetContentLongTextImageAlign(state) ?? Target!.GetContentLongTextImageAlign(style, state);
}
///
@@ -1076,7 +1050,7 @@ public override Padding GetContentPadding(PaletteContentStyle style, PaletteStat
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentPadding(state) : Target!.GetContentPadding(style, state);
+ return inherit?.PaletteContent?.GetContentPadding(state) ?? Target!.GetContentPadding(style, state);
}
///
@@ -1089,7 +1063,7 @@ public override int GetContentAdjacentGap(PaletteContentStyle style, PaletteStat
{
IPaletteTriple inherit = GetInherit(state);
- return inherit != null ? inherit.PaletteContent!.GetContentAdjacentGap(state) : Target!.GetContentAdjacentGap(style, state);
+ return inherit?.PaletteContent?.GetContentAdjacentGap(state) ?? Target!.GetContentAdjacentGap(style, state);
}
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs
index 990d2b903..f16a02071 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonBackInheritRedirect.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -33,7 +31,7 @@ public PaletteRibbonBackInheritRedirect([DisallowNull] PaletteRedirect redirect,
{
Debug.Assert(redirect != null);
- _redirect = redirect;
+ _redirect = redirect!;
StyleBack = styleBack;
}
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTab.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTab.cs
new file mode 100644
index 000000000..ea1365355
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTab.cs
@@ -0,0 +1,173 @@
+#region BSD License
+/*
+ * New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2024 - 2024. All rights reserved.
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ ///
+ /// Storage for general ribbon values.
+ ///
+ public class PaletteRibbonFileAppTab : Storage, IPaletteRibbonFileAppTab
+ {
+ #region Instance Fields
+ private Color _ribbonFileAppTabBottomColor;
+ private Color _ribbonFileAppTabTopColor;
+ private Color _ribbonFileAppTabTextColor;
+ private IPaletteRibbonFileAppTab _inherit;
+
+ #endregion
+
+ #region Identity
+ ///
+ /// Initialize a new instance of the PaletteRibbonGeneral class.
+ ///
+ /// Source for inheriting general values.
+ /// Delegate for notifying paint requests.
+ public PaletteRibbonFileAppTab([DisallowNull] IPaletteRibbonFileAppTab inherit,
+ NeedPaintHandler needPaint)
+ {
+ Debug.Assert(inherit != null);
+
+ // Remember inheritance
+ _inherit = inherit!;
+
+ // Store the provided paint notification delegate
+ NeedPaint = needPaint;
+
+ // Set default values
+ _ribbonFileAppTabBottomColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
+ _ribbonFileAppTabTopColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
+ _ribbonFileAppTabTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
+ }
+ #endregion
+
+ #region IsDefault
+ ///
+ /// Gets a value indicating if all values are default.
+ ///
+ [Browsable(false)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public override bool IsDefault => !ShouldSerializeRibbonFileAppTabBottomColor() &&
+ !ShouldSerializeRibbonFileAppTabTopColor() &&
+ !ShouldSerializeRibbonFileAppTabTextColor()
+ ;
+ #endregion
+
+ #region SetInherit
+ ///
+ /// Sets the inheritance parent.
+ ///
+ public void SetInherit(IPaletteRibbonFileAppTab inherit) => _inherit = inherit;
+
+ #endregion
+
+ #region PopulateFromBase
+ ///
+ /// Populate values from the base palette.
+ ///
+ public void PopulateFromBase()
+ {
+ RibbonFileAppTabBottomColor = GetRibbonFileAppTabBottomColor(PaletteState.Normal);
+ RibbonFileAppTabTopColor = GetRibbonFileAppTabTopColor(PaletteState.Normal);
+ RibbonFileAppTabTextColor = GetRibbonFileAppTabTextColor(PaletteState.Normal);
+ }
+ #endregion
+
+ #region RibbonFileAppTabBottomColor
+ ///
+ /// Gets access to ribbon app button dark color.
+ ///
+ [KryptonPersist(false)]
+ [Category(@"Visuals")]
+ [Description(@"Ribbon app button dark color.")]
+ [RefreshProperties(RefreshProperties.All)]
+ public Color RibbonFileAppTabBottomColor
+ {
+ get => _ribbonFileAppTabBottomColor;
+
+ set
+ {
+ if (_ribbonFileAppTabBottomColor != value)
+ {
+ _ribbonFileAppTabBottomColor = value;
+ PerformNeedPaint();
+ }
+ }
+ }
+ private void ResetRibbonFileAppTabBottomColor() => RibbonFileAppTabBottomColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
+ private bool ShouldSerializeRibbonFileAppTabBottomColor() => RibbonFileAppTabBottomColor != GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
+
+ ///
+ public Color GetRibbonFileAppTabBottomColor(PaletteState state) => ShouldSerializeRibbonFileAppTabBottomColor()
+ ? RibbonFileAppTabBottomColor
+ : _inherit.GetRibbonFileAppTabBottomColor(state);
+ #endregion
+
+ #region RibbonFileAppTabTopColor
+ ///
+ /// Gets access to ribbon app button light color.
+ ///
+ [KryptonPersist(false)]
+ [Category(@"Visuals")]
+ [Description(@"Ribbon app button light color.")]
+ [RefreshProperties(RefreshProperties.All)]
+ public Color RibbonFileAppTabTopColor
+ {
+ get => _ribbonFileAppTabTopColor;
+
+ set
+ {
+ if (_ribbonFileAppTabTopColor != value)
+ {
+ _ribbonFileAppTabTopColor = value;
+ PerformNeedPaint();
+ }
+ }
+ }
+ private void ResetRibbonFileAppTabTopColor() => RibbonFileAppTabTopColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
+ private bool ShouldSerializeRibbonFileAppTabTopColor() => RibbonFileAppTabTopColor != GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
+
+ ///
+ public Color GetRibbonFileAppTabTopColor(PaletteState state) => ShouldSerializeRibbonFileAppTabTopColor()
+ ? RibbonFileAppTabTopColor
+ : _inherit.GetRibbonFileAppTabTopColor(state);
+
+ #endregion
+
+ #region RibbonFileAppTabTextColor
+
+ ///
+ /// Gets access to ribbon app button text color.
+ ///
+ [KryptonPersist(false)]
+ [Category(@"Visuals")]
+ [Description(@"Ribbon app button text color.")]
+ [RefreshProperties(RefreshProperties.All)]
+ public Color RibbonFileAppTabTextColor
+ {
+ get => _ribbonFileAppTabTextColor;
+
+ set
+ {
+ if (_ribbonFileAppTabTextColor != value)
+ {
+ _ribbonFileAppTabTextColor = value;
+ PerformNeedPaint();
+ }
+ }
+ }
+ private void ResetRibbonFileAppTabTextColor() => RibbonFileAppTabTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
+ private bool ShouldSerializeRibbonFileAppTabTextColor() => RibbonFileAppTabTextColor != GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
+
+ ///
+ public Color GetRibbonFileAppTabTextColor(PaletteState state) => ShouldSerializeRibbonFileAppTabTextColor()
+ ? RibbonFileAppTabTextColor
+ : _inherit.GetRibbonFileAppTabTextColor(state);
+
+ #endregion
+
+ }
+}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTabInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTabInherit.cs
new file mode 100644
index 000000000..70ebe7e62
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTabInherit.cs
@@ -0,0 +1,24 @@
+#region BSD License
+/*
+ * New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2024 - 2024. All rights reserved.
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ ///
+ /// Provide inheritance of palette ribbon general properties.
+ ///
+ public abstract class PaletteRibbonFileAppTabInherit : GlobalId, IPaletteRibbonFileAppTab
+ {
+ ///
+ public abstract Color GetRibbonFileAppTabTopColor(PaletteState state);
+
+ ///
+ public abstract Color GetRibbonFileAppTabBottomColor(PaletteState state);
+
+ ///
+ public abstract Color GetRibbonFileAppTabTextColor(PaletteState state);
+ }
+}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTabInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTabInheritRedirect.cs
new file mode 100644
index 000000000..2a3cc223c
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonFileAppTabInheritRedirect.cs
@@ -0,0 +1,48 @@
+#region BSD License
+/*
+ * New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2024 - 2024. All rights reserved.
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ ///
+ /// Provide inheritance of palette ribbon "File App Tab" properties from source redirector.
+ ///
+ public class PaletteRibbonFileAppTabInheritRedirect : PaletteRibbonFileAppTabInherit
+ {
+ #region Instance Fields
+ private PaletteRedirect _redirect;
+ #endregion
+
+ #region Identity
+ ///
+ /// Initialize a new instance of the PaletteRibbonGeneralInheritRedirect class.
+ ///
+ /// Source for inherit requests.
+ public PaletteRibbonFileAppTabInheritRedirect([DisallowNull] PaletteRedirect redirect)
+ {
+ Debug.Assert(redirect != null);
+ _redirect = redirect!;
+ }
+ #endregion
+
+ #region SetRedirector
+ ///
+ /// Update the redirector with new reference.
+ ///
+ /// Target redirector.
+ public void SetRedirector(PaletteRedirect redirect) => _redirect = redirect;
+ #endregion
+
+ ///
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _redirect.GetRibbonFileAppTabBottomColor(state);
+
+ ///
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _redirect.GetRibbonFileAppTabTopColor(state);
+
+ ///
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _redirect.GetRibbonFileAppTabTextColor(state);
+ }
+}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs
index 18bfb74d9..6df22ff44 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneral.cs
@@ -1,17 +1,13 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
-
-
namespace Krypton.Toolkit
{
///
@@ -44,9 +40,6 @@ public class PaletteRibbonGeneral : Storage,
private Color _qatButtonLightColor;
private Color _tabSeparatorColor;
private Color _tabSeparatorContextColor;
- private Color _ribbonAppButtonDarkColor;
- private Color _ribbonAppButtonLightColor;
- private Color _ribbonAppButtonTextColor;
private Font? _textFont;
private float _ribbonTabRowGradientRaftingAngle;
private PaletteTextHint _textHint;
@@ -64,7 +57,7 @@ public PaletteRibbonGeneral([DisallowNull] IPaletteRibbonGeneral inherit,
Debug.Assert(inherit != null);
// Remember inheritance
- _inherit = inherit;
+ _inherit = inherit!;
// Store the provided paint notification delegate
NeedPaint = needPaint;
@@ -95,9 +88,6 @@ public PaletteRibbonGeneral([DisallowNull] IPaletteRibbonGeneral inherit,
_textHint = PaletteTextHint.Inherit;
_qatButtonDarkColor = GlobalStaticValues.EMPTY_COLOR;
_qatButtonLightColor = GlobalStaticValues.EMPTY_COLOR;
- _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
- _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
- _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
}
#endregion
@@ -124,9 +114,6 @@ public PaletteRibbonGeneral([DisallowNull] IPaletteRibbonGeneral inherit,
!ShouldSerializeTabRowBackgroundGradientRaftingDarkColor() &&
!ShouldSerializeTabRowBackgroundGradientRaftingLightColor() &&
!ShouldSerializeTabRowBackgroundGradientFirstColor() &&
- !ShouldSerializeRibbonAppButtonDarkColor() &&
- !ShouldSerializeRibbonAppButtonLightColor() &&
- !ShouldSerializeRibbonAppButtonTextColor() &&
!ShouldSerializeRibbonTabRowGradientRaftingAngle() &&
!ShouldSerializeRibbonShape() &&
!ShouldSerializeTabSeparatorColor() &&
@@ -169,9 +156,6 @@ public void PopulateFromBase()
TabRowBackgroundGradientRaftingLightColor = GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState.Normal);
TabRowBackgroundGradientFirstColor = GetRibbonTabRowGradientColor1(PaletteState.Normal);
RibbonTabRowGradientRaftingAngle = GetRibbonTabRowGradientRaftingAngle(PaletteState.Normal);
- RibbonAppButtonDarkColor = GetRibbonAppButtonDarkColor(PaletteState.Normal);
- RibbonAppButtonLightColor = GetRibbonAppButtonLightColor(PaletteState.Normal);
- RibbonAppButtonTextColor = GetRibbonAppButtonTextColor(PaletteState.Normal);
RibbonShape = GetRibbonShape();
TabSeparatorColor = GetRibbonTabSeparatorColor(PaletteState.Normal);
TabSeparatorContextColor = GetRibbonTabSeparatorContextColor(PaletteState.Normal);
@@ -775,102 +759,6 @@ public Color GetRibbonTabRowGradientColor1(PaletteState state) => ShouldSerializ
#endregion
- #region RibbonAppButtonDarkColor
-
- ///
- /// Gets access to ribbon app button dark color.
- ///
- [KryptonPersist(false)]
- [Category(@"Visuals")]
- [Description(@"Ribbon app button dark color.")]
- [RefreshProperties(RefreshProperties.All)]
- public Color RibbonAppButtonDarkColor
- {
- get => _ribbonAppButtonDarkColor;
-
- set
- {
- if (_ribbonAppButtonDarkColor != value)
- {
- _ribbonAppButtonDarkColor = value;
- PerformNeedPaint();
- }
- }
- }
- private void ResetRibbonAppButtonDarkColor() => RibbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
- private bool ShouldSerializeRibbonAppButtonDarkColor() => RibbonAppButtonDarkColor != GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
-
- ///
- public Color GetRibbonAppButtonDarkColor(PaletteState state) => ShouldSerializeRibbonAppButtonDarkColor()
- ? RibbonAppButtonDarkColor
- : _inherit.GetRibbonAppButtonDarkColor(state);
-
- #endregion
-
- #region RibbonAppButtonLightColor
-
- ///
- /// Gets access to ribbon app button light color.
- ///
- [KryptonPersist(false)]
- [Category(@"Visuals")]
- [Description(@"Ribbon app button light color.")]
- [RefreshProperties(RefreshProperties.All)]
- public Color RibbonAppButtonLightColor
- {
- get => _ribbonAppButtonLightColor;
-
- set
- {
- if (_ribbonAppButtonLightColor != value)
- {
- _ribbonAppButtonLightColor = value;
- PerformNeedPaint();
- }
- }
- }
- private void ResetRibbonAppButtonLightColor() => RibbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
- private bool ShouldSerializeRibbonAppButtonLightColor() => RibbonAppButtonLightColor != GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
-
- ///
- public Color GetRibbonAppButtonLightColor(PaletteState state) => ShouldSerializeRibbonAppButtonLightColor()
- ? RibbonAppButtonLightColor
- : _inherit.GetRibbonAppButtonLightColor(state);
-
- #endregion
-
- #region RibbonAppButtonTextColor
-
- ///
- /// Gets access to ribbon app button text color.
- ///
- [KryptonPersist(false)]
- [Category(@"Visuals")]
- [Description(@"Ribbon app button text color.")]
- [RefreshProperties(RefreshProperties.All)]
- public Color RibbonAppButtonTextColor
- {
- get => _ribbonAppButtonTextColor;
-
- set
- {
- if (_ribbonAppButtonTextColor != value)
- {
- _ribbonAppButtonTextColor = value;
- PerformNeedPaint();
- }
- }
- }
- private void ResetRibbonAppButtonTextColor() => RibbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
- private bool ShouldSerializeRibbonAppButtonTextColor() => RibbonAppButtonTextColor != GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
-
- ///
- public Color GetRibbonAppButtonTextColor(PaletteState state) => ShouldSerializeRibbonAppButtonTextColor()
- ? RibbonAppButtonTextColor
- : _inherit.GetRibbonAppButtonTextColor(state);
-
- #endregion
-
#region RibbonTabRowGradientRaftingAngle
///
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInherit.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInherit.cs
index 3e17a8165..7e380e128 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInherit.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInherit.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -178,19 +176,9 @@ public abstract class PaletteRibbonGeneralInherit : GlobalId,
/// Palette value should be applicable to this state.
/// Color value.
public abstract Color GetRibbonTabRowBackgroundSolidColor(PaletteState state);
-
- ///
- public abstract Color GetRibbonTabRowGradientColor1(PaletteState state);
-
- ///
- public abstract Color GetRibbonAppButtonDarkColor(PaletteState state);
///
- public abstract Color GetRibbonAppButtonLightColor(PaletteState state);
-
- ///
- public abstract Color GetRibbonAppButtonTextColor(PaletteState state);
-
+ public abstract Color GetRibbonTabRowGradientColor1(PaletteState state);
/// Gets the ribbon tab row gradient rafting angle.
/// Palette value should be applicable to this state.
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs
index dbfd31779..02bfd30f5 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Base/PaletteRibbon/PaletteRibbonGeneralInheritRedirect.cs
@@ -29,7 +29,7 @@ public class PaletteRibbonGeneralInheritRedirect : PaletteRibbonGeneralInherit
public PaletteRibbonGeneralInheritRedirect([DisallowNull] PaletteRedirect redirect)
{
Debug.Assert(redirect != null);
- _redirect = redirect;
+ _redirect = redirect!;
}
#endregion
@@ -205,18 +205,6 @@ public PaletteRibbonGeneralInheritRedirect([DisallowNull] PaletteRedirect redire
public override Color GetRibbonTabRowGradientColor1(PaletteState state) =>
_redirect.GetRibbonTabRowGradientColor1(state);
- ///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) =>
- _redirect.GetRibbonAppButtonDarkColor(state);
-
- ///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) =>
- _redirect.GetRibbonAppButtonLightColor(state);
-
- ///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) =>
- _redirect.GetRibbonAppButtonTextColor(state);
-
/// Gets the ribbon tab row gradient rafting angle.
/// Palette value should be applicable to this state.
/// The gradient rafting angle.
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Base/PaletteBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Base/PaletteBase.cs
index 6a7888d8b..d7aab848d 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Base/PaletteBase.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Base/PaletteBase.cs
@@ -1,2071 +1,2069 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
namespace Krypton.Toolkit
{
- ///
- /// Provides base class implementation for palettes.
- ///
- [ToolboxItem(false)]
- public abstract class PaletteBase : Component
- {
- #region Instance Fields
-
- private Padding? _inputControlPadding;
- private PaletteDragFeedback _dragFeedback;
+ ///
+ /// Provides base class implementation for palettes.
+ ///
+ [ToolboxItem(false)]
+ public abstract class PaletteBase : Component
+ {
+ #region Instance Fields
+
+ private Padding? _inputControlPadding;
+ private PaletteDragFeedback _dragFeedback;
private Image[] _toolBarImages;
- private readonly Font _defaultFontStyle = new Font("Segoe UI", 9f, FontStyle.Regular);
-
- #region Font Stuff
-
- private Font _baseFont; // = _defaultFontStyle;
- public Font? BoldFont;
- public Font? ItalicFont;
- public Font? Header1ShortFont;
- public Font? Header2ShortFont;
- public Font? Header1LongFont;
- public Font? Header2LongFont;
- public Font? SuperToolFont;
- public Font? HeaderFormFont;
- public Font? ButtonFont;
- public Font? ButtonFontNavigatorStack;
- public Font? ButtonFontNavigatorMini;
- public Font? TabFontNormal;
- public Font? TabFontSelected;
- public Font? RibbonTabFont;
- public Font? GridFont;
- public Font? CalendarFont;
- public Font? CalendarBoldFont;
- public Font? RibbonTabContextFont;
-
- #endregion
-
- #endregion
-
- #region Events
- ///
- /// Occurs when a palette change requires a repaint.
- ///
- public event EventHandler? PalettePaint;
-
- ///
- /// Occurs when the UseThemeFormChromeBorderWidth setting changes.
- ///
- public event EventHandler? UseThemeFormChromeBorderWidthChanged;
-
- ///
- /// Occurs when the BasePalette/BasePaletteMode setting changes.
- ///
- public event EventHandler? BasePaletteChanged;
-
- ///
- /// Occurs when the BaseRenderer/BaseRendererMode setting changes.
- ///
- public event EventHandler? BaseRendererChanged;
-
- ///
- /// Occurs when a button spec change occurs.
- ///
- public event EventHandler? ButtonSpecChanged;
- #endregion
-
- #region Identity
- /// Initializes a new instance of the class.
- protected PaletteBase()
- {
- // We need to notice when system color settings change
- SystemEvents.UserPreferenceChanged += OnUserPreferenceChanged;
-
- // Inherit means we need to calculate the value next time it is requested
- _dragFeedback = PaletteDragFeedback.Inherit;
-
- BaseFont = _defaultFontStyle;
- }
- #endregion
-
- #region UseThemeFormChromeBorderWidth
- private InheritBool _allowFormChrome = InheritBool.True;
-
- ///
- /// Gets or sets a value indicating if KryptonForm instances should UseThemeFormChromeBorderWidth.
- ///
- /// InheritBool value.
- [KryptonPersist(false)]
- [Category(@"Visuals")]
- [Description(@"Should KryptonForm instances UseThemeFormChromeBorderWidth.")]
- [DefaultValue(InheritBool.Inherit)]
- public virtual InheritBool UseThemeFormChromeBorderWidth
- {
- get => _allowFormChrome;
-
- set
- {
- if (_allowFormChrome != value)
- {
- _allowFormChrome = value;
- OnUseThemeFormChromeBorderWidthChanged(this, EventArgs.Empty);
- }
- }
- }
- private void ResetUseThemeFormChromeBorderWidth() => UseThemeFormChromeBorderWidth = InheritBool.True;
- private bool ShouldSerializeUseThemeFormChromeBorderWidth() => UseThemeFormChromeBorderWidth != InheritBool.True;
- #endregion
-
- #region Renderer
- ///
- /// Gets the renderer to use for this palette.
- ///
- /// Renderer to use for drawing palette settings.
- public abstract IRenderer GetRenderer();
- #endregion
-
- #region Back
- ///
- /// Gets a value indicating if background should be drawn.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// InheritBool value.
- public abstract InheritBool GetBackDraw(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the graphics drawing hint for the background.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// PaletteGraphicsHint value.
- public abstract PaletteGraphicsHint GetBackGraphicsHint(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the first background color.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetBackColor1(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the second back color.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetBackColor2(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the color background drawing style.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color drawing style.
- public abstract PaletteColorStyle GetBackColorStyle(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the color alignment.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color alignment style.
- public abstract PaletteRectangleAlign GetBackColorAlign(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the color background angle.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Angle used for color drawing.
- public abstract float GetBackColorAngle(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets a background image.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Image instance.
- public abstract Image? GetBackImage(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the background image style.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Image style value.
- public abstract PaletteImageStyle GetBackImageStyle(PaletteBackStyle style, PaletteState state);
-
- ///
- /// Gets the image alignment.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Image alignment style.
- public abstract PaletteRectangleAlign GetBackImageAlign(PaletteBackStyle style, PaletteState state);
- #endregion
-
- #region Border
- ///
- /// Gets a value indicating if border should be drawn.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// InheritBool value.
- public abstract InheritBool GetBorderDraw(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets a value indicating which borders to draw.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// PaletteDrawBorders value.
- public abstract PaletteDrawBorders GetBorderDrawBorders(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the graphics drawing hint for the border.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// PaletteGraphicsHint value.
- public abstract PaletteGraphicsHint GetBorderGraphicsHint(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the first border color.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetBorderColor1(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the second border color.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetBorderColor2(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the color border drawing style.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Color drawing style.
- public abstract PaletteColorStyle GetBorderColorStyle(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the color border alignment.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Color alignment style.
- public abstract PaletteRectangleAlign GetBorderColorAlign(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the color border angle.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Angle used for color drawing.
- public abstract float GetBorderColorAngle(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the border width.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Integer width.
- public abstract int GetBorderWidth(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the border corner rounding.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Float rounding.
- public abstract float GetBorderRounding(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets a border image.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Image instance.
- public abstract Image? GetBorderImage(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the border image style.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Image style value.
- public abstract PaletteImageStyle GetBorderImageStyle(PaletteBorderStyle style, PaletteState state);
-
- ///
- /// Gets the image border alignment.
- ///
- /// Border style.
- /// Palette value should be applicable to this state.
- /// Image alignment style.
- public abstract PaletteRectangleAlign GetBorderImageAlign(PaletteBorderStyle style, PaletteState state);
- #endregion
-
- #region Content
- ///
- /// Gets a value indicating if content should be drawn.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// InheritBool value.
- public abstract InheritBool GetContentDraw(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets a value indicating if content should be drawn with focus indication.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// InheritBool value.
- public abstract InheritBool GetContentDrawFocus(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the horizontal relative alignment of the image.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentImageH(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the vertical relative alignment of the image.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentImageV(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the effect applied to drawing of the image.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteImageEffect value.
- public abstract PaletteImageEffect GetContentImageEffect(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the image color to remap into another color.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentImageColorMap(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color to use in place of the image map color.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentImageColorTo(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the image color that should be transparent.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentImageColorTransparent(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the font for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Font? GetContentShortTextFont(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the font for the short text by generating a new font instance.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Font? GetContentShortTextNewFont(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the rendering hint for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteTextHint value.
- public abstract PaletteTextHint GetContentShortTextHint(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the prefix drawing setting for short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteTextPrefix value.
- public abstract PaletteTextHotkeyPrefix GetContentShortTextPrefix(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the flag indicating if multiline text is allowed for short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// InheritBool value.
- public abstract InheritBool GetContentShortTextMultiLine(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the text trimming to use for short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteTextTrim value.
- public abstract PaletteTextTrim GetContentShortTextTrim(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the horizontal relative alignment of the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentShortTextH(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the vertical relative alignment of the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentShortTextV(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the horizontal relative alignment of multiline short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentShortTextMultiLineH(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the first back color for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentShortTextColor1(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the second back color for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentShortTextColor2(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color drawing style for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color drawing style.
- public abstract PaletteColorStyle GetContentShortTextColorStyle(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color alignment for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color alignment style.
- public abstract PaletteRectangleAlign GetContentShortTextColorAlign(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color background angle for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Angle used for color drawing.
- public abstract float GetContentShortTextColorAngle(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets a background image for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Image instance.
- public abstract Image? GetContentShortTextImage(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the background image style.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Image style value.
- public abstract PaletteImageStyle GetContentShortTextImageStyle(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the image alignment for the short text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Image alignment style.
- public abstract PaletteRectangleAlign GetContentShortTextImageAlign(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the font for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Font? GetContentLongTextFont(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the font for the long text by generating a new font instance.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Font? GetContentLongTextNewFont(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the rendering hint for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteTextHint value.
- public abstract PaletteTextHint GetContentLongTextHint(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the prefix drawing setting for long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteTextPrefix value.
- public abstract PaletteTextHotkeyPrefix GetContentLongTextPrefix(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the flag indicating if multiline text is allowed for long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// InheritBool value.
- public abstract InheritBool GetContentLongTextMultiLine(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the text trimming to use for long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// PaletteTextTrim value.
- public abstract PaletteTextTrim GetContentLongTextTrim(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the horizontal relative alignment of the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentLongTextH(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the vertical relative alignment of the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentLongTextV(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the horizontal relative alignment of multiline long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// RelativeAlignment value.
- public abstract PaletteRelativeAlign GetContentLongTextMultiLineH(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the first back color for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentLongTextColor1(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the second back color for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetContentLongTextColor2(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color drawing style for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color drawing style.
- public abstract PaletteColorStyle GetContentLongTextColorStyle(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color alignment for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Color alignment style.
- public abstract PaletteRectangleAlign GetContentLongTextColorAlign(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the color background angle for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Angle used for color drawing.
- public abstract float GetContentLongTextColorAngle(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets a background image for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Image instance.
- public abstract Image? GetContentLongTextImage(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the background image style for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Image style value.
- public abstract PaletteImageStyle GetContentLongTextImageStyle(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the image alignment for the long text.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Image alignment style.
- public abstract PaletteRectangleAlign GetContentLongTextImageAlign(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the padding between the border and content drawing.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Padding value.
- public abstract Padding GetContentPadding(PaletteContentStyle style, PaletteState state);
-
- ///
- /// Gets the padding between adjacent content items.
- ///
- /// Content style.
- /// Palette value should be applicable to this state.
- /// Integer value.
- public abstract int GetContentAdjacentGap(PaletteContentStyle style, PaletteState state);
- #endregion
-
- #region Metric
- ///
- /// Gets an integer metric value.
- ///
- /// Palette value should be applicable to this state.
- /// Requested metric.
- /// Integer value.
- public abstract int GetMetricInt(PaletteState state, PaletteMetricInt metric);
-
- ///
- /// Gets a boolean metric value.
- ///
- /// Palette value should be applicable to this state.
- /// Requested metric.
- /// InheritBool value.
- public abstract InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric);
-
- ///
- /// Gets a padding metric value.
- ///
- /// Palette value should be applicable to this state.
- /// Requested metric.
- /// Padding value.
- public abstract Padding GetMetricPadding(PaletteState state, PaletteMetricPadding metric);
-
- #endregion
-
- #region Images
-
- ///
- /// Gets a tree view image appropriate for the provided state.
- ///
- /// Is the node expanded
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetTreeViewImage(bool expanded);
-
- ///
- /// Gets a check box image appropriate for the provided state.
- ///
- /// Is the check box enabled.
- /// Is the check box checked/unchecked/indeterminate.
- /// Is the check box being hot tracked.
- /// Is the check box being pressed.
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetCheckBoxImage(bool enabled, CheckState checkState, bool tracking, bool pressed);
-
- ///
- /// Gets a check box image appropriate for the provided state.
- ///
- /// Is the radio button enabled.
- /// Is the radio button checked.
- /// Is the radio button being hot tracked.
- /// Is the radio button being pressed.
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetRadioButtonImage(bool enabled, bool checkState, bool tracking, bool pressed);
-
- ///
- /// Gets a drop down button image appropriate for the provided state.
- ///
- /// PaletteState for which image is required.
- public abstract Image? GetDropDownButtonImage(PaletteState state);
-
- ///
- /// Gets a checked image appropriate for a context menu item.
- ///
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetContextMenuCheckedImage();
-
- ///
- /// Gets a indeterminate image appropriate for a context menu item.
- ///
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetContextMenuIndeterminateImage();
-
- ///
- /// Gets an image indicating a sub-menu on a context menu item.
- ///
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetContextMenuSubMenuImage();
-
- ///
- /// Gets a check box image appropriate for the provided state.
- ///
- /// Enum of the button to fetch.
- /// State of the button to fetch.
- /// Appropriate image for drawing; otherwise null.
- public abstract Image? GetGalleryButtonImage(PaletteRibbonGalleryButton button, PaletteState state);
- #endregion
-
- #region ButtonSpec
-
- ///
- /// Gets the icon to display for the button.
- ///
- /// Style of button spec.
- /// Icon value.
- public virtual Icon? GetButtonSpecIcon(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- return null;
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- default:
- // Should never happen!
- Debug.Assert(false);
- throw DebugTools.NotImplemented(style.ToString());
- }
- }
-
- ///
- /// Gets the image to display for the button.
- ///
- /// Style of button spec.
- /// State for which image is required.
- /// Image value.
- public abstract Image? GetButtonSpecImage(PaletteButtonSpecStyle style, PaletteState state);
-
- ///
- /// Gets the image transparent color.
- ///
- /// Style of button spec.
- /// Color value.
- public virtual Color GetButtonSpecImageTransparentColor(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- return GlobalStaticValues.EMPTY_COLOR;
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- return Color.Magenta;
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return GlobalStaticValues.EMPTY_COLOR;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return GlobalStaticValues.EMPTY_COLOR;
- }
- }
-
- ///
- /// Gets the short text to display for the button.
- ///
- /// Style of button spec.
- /// String value.
- public virtual string GetButtonSpecShortText(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return string.Empty;
- default:
- // Should never happen!
- Debug.Assert(false);
- throw DebugTools.NotImplemented(style.ToString());
- }
- }
-
- ///
- /// Gets the long text to display for the button.
- ///
- /// Style of button spec.
- /// String value.
- public virtual string GetButtonSpecLongText(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return string.Empty;
- default:
- // Should never happen!
- Debug.Assert(false);
- throw DebugTools.NotImplemented(style.ToString());
- }
- }
-
- ///
- /// Gets the tooltip title text to display for the button.
- ///
- /// Style of button spec.
- /// String value.
- public virtual string GetButtonSpecToolTipTitle(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- // TODO: Use LanguageManager for strings
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.FormClose:
- return "Close";
- case PaletteButtonSpecStyle.Context:
- return "Select";
- case PaletteButtonSpecStyle.Next:
- return "Next";
- case PaletteButtonSpecStyle.Previous:
- return "Previous";
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.PendantMin:
- return "Minimize";
- case PaletteButtonSpecStyle.FormMax:
- return "Maximize";
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.FormRestore:
- return "Restore";
- case PaletteButtonSpecStyle.FormHelp:
- return nameof(Help);
- case PaletteButtonSpecStyle.RibbonMinimize:
- return "Minimize";
- case PaletteButtonSpecStyle.RibbonExpand:
- return "Expand";
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return string.Empty;
- default:
- // Should never happen!
- Debug.Assert(false);
- throw DebugTools.NotImplemented(style.ToString());
- }
- }
-
- ///
- /// Gets the color to remap from the image to the container foreground.
- ///
- /// Style of button spec.
- /// Color value.
- public virtual Color GetButtonSpecColorMap(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return GlobalStaticValues.EMPTY_COLOR;
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- return Color.Black;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return GlobalStaticValues.EMPTY_COLOR;
- }
- }
-
- ///
- /// Gets the color to remap to transparent.
- ///
- /// Style of button spec.
- /// Color value.
- public virtual Color GetButtonSpecColorTransparent(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return GlobalStaticValues.EMPTY_COLOR;
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- return Color.Magenta;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return GlobalStaticValues.EMPTY_COLOR;
- }
- }
-
- ///
- /// Gets the button style used for drawing the button.
- ///
- /// Style of button spec.
- /// PaletteButtonStyle value.
- public virtual PaletteButtonStyle GetButtonSpecStyle(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- return PaletteButtonStyle.Form;
- case PaletteButtonSpecStyle.FormClose:
- return PaletteButtonStyle.FormClose;
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return PaletteButtonStyle.ButtonSpec;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return PaletteButtonStyle.ButtonSpec;
- }
- }
-
- ///
- /// Get the location for the button.
- ///
- /// Style of button spec.
- /// HeaderLocation value.
- public virtual HeaderLocation GetButtonSpecLocation(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return HeaderLocation.PrimaryHeader;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return HeaderLocation.PrimaryHeader;
- }
- }
-
- ///
- /// Gets the edge to position the button against.
- ///
- /// Style of button spec.
- /// PaletteRelativeEdgeAlign value.
- public virtual PaletteRelativeEdgeAlign GetButtonSpecEdge(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return PaletteRelativeEdgeAlign.Far;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return PaletteRelativeEdgeAlign.Far;
- }
- }
-
- ///
- /// Gets the button orientation.
- ///
- /// Style of button spec.
- /// PaletteButtonOrientation value.
- public virtual PaletteButtonOrientation GetButtonSpecOrientation(PaletteButtonSpecStyle style)
- {
- switch (style)
- {
- case PaletteButtonSpecStyle.Close:
- case PaletteButtonSpecStyle.Context:
- case PaletteButtonSpecStyle.ArrowLeft:
- case PaletteButtonSpecStyle.ArrowRight:
- case PaletteButtonSpecStyle.ArrowUp:
- case PaletteButtonSpecStyle.ArrowDown:
- case PaletteButtonSpecStyle.DropDown:
- case PaletteButtonSpecStyle.PinVertical:
- case PaletteButtonSpecStyle.PinHorizontal:
- case PaletteButtonSpecStyle.FormClose:
- case PaletteButtonSpecStyle.FormMin:
- case PaletteButtonSpecStyle.FormMax:
- case PaletteButtonSpecStyle.FormRestore:
- case PaletteButtonSpecStyle.FormHelp:
- case PaletteButtonSpecStyle.PendantClose:
- case PaletteButtonSpecStyle.PendantMin:
- case PaletteButtonSpecStyle.PendantRestore:
- case PaletteButtonSpecStyle.WorkspaceMaximize:
- case PaletteButtonSpecStyle.WorkspaceRestore:
- case PaletteButtonSpecStyle.RibbonMinimize:
- case PaletteButtonSpecStyle.RibbonExpand:
- case PaletteButtonSpecStyle.New:
- case PaletteButtonSpecStyle.Open:
- case PaletteButtonSpecStyle.SaveAll:
- case PaletteButtonSpecStyle.SaveAs:
- case PaletteButtonSpecStyle.Save:
- case PaletteButtonSpecStyle.Cut:
- case PaletteButtonSpecStyle.Copy:
- case PaletteButtonSpecStyle.Paste:
- case PaletteButtonSpecStyle.Undo:
- case PaletteButtonSpecStyle.Redo:
- case PaletteButtonSpecStyle.PageSetup:
- case PaletteButtonSpecStyle.PrintPreview:
- case PaletteButtonSpecStyle.Print:
- case PaletteButtonSpecStyle.QuickPrint:
- return PaletteButtonOrientation.FixedTop;
- case PaletteButtonSpecStyle.Generic:
- case PaletteButtonSpecStyle.Next:
- case PaletteButtonSpecStyle.Previous:
- return PaletteButtonOrientation.Auto;
- default:
- // Should never happen!
- Debug.Assert(false);
- DebugTools.NotImplemented(style.ToString());
- return PaletteButtonOrientation.Auto;
- }
- }
-
- #endregion
-
- #region RibbonGeneral
- ///
- /// Gets the ribbon shape that should be used.
- ///
- /// Ribbon shape value.
- public abstract PaletteRibbonShape GetRibbonShape();
-
- ///
- /// Gets the text alignment for the ribbon context text.
- ///
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract PaletteRelativeAlign GetRibbonContextTextAlign(PaletteState state);
-
- ///
- /// Gets the font for the ribbon context text.
- ///
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Font GetRibbonContextTextFont(PaletteState state);
-
- ///
- /// Gets the color for the ribbon context text.
- ///
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Color GetRibbonContextTextColor(PaletteState state);
-
- ///
- /// Gets the dark disabled color used for ribbon glyphs.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonDisabledDark(PaletteState state);
-
- ///
- /// Gets the light disabled color used for ribbon glyphs.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonDisabledLight(PaletteState state);
-
- ///
- /// Gets the color for the drop arrow light.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonDropArrowLight(PaletteState state);
-
- ///
- /// Gets the color for the drop arrow dark.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonDropArrowDark(PaletteState state);
-
- ///
- /// Gets the color for the dialog launcher dark.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonGroupDialogDark(PaletteState state);
-
- ///
- /// Gets the color for the dialog launcher light.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonGroupDialogLight(PaletteState state);
-
- ///
- /// Gets the color for the group separator dark.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonGroupSeparatorDark(PaletteState state);
-
- ///
- /// Gets the color for the group separator light.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonGroupSeparatorLight(PaletteState state);
-
- ///
- /// Gets the color for the minimize bar dark.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonMinimizeBarDark(PaletteState state);
-
- ///
- /// Gets the color for the minimize bar light.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonMinimizeBarLight(PaletteState state);
-
- ///
- /// Gets the gradient dark rafting color for the tab background.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonTabRowBackgroundGradientRaftingDark(PaletteState state);
-
- ///
- /// Gets the gradient light rafting color for the tab background.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState state);
-
- ///
- /// Gets the solid color for the tab background.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonTabRowBackgroundSolidColor(PaletteState state);
-
- ///
- /// Gets the color for the tab separator.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonTabSeparatorColor(PaletteState state);
-
- ///
- /// Gets the color for the tab context separators.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonTabSeparatorContextColor(PaletteState state);
-
- ///
- /// Gets the font for the ribbon text.
- ///
- /// Palette value should be applicable to this state.
- /// Font value.
- public abstract Font GetRibbonTextFont(PaletteState state);
-
- ///
- /// Gets the rendering hint for the ribbon font.
- ///
- /// Palette value should be applicable to this state.
- /// PaletteTextHint value.
- public abstract PaletteTextHint GetRibbonTextHint(PaletteState state);
-
- ///
- /// Gets the color for the extra QAT button dark content color.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonQATButtonDark(PaletteState state);
-
- ///
- /// Gets the color for the extra QAT button light content color.
- ///
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonQATButtonLight(PaletteState state);
-
- /// Gets the ribbon tab row gradient first color.
- /// Palette value should be applicable to this state.
- /// The gradient first color.
- public abstract Color GetRibbonTabRowGradientColor1(PaletteState state);
-
- /// Gets the ribbon app button dark color.
- /// Palette value should be applicable to this state.
- /// The app button dark color.
- public abstract Color GetRibbonAppButtonDarkColor(PaletteState state);
-
- /// Gets the ribbon app button light color.
- /// Palette value should be applicable to this state.
- /// The app button light color.
- public abstract Color GetRibbonAppButtonLightColor(PaletteState state);
-
- /// Gets the ribbon app button text color.
- /// Palette value should be applicable to this state.
- /// The app button text color.
- public abstract Color GetRibbonAppButtonTextColor(PaletteState state);
-
- /// Gets the ribbon tab row gradient rafting angle.
- /// Palette value should be applicable to this state.
- /// The gradient rafting angle.
- public abstract float GetRibbonTabRowGradientRaftingAngle(PaletteState state);
- #endregion
-
- #region RibbonBack
- ///
- /// Gets the method used to draw the background of a ribbon item.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// PaletteRibbonBackStyle value.
- public abstract PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state);
-
- ///
- /// Gets the first background color for the ribbon item.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteState state);
-
- ///
- /// Gets the second background color for the ribbon item.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteState state);
-
- ///
- /// Gets the third background color for the ribbon item.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteState state);
-
- ///
- /// Gets the fourth background color for the ribbon item.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonBackColor4(PaletteRibbonBackStyle style, PaletteState state);
-
- ///
- /// Gets the fifth background color for the ribbon item.
- ///
- /// Background style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state);
- #endregion
-
- #region RibbonText
- ///
- /// Gets the tab color for the item text.
- ///
- /// Text style.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetRibbonTextColor(PaletteRibbonTextStyle style, PaletteState state);
- #endregion
-
- #region ElementColor
- ///
- /// Gets the first element color.
- ///
- /// Element for which color is required.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetElementColor1(PaletteElement element, PaletteState state);
-
- ///
- /// Gets the second element color.
- ///
- /// Element for which color is required.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetElementColor2(PaletteElement element, PaletteState state);
-
- ///
- /// Gets the third element color.
- ///
- /// Element for which color is required.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetElementColor3(PaletteElement element, PaletteState state);
-
- ///
- /// Gets the fourth element color.
- ///
- /// Element for which color is required.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetElementColor4(PaletteElement element, PaletteState state);
-
- ///
- /// Gets the fifth element color.
- ///
- /// Element for which color is required.
- /// Palette value should be applicable to this state.
- /// Color value.
- public abstract Color GetElementColor5(PaletteElement element, PaletteState state);
- #endregion
-
- #region DragDrop
- ///
- /// Gets the feedback drawing method used.
- ///
- /// Feedback enumeration value.
- public virtual PaletteDragFeedback GetDragDropFeedback()
- {
- // Do we need to calculate the feedback value again?
- if (_dragFeedback == PaletteDragFeedback.Inherit)
- {
- // We default to using rounded feedback on Vista upwards and square on earlier versions
- _dragFeedback = Environment.OSVersion.Version.Major >= 6 ? PaletteDragFeedback.Rounded : PaletteDragFeedback.Square;
-
- // If trying to use rounded feedback...
- if (_dragFeedback == PaletteDragFeedback.Rounded)
- {
- // Rounded feedback uses a per-pixel alpha blending and so we need to be on a machine that supports
- // more than 256 colors and also allows the layered windows feature. If not then revert to squares
- if ((OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows) == null) || (CommonHelper.ColorDepth() <= 8))
- {
- _dragFeedback = PaletteDragFeedback.Square;
- }
- }
- }
-
- return _dragFeedback;
- }
-
- ///
- /// Gets the background color for a solid drag drop area.
- ///
- /// Color value.
- public virtual Color GetDragDropSolidBack() => SystemColors.ActiveCaption;
-
- ///
- /// Gets the border color for a solid drag drop area.
- ///
- /// Color value.
- public virtual Color GetDragDropSolidBorder() => SystemColors.Control;
-
- ///
- /// Gets the opacity of the solid area.
- ///
- /// Opacity ranging from 0 to 1.
- public virtual float GetDragDropSolidOpacity() => 0.37f;
-
- ///
- /// Gets the background color for the docking indicators area.
- ///
- /// Color value.
- public virtual Color GetDragDropDockBack() => Color.FromArgb(228, 228, 228);
-
- ///
- /// Gets the border color for the docking indicators area.
- ///
- /// Color value.
- public virtual Color GetDragDropDockBorder() => Color.FromArgb(181, 181, 181);
-
- ///
- /// Gets the active color for docking indicators.
- ///
- /// Color value.
- public virtual Color GetDragDropDockActive() => SystemColors.ActiveCaption;
-
- ///
- /// Gets the inactive color for docking indicators.
- ///
- /// Color value.
- public virtual Color GetDragDropDockInactive() => SystemColors.InactiveCaption;
-
- #endregion
-
- #region Public
-
- /// Gets or sets the base palette font.
- /// The base palette font.
- [Description(@"Gets or sets the base palette font.")]
- [DisallowNull]
- public Font BaseFont
- {
- get => _baseFont;
-
- set
- {
- _baseFont = value;
- DefineFonts();
- // Call an event to force repaint style things
- OnPalettePaint(this, new PaletteLayoutEventArgs(true, false));
- }
- }
- internal void ResetBaseFont() => BaseFont = _defaultFontStyle;
- internal bool ShouldSerializeBaseFont() => !Equals(BaseFont, _defaultFontStyle);
-
- /// Gets or sets the name of the theme.
- /// The name of the theme.
- [Description(@"Gets or sets the name of the theme.")]
- [DisallowNull]
- public string ThemeName { get; set; }
-
- /// Gets or sets the type of the base palette.
- /// The type of the base palette.
- [Description(@"Gets or sets the type of the base palette.")]
- public BasePaletteType BasePaletteType { get; set; }
-
- #endregion
+ private readonly Font _defaultFontStyle = new Font("Segoe UI", 9f, FontStyle.Regular);
+
+ #region Font Stuff
+
+ private Font _baseFont; // = _defaultFontStyle;
+ public Font? BoldFont;
+ public Font? ItalicFont;
+ public Font? Header1ShortFont;
+ public Font? Header2ShortFont;
+ public Font? Header1LongFont;
+ public Font? Header2LongFont;
+ public Font? SuperToolFont;
+ public Font? HeaderFormFont;
+ public Font? ButtonFont;
+ public Font? ButtonFontNavigatorStack;
+ public Font? ButtonFontNavigatorMini;
+ public Font? TabFontNormal;
+ public Font? TabFontSelected;
+ public Font? RibbonTabFont;
+ public Font? GridFont;
+ public Font? CalendarFont;
+ public Font? CalendarBoldFont;
+ public Font? RibbonTabContextFont;
+
+ #endregion
+
+ #endregion
+
+ #region Events
+ ///
+ /// Occurs when a palette change requires a repaint.
+ ///
+ public event EventHandler? PalettePaint;
+
+ ///
+ /// Occurs when the UseThemeFormChromeBorderWidth setting changes.
+ ///
+ public event EventHandler? UseThemeFormChromeBorderWidthChanged;
+
+ ///
+ /// Occurs when the BasePalette/BasePaletteMode setting changes.
+ ///
+ public event EventHandler? BasePaletteChanged;
+
+ ///
+ /// Occurs when the BaseRenderer/BaseRendererMode setting changes.
+ ///
+ public event EventHandler? BaseRendererChanged;
+
+ ///
+ /// Occurs when a button spec change occurs.
+ ///
+ public event EventHandler? ButtonSpecChanged;
+ #endregion
+
+ #region Identity
+ /// Initializes a new instance of the class.
+ protected PaletteBase()
+ {
+ // We need to notice when system color settings change
+ SystemEvents.UserPreferenceChanged += OnUserPreferenceChanged;
+
+ // Inherit means we need to calculate the value next time it is requested
+ _dragFeedback = PaletteDragFeedback.Inherit;
+
+ BaseFont = _defaultFontStyle;
+ }
+ #endregion
+
+ #region UseThemeFormChromeBorderWidth
+ private InheritBool _allowFormChrome = InheritBool.True;
+
+ ///
+ /// Gets or sets a value indicating if KryptonForm instances should UseThemeFormChromeBorderWidth.
+ ///
+ /// InheritBool value.
+ [KryptonPersist(false)]
+ [Category(@"Visuals")]
+ [Description(@"Should KryptonForm instances UseThemeFormChromeBorderWidth.")]
+ [DefaultValue(InheritBool.Inherit)]
+ public virtual InheritBool UseThemeFormChromeBorderWidth
+ {
+ get => _allowFormChrome;
+
+ set
+ {
+ if (_allowFormChrome != value)
+ {
+ _allowFormChrome = value;
+ OnUseThemeFormChromeBorderWidthChanged(this, EventArgs.Empty);
+ }
+ }
+ }
+ private void ResetUseThemeFormChromeBorderWidth() => UseThemeFormChromeBorderWidth = InheritBool.True;
+ private bool ShouldSerializeUseThemeFormChromeBorderWidth() => UseThemeFormChromeBorderWidth != InheritBool.True;
+ #endregion
+
+ #region Renderer
+ ///
+ /// Gets the renderer to use for this palette.
+ ///
+ /// Renderer to use for drawing palette settings.
+ public abstract IRenderer GetRenderer();
+ #endregion
+
+ #region Back
+ ///
+ /// Gets a value indicating if background should be drawn.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// InheritBool value.
+ public abstract InheritBool GetBackDraw(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the graphics drawing hint for the background.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// PaletteGraphicsHint value.
+ public abstract PaletteGraphicsHint GetBackGraphicsHint(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the first background color.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetBackColor1(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the second back color.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetBackColor2(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the color background drawing style.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color drawing style.
+ public abstract PaletteColorStyle GetBackColorStyle(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the color alignment.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color alignment style.
+ public abstract PaletteRectangleAlign GetBackColorAlign(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the color background angle.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Angle used for color drawing.
+ public abstract float GetBackColorAngle(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets a background image.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Image instance.
+ public abstract Image? GetBackImage(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the background image style.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Image style value.
+ public abstract PaletteImageStyle GetBackImageStyle(PaletteBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the image alignment.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Image alignment style.
+ public abstract PaletteRectangleAlign GetBackImageAlign(PaletteBackStyle style, PaletteState state);
+ #endregion
+
+ #region Border
+ ///
+ /// Gets a value indicating if border should be drawn.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// InheritBool value.
+ public abstract InheritBool GetBorderDraw(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets a value indicating which borders to draw.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// PaletteDrawBorders value.
+ public abstract PaletteDrawBorders GetBorderDrawBorders(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the graphics drawing hint for the border.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// PaletteGraphicsHint value.
+ public abstract PaletteGraphicsHint GetBorderGraphicsHint(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the first border color.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetBorderColor1(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the second border color.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetBorderColor2(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the color border drawing style.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Color drawing style.
+ public abstract PaletteColorStyle GetBorderColorStyle(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the color border alignment.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Color alignment style.
+ public abstract PaletteRectangleAlign GetBorderColorAlign(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the color border angle.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Angle used for color drawing.
+ public abstract float GetBorderColorAngle(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the border width.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Integer width.
+ public abstract int GetBorderWidth(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the border corner rounding.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Float rounding.
+ public abstract float GetBorderRounding(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets a border image.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Image instance.
+ public abstract Image? GetBorderImage(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the border image style.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Image style value.
+ public abstract PaletteImageStyle GetBorderImageStyle(PaletteBorderStyle style, PaletteState state);
+
+ ///
+ /// Gets the image border alignment.
+ ///
+ /// Border style.
+ /// Palette value should be applicable to this state.
+ /// Image alignment style.
+ public abstract PaletteRectangleAlign GetBorderImageAlign(PaletteBorderStyle style, PaletteState state);
+ #endregion
+
+ #region Content
+ ///
+ /// Gets a value indicating if content should be drawn.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// InheritBool value.
+ public abstract InheritBool GetContentDraw(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets a value indicating if content should be drawn with focus indication.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// InheritBool value.
+ public abstract InheritBool GetContentDrawFocus(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the horizontal relative alignment of the image.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentImageH(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the vertical relative alignment of the image.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentImageV(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the effect applied to drawing of the image.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteImageEffect value.
+ public abstract PaletteImageEffect GetContentImageEffect(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the image color to remap into another color.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentImageColorMap(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color to use in place of the image map color.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentImageColorTo(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the image color that should be transparent.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentImageColorTransparent(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the font for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Font? GetContentShortTextFont(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the font for the short text by generating a new font instance.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Font? GetContentShortTextNewFont(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the rendering hint for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteTextHint value.
+ public abstract PaletteTextHint GetContentShortTextHint(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the prefix drawing setting for short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteTextPrefix value.
+ public abstract PaletteTextHotkeyPrefix GetContentShortTextPrefix(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the flag indicating if multiline text is allowed for short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// InheritBool value.
+ public abstract InheritBool GetContentShortTextMultiLine(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the text trimming to use for short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteTextTrim value.
+ public abstract PaletteTextTrim GetContentShortTextTrim(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the horizontal relative alignment of the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentShortTextH(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the vertical relative alignment of the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentShortTextV(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the horizontal relative alignment of multiline short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentShortTextMultiLineH(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the first back color for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentShortTextColor1(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the second back color for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentShortTextColor2(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color drawing style for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color drawing style.
+ public abstract PaletteColorStyle GetContentShortTextColorStyle(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color alignment for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color alignment style.
+ public abstract PaletteRectangleAlign GetContentShortTextColorAlign(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color background angle for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Angle used for color drawing.
+ public abstract float GetContentShortTextColorAngle(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets a background image for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Image instance.
+ public abstract Image? GetContentShortTextImage(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the background image style.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Image style value.
+ public abstract PaletteImageStyle GetContentShortTextImageStyle(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the image alignment for the short text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Image alignment style.
+ public abstract PaletteRectangleAlign GetContentShortTextImageAlign(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the font for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Font? GetContentLongTextFont(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the font for the long text by generating a new font instance.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Font? GetContentLongTextNewFont(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the rendering hint for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteTextHint value.
+ public abstract PaletteTextHint GetContentLongTextHint(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the prefix drawing setting for long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteTextPrefix value.
+ public abstract PaletteTextHotkeyPrefix GetContentLongTextPrefix(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the flag indicating if multiline text is allowed for long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// InheritBool value.
+ public abstract InheritBool GetContentLongTextMultiLine(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the text trimming to use for long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// PaletteTextTrim value.
+ public abstract PaletteTextTrim GetContentLongTextTrim(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the horizontal relative alignment of the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentLongTextH(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the vertical relative alignment of the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentLongTextV(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the horizontal relative alignment of multiline long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// RelativeAlignment value.
+ public abstract PaletteRelativeAlign GetContentLongTextMultiLineH(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the first back color for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentLongTextColor1(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the second back color for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetContentLongTextColor2(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color drawing style for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color drawing style.
+ public abstract PaletteColorStyle GetContentLongTextColorStyle(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color alignment for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Color alignment style.
+ public abstract PaletteRectangleAlign GetContentLongTextColorAlign(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the color background angle for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Angle used for color drawing.
+ public abstract float GetContentLongTextColorAngle(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets a background image for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Image instance.
+ public abstract Image? GetContentLongTextImage(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the background image style for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Image style value.
+ public abstract PaletteImageStyle GetContentLongTextImageStyle(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the image alignment for the long text.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Image alignment style.
+ public abstract PaletteRectangleAlign GetContentLongTextImageAlign(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the padding between the border and content drawing.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Padding value.
+ public abstract Padding GetContentPadding(PaletteContentStyle style, PaletteState state);
+
+ ///
+ /// Gets the padding between adjacent content items.
+ ///
+ /// Content style.
+ /// Palette value should be applicable to this state.
+ /// Integer value.
+ public abstract int GetContentAdjacentGap(PaletteContentStyle style, PaletteState state);
+ #endregion
+
+ #region Metric
+ ///
+ /// Gets an integer metric value.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Requested metric.
+ /// Integer value.
+ public abstract int GetMetricInt(PaletteState state, PaletteMetricInt metric);
+
+ ///
+ /// Gets a boolean metric value.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Requested metric.
+ /// InheritBool value.
+ public abstract InheritBool GetMetricBool(PaletteState state, PaletteMetricBool metric);
+
+ ///
+ /// Gets a padding metric value.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Requested metric.
+ /// Padding value.
+ public abstract Padding GetMetricPadding(PaletteState state, PaletteMetricPadding metric);
+
+ #endregion
+
+ #region Images
+
+ ///
+ /// Gets a tree view image appropriate for the provided state.
+ ///
+ /// Is the node expanded
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetTreeViewImage(bool expanded);
+
+ ///
+ /// Gets a check box image appropriate for the provided state.
+ ///
+ /// Is the check box enabled.
+ /// Is the check box checked/unchecked/indeterminate.
+ /// Is the check box being hot tracked.
+ /// Is the check box being pressed.
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetCheckBoxImage(bool enabled, CheckState checkState, bool tracking, bool pressed);
+
+ ///
+ /// Gets a check box image appropriate for the provided state.
+ ///
+ /// Is the radio button enabled.
+ /// Is the radio button checked.
+ /// Is the radio button being hot tracked.
+ /// Is the radio button being pressed.
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetRadioButtonImage(bool enabled, bool checkState, bool tracking, bool pressed);
+
+ ///
+ /// Gets a drop down button image appropriate for the provided state.
+ ///
+ /// PaletteState for which image is required.
+ public abstract Image? GetDropDownButtonImage(PaletteState state);
+
+ ///
+ /// Gets a checked image appropriate for a context menu item.
+ ///
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetContextMenuCheckedImage();
+
+ ///
+ /// Gets a indeterminate image appropriate for a context menu item.
+ ///
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetContextMenuIndeterminateImage();
+
+ ///
+ /// Gets an image indicating a sub-menu on a context menu item.
+ ///
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetContextMenuSubMenuImage();
+
+ ///
+ /// Gets a check box image appropriate for the provided state.
+ ///
+ /// Enum of the button to fetch.
+ /// State of the button to fetch.
+ /// Appropriate image for drawing; otherwise null.
+ public abstract Image? GetGalleryButtonImage(PaletteRibbonGalleryButton button, PaletteState state);
+ #endregion
+
+ #region ButtonSpec
+
+ ///
+ /// Gets the icon to display for the button.
+ ///
+ /// Style of button spec.
+ /// Icon value.
+ public virtual Icon? GetButtonSpecIcon(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ return null;
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ throw DebugTools.NotImplemented(style.ToString());
+ }
+ }
+
+ ///
+ /// Gets the image to display for the button.
+ ///
+ /// Style of button spec.
+ /// State for which image is required.
+ /// Image value.
+ public abstract Image? GetButtonSpecImage(PaletteButtonSpecStyle style, PaletteState state);
+
+ ///
+ /// Gets the image transparent color.
+ ///
+ /// Style of button spec.
+ /// Color value.
+ public virtual Color GetButtonSpecImageTransparentColor(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ return GlobalStaticValues.EMPTY_COLOR;
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ return Color.Magenta;
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return GlobalStaticValues.EMPTY_COLOR;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return GlobalStaticValues.EMPTY_COLOR;
+ }
+ }
+
+ ///
+ /// Gets the short text to display for the button.
+ ///
+ /// Style of button spec.
+ /// String value.
+ public virtual string GetButtonSpecShortText(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return string.Empty;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ throw DebugTools.NotImplemented(style.ToString());
+ }
+ }
+
+ ///
+ /// Gets the long text to display for the button.
+ ///
+ /// Style of button spec.
+ /// String value.
+ public virtual string GetButtonSpecLongText(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return string.Empty;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ throw DebugTools.NotImplemented(style.ToString());
+ }
+ }
+
+ ///
+ /// Gets the tooltip title text to display for the button.
+ ///
+ /// Style of button spec.
+ /// String value.
+ public virtual string GetButtonSpecToolTipTitle(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ // TODO: Use LanguageManager for strings
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.FormClose:
+ return "Close";
+ case PaletteButtonSpecStyle.Context:
+ return "Select";
+ case PaletteButtonSpecStyle.Next:
+ return "Next";
+ case PaletteButtonSpecStyle.Previous:
+ return "Previous";
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.PendantMin:
+ return "Minimize";
+ case PaletteButtonSpecStyle.FormMax:
+ return "Maximize";
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.FormRestore:
+ return "Restore";
+ case PaletteButtonSpecStyle.FormHelp:
+ return nameof(Help);
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ return "Minimize";
+ case PaletteButtonSpecStyle.RibbonExpand:
+ return "Expand";
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return string.Empty;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ throw DebugTools.NotImplemented(style.ToString());
+ }
+ }
+
+ ///
+ /// Gets the color to remap from the image to the container foreground.
+ ///
+ /// Style of button spec.
+ /// Color value.
+ public virtual Color GetButtonSpecColorMap(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return GlobalStaticValues.EMPTY_COLOR;
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ return Color.Black;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return GlobalStaticValues.EMPTY_COLOR;
+ }
+ }
+
+ ///
+ /// Gets the color to remap to transparent.
+ ///
+ /// Style of button spec.
+ /// Color value.
+ public virtual Color GetButtonSpecColorTransparent(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return GlobalStaticValues.EMPTY_COLOR;
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ return Color.Magenta;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return GlobalStaticValues.EMPTY_COLOR;
+ }
+ }
+
+ ///
+ /// Gets the button style used for drawing the button.
+ ///
+ /// Style of button spec.
+ /// PaletteButtonStyle value.
+ public virtual PaletteButtonStyle GetButtonSpecStyle(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ return PaletteButtonStyle.Form;
+ case PaletteButtonSpecStyle.FormClose:
+ return PaletteButtonStyle.FormClose;
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return PaletteButtonStyle.ButtonSpec;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return PaletteButtonStyle.ButtonSpec;
+ }
+ }
+
+ ///
+ /// Get the location for the button.
+ ///
+ /// Style of button spec.
+ /// HeaderLocation value.
+ public virtual HeaderLocation GetButtonSpecLocation(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return HeaderLocation.PrimaryHeader;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return HeaderLocation.PrimaryHeader;
+ }
+ }
+
+ ///
+ /// Gets the edge to position the button against.
+ ///
+ /// Style of button spec.
+ /// PaletteRelativeEdgeAlign value.
+ public virtual PaletteRelativeEdgeAlign GetButtonSpecEdge(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return PaletteRelativeEdgeAlign.Far;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return PaletteRelativeEdgeAlign.Far;
+ }
+ }
+
+ ///
+ /// Gets the button orientation.
+ ///
+ /// Style of button spec.
+ /// PaletteButtonOrientation value.
+ public virtual PaletteButtonOrientation GetButtonSpecOrientation(PaletteButtonSpecStyle style)
+ {
+ switch (style)
+ {
+ case PaletteButtonSpecStyle.Close:
+ case PaletteButtonSpecStyle.Context:
+ case PaletteButtonSpecStyle.ArrowLeft:
+ case PaletteButtonSpecStyle.ArrowRight:
+ case PaletteButtonSpecStyle.ArrowUp:
+ case PaletteButtonSpecStyle.ArrowDown:
+ case PaletteButtonSpecStyle.DropDown:
+ case PaletteButtonSpecStyle.PinVertical:
+ case PaletteButtonSpecStyle.PinHorizontal:
+ case PaletteButtonSpecStyle.FormClose:
+ case PaletteButtonSpecStyle.FormMin:
+ case PaletteButtonSpecStyle.FormMax:
+ case PaletteButtonSpecStyle.FormRestore:
+ case PaletteButtonSpecStyle.FormHelp:
+ case PaletteButtonSpecStyle.PendantClose:
+ case PaletteButtonSpecStyle.PendantMin:
+ case PaletteButtonSpecStyle.PendantRestore:
+ case PaletteButtonSpecStyle.WorkspaceMaximize:
+ case PaletteButtonSpecStyle.WorkspaceRestore:
+ case PaletteButtonSpecStyle.RibbonMinimize:
+ case PaletteButtonSpecStyle.RibbonExpand:
+ case PaletteButtonSpecStyle.New:
+ case PaletteButtonSpecStyle.Open:
+ case PaletteButtonSpecStyle.SaveAll:
+ case PaletteButtonSpecStyle.SaveAs:
+ case PaletteButtonSpecStyle.Save:
+ case PaletteButtonSpecStyle.Cut:
+ case PaletteButtonSpecStyle.Copy:
+ case PaletteButtonSpecStyle.Paste:
+ case PaletteButtonSpecStyle.Undo:
+ case PaletteButtonSpecStyle.Redo:
+ case PaletteButtonSpecStyle.PageSetup:
+ case PaletteButtonSpecStyle.PrintPreview:
+ case PaletteButtonSpecStyle.Print:
+ case PaletteButtonSpecStyle.QuickPrint:
+ return PaletteButtonOrientation.FixedTop;
+ case PaletteButtonSpecStyle.Generic:
+ case PaletteButtonSpecStyle.Next:
+ case PaletteButtonSpecStyle.Previous:
+ return PaletteButtonOrientation.Auto;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ DebugTools.NotImplemented(style.ToString());
+ return PaletteButtonOrientation.Auto;
+ }
+ }
+
+ #endregion
+
+ #region RibbonGeneral
+ ///
+ /// Gets the ribbon shape that should be used.
+ ///
+ /// Ribbon shape value.
+ public abstract PaletteRibbonShape GetRibbonShape();
+
+ ///
+ /// Gets the text alignment for the ribbon context text.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract PaletteRelativeAlign GetRibbonContextTextAlign(PaletteState state);
+
+ ///
+ /// Gets the font for the ribbon context text.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Font GetRibbonContextTextFont(PaletteState state);
+
+ ///
+ /// Gets the color for the ribbon context text.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Color GetRibbonContextTextColor(PaletteState state);
+
+ ///
+ /// Gets the dark disabled color used for ribbon glyphs.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonDisabledDark(PaletteState state);
+
+ ///
+ /// Gets the light disabled color used for ribbon glyphs.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonDisabledLight(PaletteState state);
+
+ ///
+ /// Gets the color for the drop arrow light.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonDropArrowLight(PaletteState state);
+
+ ///
+ /// Gets the color for the drop arrow dark.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonDropArrowDark(PaletteState state);
+
+ ///
+ /// Gets the color for the dialog launcher dark.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonGroupDialogDark(PaletteState state);
+
+ ///
+ /// Gets the color for the dialog launcher light.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonGroupDialogLight(PaletteState state);
+
+ ///
+ /// Gets the color for the group separator dark.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonGroupSeparatorDark(PaletteState state);
+
+ ///
+ /// Gets the color for the group separator light.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonGroupSeparatorLight(PaletteState state);
+
+ ///
+ /// Gets the color for the minimize bar dark.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonMinimizeBarDark(PaletteState state);
+
+ ///
+ /// Gets the color for the minimize bar light.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonMinimizeBarLight(PaletteState state);
+
+ ///
+ /// Gets the gradient dark rafting color for the tab background.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonTabRowBackgroundGradientRaftingDark(PaletteState state);
+
+ ///
+ /// Gets the gradient light rafting color for the tab background.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState state);
+
+ ///
+ /// Gets the solid color for the tab background.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonTabRowBackgroundSolidColor(PaletteState state);
+
+ ///
+ /// Gets the color for the tab separator.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonTabSeparatorColor(PaletteState state);
+
+ ///
+ /// Gets the color for the tab context separators.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonTabSeparatorContextColor(PaletteState state);
+
+ ///
+ /// Gets the font for the ribbon text.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Font value.
+ public abstract Font GetRibbonTextFont(PaletteState state);
+
+ ///
+ /// Gets the rendering hint for the ribbon font.
+ ///
+ /// Palette value should be applicable to this state.
+ /// PaletteTextHint value.
+ public abstract PaletteTextHint GetRibbonTextHint(PaletteState state);
+
+ ///
+ /// Gets the color for the extra QAT button dark content color.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonQATButtonDark(PaletteState state);
+
+ ///
+ /// Gets the color for the extra QAT button light content color.
+ ///
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonQATButtonLight(PaletteState state);
+
+ /// Gets the ribbon tab row gradient first color.
+ /// Palette value should be applicable to this state.
+ /// The gradient first color.
+ public abstract Color GetRibbonTabRowGradientColor1(PaletteState state);
+
+ /// Gets the ribbon app button dark color.
+ /// Palette value should be applicable to this state.
+ /// The app button dark color.
+ public abstract Color GetRibbonFileAppTabBottomColor(PaletteState state);
+
+ /// Gets the ribbon app button light color.
+ /// Palette value should be applicable to this state.
+ /// The app button light color.
+ public abstract Color GetRibbonFileAppTabTopColor(PaletteState state);
+
+ /// Gets the ribbon app button text color.
+ /// Palette value should be applicable to this state.
+ /// The app button text color.
+ public abstract Color GetRibbonFileAppTabTextColor(PaletteState state);
+
+ /// Gets the ribbon tab row gradient rafting angle.
+ /// Palette value should be applicable to this state.
+ /// The gradient rafting angle.
+ public abstract float GetRibbonTabRowGradientRaftingAngle(PaletteState state);
+ #endregion
+
+ #region RibbonBack
+ ///
+ /// Gets the method used to draw the background of a ribbon item.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// PaletteRibbonBackStyle value.
+ public abstract PaletteRibbonColorStyle GetRibbonBackColorStyle(PaletteRibbonBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the first background color for the ribbon item.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonBackColor1(PaletteRibbonBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the second background color for the ribbon item.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonBackColor2(PaletteRibbonBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the third background color for the ribbon item.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonBackColor3(PaletteRibbonBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the fourth background color for the ribbon item.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonBackColor4(PaletteRibbonBackStyle style, PaletteState state);
+
+ ///
+ /// Gets the fifth background color for the ribbon item.
+ ///
+ /// Background style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonBackColor5(PaletteRibbonBackStyle style, PaletteState state);
+ #endregion
+
+ #region RibbonText
+ ///
+ /// Gets the tab color for the item text.
+ ///
+ /// Text style.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetRibbonTextColor(PaletteRibbonTextStyle style, PaletteState state);
+ #endregion
+
+ #region ElementColor
+ ///
+ /// Gets the first element color.
+ ///
+ /// Element for which color is required.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetElementColor1(PaletteElement element, PaletteState state);
+
+ ///
+ /// Gets the second element color.
+ ///
+ /// Element for which color is required.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetElementColor2(PaletteElement element, PaletteState state);
+
+ ///
+ /// Gets the third element color.
+ ///
+ /// Element for which color is required.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetElementColor3(PaletteElement element, PaletteState state);
+
+ ///
+ /// Gets the fourth element color.
+ ///
+ /// Element for which color is required.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetElementColor4(PaletteElement element, PaletteState state);
+
+ ///
+ /// Gets the fifth element color.
+ ///
+ /// Element for which color is required.
+ /// Palette value should be applicable to this state.
+ /// Color value.
+ public abstract Color GetElementColor5(PaletteElement element, PaletteState state);
+ #endregion
+
+ #region DragDrop
+ ///
+ /// Gets the feedback drawing method used.
+ ///
+ /// Feedback enumeration value.
+ public virtual PaletteDragFeedback GetDragDropFeedback()
+ {
+ // Do we need to calculate the feedback value again?
+ if (_dragFeedback == PaletteDragFeedback.Inherit)
+ {
+ // We default to using rounded feedback on Vista upwards and square on earlier versions
+ _dragFeedback = Environment.OSVersion.Version.Major >= 6 ? PaletteDragFeedback.Rounded : PaletteDragFeedback.Square;
+
+ // If trying to use rounded feedback...
+ if (_dragFeedback == PaletteDragFeedback.Rounded)
+ {
+ // Rounded feedback uses a per-pixel alpha blending and so we need to be on a machine that supports
+ // more than 256 colors and also allows the layered windows feature. If not then revert to squares
+ if ((OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows) == null) || (CommonHelper.ColorDepth() <= 8))
+ {
+ _dragFeedback = PaletteDragFeedback.Square;
+ }
+ }
+ }
+
+ return _dragFeedback;
+ }
+
+ ///
+ /// Gets the background color for a solid drag drop area.
+ ///
+ /// Color value.
+ public virtual Color GetDragDropSolidBack() => SystemColors.ActiveCaption;
+
+ ///
+ /// Gets the border color for a solid drag drop area.
+ ///
+ /// Color value.
+ public virtual Color GetDragDropSolidBorder() => SystemColors.Control;
+
+ ///
+ /// Gets the opacity of the solid area.
+ ///
+ /// Opacity ranging from 0 to 1.
+ public virtual float GetDragDropSolidOpacity() => 0.37f;
+
+ ///
+ /// Gets the background color for the docking indicators area.
+ ///
+ /// Color value.
+ public virtual Color GetDragDropDockBack() => Color.FromArgb(228, 228, 228);
+
+ ///
+ /// Gets the border color for the docking indicators area.
+ ///
+ /// Color value.
+ public virtual Color GetDragDropDockBorder() => Color.FromArgb(181, 181, 181);
+
+ ///
+ /// Gets the active color for docking indicators.
+ ///
+ /// Color value.
+ public virtual Color GetDragDropDockActive() => SystemColors.ActiveCaption;
+
+ ///
+ /// Gets the inactive color for docking indicators.
+ ///
+ /// Color value.
+ public virtual Color GetDragDropDockInactive() => SystemColors.InactiveCaption;
+
+ #endregion
+
+ #region Public
+
+ /// Gets or sets the base palette font.
+ /// The base palette font.
+ [Description(@"Gets or sets the base palette font.")]
+ [DisallowNull]
+ public Font BaseFont
+ {
+ get => _baseFont;
+
+ set
+ {
+ _baseFont = value;
+ DefineFonts();
+ // Call an event to force repaint style things
+ OnPalettePaint(this, new PaletteLayoutEventArgs(true, false));
+ }
+ }
+ internal void ResetBaseFont() => BaseFont = _defaultFontStyle;
+ internal bool ShouldSerializeBaseFont() => !Equals(BaseFont, _defaultFontStyle);
+
+ /// Gets or sets the name of the theme.
+ /// The name of the theme.
+ [Description(@"Gets or sets the name of the theme.")]
+ [DisallowNull]
+ public string ThemeName { get; set; }
+
+ /// Gets or sets the type of the base palette.
+ /// The type of the base palette.
+ [Description(@"Gets or sets the type of the base palette.")]
+ public BasePaletteType BasePaletteType { get; set; }
+
+ #endregion
#region ToolBar Images
public virtual Image[] ToolBarImages(Image[] toolBarImages)
{
- _toolBarImages = toolBarImages;
+ _toolBarImages = toolBarImages;
return _toolBarImages;
}
#endregion
- #region Protected
-
- ///
- /// Update the fonts to reflect system or user defined changes.
- ///
- protected virtual void DefineFonts()
- {
- // Release resources
- DisposeFonts();
-
- var baseFontName = BaseFont.Name;
- var baseFontSize = BaseFont.Size;
-
- Header1ShortFont = new Font(baseFontName, baseFontSize + 4.5f, FontStyle.Bold);
- Header2ShortFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- HeaderFormFont = new Font(baseFontName, SystemFonts.CaptionFont!.SizeInPoints, FontStyle.Regular);
- Header1LongFont = new Font(baseFontName, baseFontSize + 1.5f, FontStyle.Regular);
- Header2LongFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- ButtonFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- ButtonFontNavigatorStack = new Font(ButtonFont, FontStyle.Bold);
- ButtonFontNavigatorMini = new Font(baseFontName, baseFontSize + 3.5f, FontStyle.Bold);
- TabFontNormal = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- TabFontSelected = new Font(TabFontNormal, FontStyle.Bold);
- RibbonTabFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- GridFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- SuperToolFont = new Font(baseFontName, baseFontSize, FontStyle.Bold);
- CalendarFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
- CalendarBoldFont = new Font(baseFontName, baseFontSize, FontStyle.Bold);
- BoldFont = new Font(baseFontName, baseFontSize, FontStyle.Bold);
- ItalicFont = new Font(baseFontName, baseFontSize, FontStyle.Italic);
- RibbonTabContextFont = new Font(RibbonTabFont, FontStyle.Bold);
- }
-
- protected virtual void DisposeFonts()
- {
- Header1ShortFont?.Dispose();
- Header2ShortFont?.Dispose();
- Header1LongFont?.Dispose();
- Header2LongFont?.Dispose();
- HeaderFormFont?.Dispose();
- ButtonFont?.Dispose();
- ButtonFontNavigatorStack?.Dispose();
- ButtonFontNavigatorMini?.Dispose();
- TabFontNormal?.Dispose();
- TabFontSelected?.Dispose();
- RibbonTabFont?.Dispose();
- GridFont?.Dispose();
- CalendarFont?.Dispose();
- CalendarBoldFont?.Dispose();
- SuperToolFont?.Dispose();
- BoldFont?.Dispose();
- ItalicFont?.Dispose();
- RibbonTabContextFont?.Dispose();
-
- Header1ShortFont = null;
- Header2ShortFont = null;
- Header1LongFont = null;
- Header2LongFont = null;
- HeaderFormFont = null;
- ButtonFont = null;
- ButtonFontNavigatorStack = null;
- ButtonFontNavigatorMini = null;
- TabFontNormal = null;
- TabFontSelected = null;
- RibbonTabFont = null;
- GridFont = null;
- CalendarFont = null;
- CalendarBoldFont = null;
- SuperToolFont = null;
- BoldFont = null;
- ItalicFont = null;
- RibbonTabContextFont = null;
- }
-
- #endregion
-
- #region ColorTable
- ///
- /// Gets access to the color table instance.
- ///
- public abstract KryptonColorTable ColorTable { get; }
- #endregion
-
- #region Static Color Routines
- ///
- /// Merge two colors together using relative percentages.
- ///
- /// First color.
- /// Percentage of first color to use.
- /// Second color.
- /// Percentage of second color to use.
- /// Merged color.
- public static Color MergeColors(Color color1, float percent1,
- Color color2, float percent2) =>
- CommonHelper.MergeColors(color1, percent1, color2, percent2);
-
- ///
- /// Merge three colors together using relative percentages.
- ///
- /// First color.
- /// Percentage of first color to use.
- /// Second color.
- /// Percentage of second color to use.
- /// Third color.
- /// Percentage of third color to use.
- /// Merged color.
- public static Color MergeColors(Color color1, float percent1,
- Color color2, float percent2,
- Color color3, float percent3) =>
- CommonHelper.MergeColors(color1, percent1,
- color2, percent2,
- color3, percent3);
-
- ///
- /// Create a faded version of provided color.
- ///
- /// Starting color.
- /// Faded version of parameter color.
- public static Color FadedColor(Color baseColor)
- {
- // Convert to HSL space
- ColorHSL hsl = new ColorHSL(baseColor)
- {
-
- // Remove saturation and fix luminance
- Saturation = 0.0f,
- Luminance = 0.55f
- };
-
- return hsl.Color;
- }
- #endregion
-
- #region InputControlPadding
- ///
- /// Gets the input control padding needed to add a border to a borderless input control.
- ///
- protected virtual Padding InputControlPadding
- {
- get
- {
- if (!_inputControlPadding.HasValue)
- {
- // Find size of a input control with and without a border
- var tb = new TextBox
- {
- BorderStyle = BorderStyle.None
- };
- Size sn = tb.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
- tb.BorderStyle = BorderStyle.FixedSingle;
- Size ss = tb.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
-
- // Always subtract one from top and bottom edges to account for border placed there later by Krypton
- var inputControlPadding = new Padding(0);
- var xDiff = Math.Max(0, ss.Width - sn.Width);
- var yDiff = Math.Max(0, ss.Height - sn.Height - 2);
-
- // If on Vista or upwards
- if (Environment.OSVersion.Version.Major == 6)
- {
- // Under Aero we need to reduce by 2, otherwise in Classic and reduce by 1
- if (PI.IsAppThemed() && PI.IsThemeActive())
- {
- yDiff = Math.Max(0, yDiff - 3);
- }
- else
- {
- yDiff = Math.Max(0, yDiff - 2);
- }
- }
-
- // Allocate the difference between the border edges
- if (xDiff > 0)
- {
- inputControlPadding.Left = xDiff / 2;
- inputControlPadding.Right = xDiff - inputControlPadding.Left;
- }
-
- if (yDiff > 0)
- {
- inputControlPadding.Top = yDiff / 2;
- inputControlPadding.Bottom = yDiff - inputControlPadding.Top;
- }
-
- _inputControlPadding = inputControlPadding;
- }
-
- return _inputControlPadding.Value;
- }
- }
- #endregion
-
- #region OnUserPreferenceChanged
- public void UserPreferenceChanged() =>
- OnUserPreferenceChanged(this, new UserPreferenceChangedEventArgs(UserPreferenceCategory.General));
-
- ///
- /// Handle a change in the user preferences.
- ///
- /// Source of event.
- /// Event data.
- protected virtual void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
- {
- _inputControlPadding = null;
- _dragFeedback = PaletteDragFeedback.Inherit;
- }
- #endregion
-
- #region OnPalettePaint
-
- ///
- /// Raises the PalettePaint event.
- ///
- /// Source of the event.
- /// An PaletteLayoutEventArgs containing event data.
- protected virtual void OnPalettePaint(object sender, PaletteLayoutEventArgs e) =>
- // https://github.com/Krypton-Suite/Standard-Toolkit/issues/1023#issuecomment-1588810368
- PalettePaint?.Invoke(this, e);
-
- #endregion
-
- #region OnUseThemeFormChromeBorderWidthChanged
-
- ///
- /// Raises the UseThemeFormChromeBorderWidthChanged event.
- ///
- /// Source of the event.
- /// An EventArgs containing event data.
- protected virtual void OnUseThemeFormChromeBorderWidthChanged(object sender, EventArgs e) => UseThemeFormChromeBorderWidthChanged?.Invoke(this, e);
-
- #endregion
-
- #region OnBasePaletteChanged
-
- ///
- /// Raises the BasePaletteChanged event.
- ///
- /// Source of the event.
- /// An EventArgs containing event data.
- protected virtual void OnBasePaletteChanged(object sender, EventArgs e) => BasePaletteChanged?.Invoke(this, e);
-
- #endregion
-
- #region OnBaseRendererChanged
- ///
- /// Raises the BaseRendererChanged event.
- ///
- /// Source of the event.
- /// An EventArgs containing event data.
- protected virtual void OnBaseRendererChanged(object sender, EventArgs e) => BaseRendererChanged?.Invoke(this, e);
-
- #endregion
-
- #region OnButtonSpecChanged
- ///
- /// Raises the ButtonSpecChanged event.
- ///
- /// Source of the event.
- /// An EventArgs containing event data.
- protected virtual void OnButtonSpecChanged(object sender, EventArgs e) => ButtonSpecChanged?.Invoke(this, e);
-
- #endregion
- }
+ #region Protected
+
+ ///
+ /// Update the fonts to reflect system or user defined changes.
+ ///
+ protected virtual void DefineFonts()
+ {
+ // Release resources
+ DisposeFonts();
+
+ var baseFontName = BaseFont.Name;
+ var baseFontSize = BaseFont.Size;
+
+ Header1ShortFont = new Font(baseFontName, baseFontSize + 4.5f, FontStyle.Bold);
+ Header2ShortFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ HeaderFormFont = new Font(baseFontName, SystemFonts.CaptionFont!.SizeInPoints, FontStyle.Regular);
+ Header1LongFont = new Font(baseFontName, baseFontSize + 1.5f, FontStyle.Regular);
+ Header2LongFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ ButtonFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ ButtonFontNavigatorStack = new Font(ButtonFont, FontStyle.Bold);
+ ButtonFontNavigatorMini = new Font(baseFontName, baseFontSize + 3.5f, FontStyle.Bold);
+ TabFontNormal = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ TabFontSelected = new Font(TabFontNormal, FontStyle.Bold);
+ RibbonTabFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ GridFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ SuperToolFont = new Font(baseFontName, baseFontSize, FontStyle.Bold);
+ CalendarFont = new Font(baseFontName, baseFontSize, FontStyle.Regular);
+ CalendarBoldFont = new Font(baseFontName, baseFontSize, FontStyle.Bold);
+ BoldFont = new Font(baseFontName, baseFontSize, FontStyle.Bold);
+ ItalicFont = new Font(baseFontName, baseFontSize, FontStyle.Italic);
+ RibbonTabContextFont = new Font(RibbonTabFont, FontStyle.Bold);
+ }
+
+ protected virtual void DisposeFonts()
+ {
+ Header1ShortFont?.Dispose();
+ Header2ShortFont?.Dispose();
+ Header1LongFont?.Dispose();
+ Header2LongFont?.Dispose();
+ HeaderFormFont?.Dispose();
+ ButtonFont?.Dispose();
+ ButtonFontNavigatorStack?.Dispose();
+ ButtonFontNavigatorMini?.Dispose();
+ TabFontNormal?.Dispose();
+ TabFontSelected?.Dispose();
+ RibbonTabFont?.Dispose();
+ GridFont?.Dispose();
+ CalendarFont?.Dispose();
+ CalendarBoldFont?.Dispose();
+ SuperToolFont?.Dispose();
+ BoldFont?.Dispose();
+ ItalicFont?.Dispose();
+ RibbonTabContextFont?.Dispose();
+
+ Header1ShortFont = null;
+ Header2ShortFont = null;
+ Header1LongFont = null;
+ Header2LongFont = null;
+ HeaderFormFont = null;
+ ButtonFont = null;
+ ButtonFontNavigatorStack = null;
+ ButtonFontNavigatorMini = null;
+ TabFontNormal = null;
+ TabFontSelected = null;
+ RibbonTabFont = null;
+ GridFont = null;
+ CalendarFont = null;
+ CalendarBoldFont = null;
+ SuperToolFont = null;
+ BoldFont = null;
+ ItalicFont = null;
+ RibbonTabContextFont = null;
+ }
+
+ #endregion
+
+ #region ColorTable
+ ///
+ /// Gets access to the color table instance.
+ ///
+ public abstract KryptonColorTable ColorTable { get; }
+ #endregion
+
+ #region Static Color Routines
+ ///
+ /// Merge two colors together using relative percentages.
+ ///
+ /// First color.
+ /// Percentage of first color to use.
+ /// Second color.
+ /// Percentage of second color to use.
+ /// Merged color.
+ public static Color MergeColors(Color color1, float percent1,
+ Color color2, float percent2) =>
+ CommonHelper.MergeColors(color1, percent1, color2, percent2);
+
+ ///
+ /// Merge three colors together using relative percentages.
+ ///
+ /// First color.
+ /// Percentage of first color to use.
+ /// Second color.
+ /// Percentage of second color to use.
+ /// Third color.
+ /// Percentage of third color to use.
+ /// Merged color.
+ public static Color MergeColors(Color color1, float percent1,
+ Color color2, float percent2,
+ Color color3, float percent3) =>
+ CommonHelper.MergeColors(color1, percent1,
+ color2, percent2,
+ color3, percent3);
+
+ ///
+ /// Create a faded version of provided color.
+ ///
+ /// Starting color.
+ /// Faded version of parameter color.
+ public static Color FadedColor(Color baseColor)
+ {
+ // Convert to HSL space
+ ColorHSL hsl = new ColorHSL(baseColor)
+ {
+
+ // Remove saturation and fix luminance
+ Saturation = 0.0f,
+ Luminance = 0.55f
+ };
+
+ return hsl.Color;
+ }
+ #endregion
+
+ #region InputControlPadding
+ ///
+ /// Gets the input control padding needed to add a border to a borderless input control.
+ ///
+ protected virtual Padding InputControlPadding
+ {
+ get
+ {
+ if (!_inputControlPadding.HasValue)
+ {
+ // Find size of a input control with and without a border
+ var tb = new TextBox
+ {
+ BorderStyle = BorderStyle.None
+ };
+ Size sn = tb.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
+ tb.BorderStyle = BorderStyle.FixedSingle;
+ Size ss = tb.GetPreferredSize(new Size(int.MaxValue, int.MaxValue));
+
+ // Always subtract one from top and bottom edges to account for border placed there later by Krypton
+ var inputControlPadding = new Padding(0);
+ var xDiff = Math.Max(0, ss.Width - sn.Width);
+ var yDiff = Math.Max(0, ss.Height - sn.Height - 2);
+
+ // If on Vista or upwards
+ if (Environment.OSVersion.Version.Major == 6)
+ {
+ // Under Aero we need to reduce by 2, otherwise in Classic and reduce by 1
+ if (PI.IsAppThemed() && PI.IsThemeActive())
+ {
+ yDiff = Math.Max(0, yDiff - 3);
+ }
+ else
+ {
+ yDiff = Math.Max(0, yDiff - 2);
+ }
+ }
+
+ // Allocate the difference between the border edges
+ if (xDiff > 0)
+ {
+ inputControlPadding.Left = xDiff / 2;
+ inputControlPadding.Right = xDiff - inputControlPadding.Left;
+ }
+
+ if (yDiff > 0)
+ {
+ inputControlPadding.Top = yDiff / 2;
+ inputControlPadding.Bottom = yDiff - inputControlPadding.Top;
+ }
+
+ _inputControlPadding = inputControlPadding;
+ }
+
+ return _inputControlPadding.Value;
+ }
+ }
+ #endregion
+
+ #region OnUserPreferenceChanged
+ public void UserPreferenceChanged() =>
+ OnUserPreferenceChanged(this, new UserPreferenceChangedEventArgs(UserPreferenceCategory.General));
+
+ ///
+ /// Handle a change in the user preferences.
+ ///
+ /// Source of event.
+ /// Event data.
+ protected virtual void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
+ {
+ _inputControlPadding = null;
+ _dragFeedback = PaletteDragFeedback.Inherit;
+ }
+ #endregion
+
+ #region OnPalettePaint
+
+ ///
+ /// Raises the PalettePaint event.
+ ///
+ /// Source of the event.
+ /// An PaletteLayoutEventArgs containing event data.
+ protected virtual void OnPalettePaint(object sender, PaletteLayoutEventArgs e) =>
+ // https://github.com/Krypton-Suite/Standard-Toolkit/issues/1023#issuecomment-1588810368
+ PalettePaint?.Invoke(this, e);
+
+ #endregion
+
+ #region OnUseThemeFormChromeBorderWidthChanged
+
+ ///
+ /// Raises the UseThemeFormChromeBorderWidthChanged event.
+ ///
+ /// Source of the event.
+ /// An EventArgs containing event data.
+ protected virtual void OnUseThemeFormChromeBorderWidthChanged(object sender, EventArgs e) => UseThemeFormChromeBorderWidthChanged?.Invoke(this, e);
+
+ #endregion
+
+ #region OnBasePaletteChanged
+
+ ///
+ /// Raises the BasePaletteChanged event.
+ ///
+ /// Source of the event.
+ /// An EventArgs containing event data.
+ protected virtual void OnBasePaletteChanged(object sender, EventArgs e) => BasePaletteChanged?.Invoke(this, e);
+
+ #endregion
+
+ #region OnBaseRendererChanged
+ ///
+ /// Raises the BaseRendererChanged event.
+ ///
+ /// Source of the event.
+ /// An EventArgs containing event data.
+ protected virtual void OnBaseRendererChanged(object sender, EventArgs e) => BaseRendererChanged?.Invoke(this, e);
+
+ #endregion
+
+ #region OnButtonSpecChanged
+ ///
+ /// Raises the ButtonSpecChanged event.
+ ///
+ /// Source of the event.
+ /// An EventArgs containing event data.
+ protected virtual void OnButtonSpecChanged(object sender, EventArgs e) => ButtonSpecChanged?.Invoke(this, e);
+
+ #endregion
+ }
}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs
index 490b09ad3..3f8a31cc1 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkMode.cs
@@ -600,13 +600,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkModeAlternate.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkModeAlternate.cs
index fbe037596..4c836c05c 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkModeAlternate.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlackDarkModeAlternate.cs
@@ -601,13 +601,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs
index fea1a4208..5fe6d4fe2 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueDarkMode.cs
@@ -589,13 +589,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs
index 1f7db26f1..93dc03a66 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365BlueLightMode.cs
@@ -601,13 +601,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs
index 87beefacf..e8db38fa8 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverDarkMode.cs
@@ -589,13 +589,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs
index 9835cc07a..4be250ce7 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Extra Themes/PaletteMicrosoft365SilverLightMode.cs
@@ -593,13 +593,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Non Official Themes/PaletteMicrosoft365Blue.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Non Official Themes/PaletteMicrosoft365Blue.cs
index 27b50aad7..07b509795 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Non Official Themes/PaletteMicrosoft365Blue.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Non Official Themes/PaletteMicrosoft365Blue.cs
@@ -24,11 +24,11 @@ public class PaletteMicrosoft365Blue : PaletteMicrosoft365Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -600,13 +600,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs
index 5e5c825fb..e35729e74 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Black.cs
@@ -27,11 +27,11 @@ public class PaletteMicrosoft365Black : PaletteMicrosoft365Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -611,13 +611,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365DarkGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365DarkGray.cs
index e11f706c1..0500c5889 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365DarkGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365DarkGray.cs
@@ -585,13 +585,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365LightGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365LightGray.cs
index c0eaccc97..b6d59a323 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365LightGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365LightGray.cs
@@ -60,13 +60,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Silver.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Silver.cs
index 4be5b64ba..7d67f1630 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Silver.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365Silver.cs
@@ -27,11 +27,11 @@ public class PaletteMicrosoft365Silver : PaletteMicrosoft365Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -603,13 +603,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365White.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365White.cs
index 786145b47..5c05b9b15 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365White.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Microsoft 365/Official Themes/PaletteMicrosoft365White.cs
@@ -21,11 +21,11 @@ public class PaletteMicrosoft365White : PaletteMicrosoft365Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -596,13 +596,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs
index 0161c9ae5..beaae6721 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlackDarkMode.cs
@@ -618,13 +618,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs
index db7b6be55..80276f8c7 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueDarkMode.cs
@@ -455,13 +455,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs
index e89a2a7a9..afffa3de2 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007BlueLightMode.cs
@@ -456,13 +456,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs
index e0d8ce286..b01aca68b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverDarkMode.cs
@@ -437,13 +437,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs
index af20e64a3..93a5cec36 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Extra Themes/PaletteOffice2007SilverLightMode.cs
@@ -437,13 +437,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007DarkGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007DarkGray.cs
index 98127c9e6..d74451c4a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007DarkGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007DarkGray.cs
@@ -431,13 +431,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007LightGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007LightGray.cs
index 202c601b2..0f3919d8b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007LightGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007LightGray.cs
@@ -46,13 +46,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007White.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007White.cs
index 27ffced9c..bb346e7f5 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007White.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Non Official Themes/PaletteOffice2007White.cs
@@ -425,13 +425,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Black.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Black.cs
index 7179d1b49..43dee3963 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Black.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Black.cs
@@ -631,13 +631,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Blue.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Blue.cs
index c52996934..4a817fc3b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Blue.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Blue.cs
@@ -446,13 +446,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Silver.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Silver.cs
index 08f13072e..1479ebd50 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Silver.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2007/Official Themes/PaletteOffice2007Silver.cs
@@ -415,13 +415,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs
index 6281609d3..cfb12ef8c 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlackDarkMode.cs
@@ -811,13 +811,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs
index b1f3c51bc..a044cba3a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueDarkMode.cs
@@ -456,13 +456,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs
index 5a4176041..e646062f1 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010BlueLightMode.cs
@@ -468,13 +468,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs
index c0e38f8d5..b937a4c8f 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverDarkMode.cs
@@ -458,13 +458,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs
index 0e819c492..b22653270 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Extra Themes/PaletteOffice2010SilverLightMode.cs
@@ -462,13 +462,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010DarkGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010DarkGray.cs
index e54f8342b..e1336b1f8 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010DarkGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010DarkGray.cs
@@ -450,13 +450,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010LightGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010LightGray.cs
index cc0554c0a..c73f27dbd 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010LightGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010LightGray.cs
@@ -73,13 +73,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010White.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010White.cs
index a9348da0b..4db89f3ad 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010White.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Non Official Themes/PaletteOffice2010White.cs
@@ -29,11 +29,11 @@ public class PaletteOffice2010White : PaletteOffice2010Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -460,13 +460,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Black.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Black.cs
index 88d3da620..f8ca43649 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Black.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Black.cs
@@ -29,11 +29,11 @@ public class PaletteOffice2010Black : PaletteOffice2010Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -474,13 +474,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Blue.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Blue.cs
index 9b4517705..3814e8119 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Blue.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Blue.cs
@@ -29,11 +29,11 @@ public class PaletteOffice2010Blue : PaletteOffice2010Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -460,13 +460,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Silver.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Silver.cs
index a41bea578..23825a5a1 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Silver.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2010/Official Themes/PaletteOffice2010Silver.cs
@@ -29,11 +29,11 @@ public class PaletteOffice2010Silver : PaletteOffice2010Base
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -453,13 +453,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013DarkGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013DarkGray.cs
index 363618e8f..46c3732bd 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013DarkGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013DarkGray.cs
@@ -444,13 +444,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013LightGray.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013LightGray.cs
index 2dbda3ba7..22c71cba4 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013LightGray.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013LightGray.cs
@@ -444,13 +444,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs
index bd08a34bb..1b3fad05a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Office 2013/Official Themes/PaletteOffice2013White.cs
@@ -27,11 +27,11 @@ public class PaletteOffice2013White : PaletteOffice2013WhiteBase
#region Ribbon Specific Colors
- private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ private static readonly Color _ribbonAppButtonDarkColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
- private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ private static readonly Color _ribbonAppButtonLightColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
- private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ private static readonly Color _ribbonAppButtonTextColor = GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
@@ -450,13 +450,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalOffice2003.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalOffice2003.cs
index 694fe664f..df608635b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalOffice2003.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalOffice2003.cs
@@ -293,13 +293,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
}
@@ -4606,13 +4606,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalSystem.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalSystem.cs
index 5d041836a..0478be070 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalSystem.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Professional/PaletteProfessionalSystem.cs
@@ -4315,13 +4315,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_DARK_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_BOTTOM_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_LIGHT_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TOP_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_APP_BUTTON_TEXT_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.DEFAULT_RIBBON_FILE_APP_TAB_TEXT_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Base/PaletteSparkleBase.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Base/PaletteSparkleBase.cs
index d2b20301d..50a4dbbaa 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Base/PaletteSparkleBase.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Base/PaletteSparkleBase.cs
@@ -4459,13 +4459,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Extra Themes/PaletteSparkleBlueDarkMode.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Extra Themes/PaletteSparkleBlueDarkMode.cs
index 468388061..0720fe05b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Extra Themes/PaletteSparkleBlueDarkMode.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Sparkle/Extra Themes/PaletteSparkleBlueDarkMode.cs
@@ -375,13 +375,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2007/PaletteVisualStudio2010Office2007Variation.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2007/PaletteVisualStudio2010Office2007Variation.cs
index f6daaff87..b558c81b7 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2007/PaletteVisualStudio2010Office2007Variation.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2007/PaletteVisualStudio2010Office2007Variation.cs
@@ -427,13 +427,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => GlobalStaticValues.EMPTY_COLOR;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2010/PaletteVisualStudio2010Office2010Variation.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2010/PaletteVisualStudio2010Office2010Variation.cs
index 1a4a5bb5f..6b8a4026b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2010/PaletteVisualStudio2010Office2010Variation.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2010/PaletteVisualStudio2010Office2010Variation.cs
@@ -449,13 +449,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2013/PaletteVisualStudio2010Office2013Variation.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2013/PaletteVisualStudio2010Office2013Variation.cs
index 4b6f0fb07..ef009f54a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2013/PaletteVisualStudio2010Office2013Variation.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/2013/PaletteVisualStudio2010Office2013Variation.cs
@@ -439,13 +439,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/365/PaletteVisualStudio2010Microsoft365Variation.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/365/PaletteVisualStudio2010Microsoft365Variation.cs
index ba53fd1f8..935514f24 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/365/PaletteVisualStudio2010Microsoft365Variation.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Builtin/Visual Studio/Official Themes/2010/Variations/365/PaletteVisualStudio2010Microsoft365Variation.cs
@@ -439,13 +439,13 @@ public override Color GetRibbonTabRowBackgroundGradientRaftingLight(PaletteState
#region AppButton Colors
///
- public override Color GetRibbonAppButtonDarkColor(PaletteState state) => _ribbonAppButtonDarkColor;
+ public override Color GetRibbonFileAppTabBottomColor(PaletteState state) => _ribbonAppButtonDarkColor;
///
- public override Color GetRibbonAppButtonLightColor(PaletteState state) => _ribbonAppButtonLightColor;
+ public override Color GetRibbonFileAppTabTopColor(PaletteState state) => _ribbonAppButtonLightColor;
///
- public override Color GetRibbonAppButtonTextColor(PaletteState state) => _ribbonAppButtonTextColor;
+ public override Color GetRibbonFileAppTabTextColor(PaletteState state) => _ribbonAppButtonTextColor;
#endregion
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs
index a39636f48..4ad694887 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteButtonSpecTyped.cs
@@ -249,7 +249,7 @@ public string ToolTipTitle
[Localizable(true)]
[Category(@"Visuals")]
[Description(@"Image color to remap to container foreground.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ColorMap
{
get => _colorMap;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCargo.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCargo.cs
index 48eaf1f8c..aa099d96e 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCargo.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteCargo.cs
@@ -60,7 +60,7 @@ public KryptonPaletteCargo(NeedPaintHandler needPaint)
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"User supplied color value.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color1 { get; set; }
@@ -77,7 +77,7 @@ public KryptonPaletteCargo(NeedPaintHandler needPaint)
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"User supplied color value.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color2 { get; set; }
@@ -94,7 +94,7 @@ public KryptonPaletteCargo(NeedPaintHandler needPaint)
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"User supplied color value.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color3 { get; set; }
@@ -111,7 +111,7 @@ public KryptonPaletteCargo(NeedPaintHandler needPaint)
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"User supplied color value.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color4 { get; set; }
@@ -128,7 +128,7 @@ public KryptonPaletteCargo(NeedPaintHandler needPaint)
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"User supplied color value.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color5 { get; set; }
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs
index fac7ab132..808e534dd 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteRibbon.cs
@@ -1,16 +1,13 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
-#pragma warning disable VSSpell001
namespace Krypton.Toolkit
{
///
@@ -19,13 +16,13 @@ namespace Krypton.Toolkit
public class KryptonPaletteRibbon : Storage
{
#region Instance Fields
- private readonly PaletteRedirect _redirect;
private readonly PaletteRibbonBackInheritRedirect _ribbonAppMenuOuterInherit;
private readonly PaletteRibbonBackInheritRedirect _ribbonAppMenuInnerInherit;
private readonly PaletteRibbonBackInheritRedirect _ribbonAppMenuDocsInherit;
private readonly PaletteRibbonTextInheritRedirect _ribbonAppMenuDocsTitleInherit;
private readonly PaletteRibbonTextInheritRedirect _ribbonAppMenuDocsEntryInherit;
private readonly PaletteRibbonGeneralInheritRedirect _ribbonGeneralRedirect;
+ private readonly PaletteRibbonFileAppTabInheritRedirect _ribbonFileAppTabRedirect;
private readonly PaletteRibbonBackInheritRedirect _ribbonQATFullRedirect;
private readonly PaletteRibbonBackInheritRedirect _ribbonQATOverRedirect;
private readonly PaletteRibbonBackInheritRedirect _ribbonGalleryBackRedirect;
@@ -52,44 +49,46 @@ public KryptonPaletteRibbon([DisallowNull] PaletteRedirect redirect,
Debug.Assert(redirect != null);
// Store incoming reference
- _redirect = redirect!;
+ PaletteRedirect redirect1 = redirect!;
// Create redirectors
- _ribbonGeneralRedirect = new PaletteRibbonGeneralInheritRedirect(redirect!);
- _ribbonAppMenuInnerInherit = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonAppMenuInner);
- _ribbonAppMenuOuterInherit = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonAppMenuOuter);
- _ribbonAppMenuDocsInherit = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonAppMenuDocs);
- _ribbonAppMenuDocsTitleInherit = new PaletteRibbonTextInheritRedirect(redirect!, PaletteRibbonTextStyle.RibbonAppMenuDocsTitle);
- _ribbonAppMenuDocsEntryInherit = new PaletteRibbonTextInheritRedirect(redirect!, PaletteRibbonTextStyle.RibbonAppMenuDocsEntry);
- _ribbonQATFullRedirect = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonQATFullbar);
- _ribbonQATOverRedirect = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonQATOverflow);
- _ribbonGalleryBackRedirect = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonGalleryBack);
- _ribbonGalleryBorderRedirect = new PaletteRibbonBackInheritRedirect(redirect!, PaletteRibbonBackStyle.RibbonGalleryBorder);
+ _ribbonGeneralRedirect = new PaletteRibbonGeneralInheritRedirect(redirect1);
+ _ribbonFileAppTabRedirect = new PaletteRibbonFileAppTabInheritRedirect(redirect1);
+ _ribbonAppMenuInnerInherit = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonAppMenuInner);
+ _ribbonAppMenuOuterInherit = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonAppMenuOuter);
+ _ribbonAppMenuDocsInherit = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonAppMenuDocs);
+ _ribbonAppMenuDocsTitleInherit = new PaletteRibbonTextInheritRedirect(redirect1, PaletteRibbonTextStyle.RibbonAppMenuDocsTitle);
+ _ribbonAppMenuDocsEntryInherit = new PaletteRibbonTextInheritRedirect(redirect1, PaletteRibbonTextStyle.RibbonAppMenuDocsEntry);
+ _ribbonQATFullRedirect = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonQATFullbar);
+ _ribbonQATOverRedirect = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonQATOverflow);
+ _ribbonGalleryBackRedirect = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonGalleryBack);
+ _ribbonGalleryBorderRedirect = new PaletteRibbonBackInheritRedirect(redirect1, PaletteRibbonBackStyle.RibbonGalleryBorder);
// Create palettes
RibbonGeneral = new PaletteRibbonGeneral(_ribbonGeneralRedirect, needPaint);
- RibbonAppButton = new KryptonPaletteRibbonAppButton(redirect!, needPaint);
+ RibbonFileAppTab = new PaletteRibbonFileAppTab(_ribbonFileAppTabRedirect, needPaint);
+ RibbonAppButton = new KryptonPaletteRibbonAppButton(redirect1, needPaint);
_ribbonAppMenuInner = new PaletteRibbonBack(_ribbonAppMenuInnerInherit, needPaint);
_ribbonAppMenuOuter = new PaletteRibbonBack(_ribbonAppMenuOuterInherit, needPaint);
_ribbonAppMenuDocs = new PaletteRibbonBack(_ribbonAppMenuDocsInherit, needPaint);
_ribbonAppMenuDocsTitle = new PaletteRibbonText(_ribbonAppMenuDocsTitleInherit, needPaint);
_ribbonAppMenuDocsEntry = new PaletteRibbonText(_ribbonAppMenuDocsEntryInherit, needPaint);
- RibbonGroupArea = new KryptonPaletteRibbonGroupArea(redirect!, needPaint);
- RibbonGroupButtonText = new KryptonPaletteRibbonGroupButtonText(redirect!, needPaint);
- RibbonGroupCheckBoxText = new KryptonPaletteRibbonGroupCheckBoxText(redirect!, needPaint);
- RibbonGroupNormalBorder = new KryptonPaletteRibbonGroupNormalBorder(redirect!, needPaint);
- RibbonGroupNormalTitle = new KryptonPaletteRibbonGroupNormalTitle(redirect!, needPaint);
- RibbonGroupCollapsedBorder = new KryptonPaletteRibbonGroupCollapsedBorder(redirect!, needPaint);
- RibbonGroupCollapsedBack = new KryptonPaletteRibbonGroupCollapsedBack(redirect!, needPaint);
- RibbonGroupCollapsedFrameBorder = new KryptonPaletteRibbonGroupCollapsedFrameBorder(redirect!, needPaint);
- RibbonGroupCollapsedFrameBack = new KryptonPaletteRibbonGroupCollapsedFrameBack(redirect!, needPaint);
- RibbonGroupCollapsedText = new KryptonPaletteRibbonGroupCollapsedText(redirect!, needPaint);
- RibbonGroupRadioButtonText = new KryptonPaletteRibbonGroupRadioButtonText(redirect!, needPaint);
- RibbonGroupLabelText = new KryptonPaletteRibbonGroupLabelText(redirect!, needPaint);
+ RibbonGroupArea = new KryptonPaletteRibbonGroupArea(redirect1, needPaint);
+ RibbonGroupButtonText = new KryptonPaletteRibbonGroupButtonText(redirect1, needPaint);
+ RibbonGroupCheckBoxText = new KryptonPaletteRibbonGroupCheckBoxText(redirect1, needPaint);
+ RibbonGroupNormalBorder = new KryptonPaletteRibbonGroupNormalBorder(redirect1, needPaint);
+ RibbonGroupNormalTitle = new KryptonPaletteRibbonGroupNormalTitle(redirect1, needPaint);
+ RibbonGroupCollapsedBorder = new KryptonPaletteRibbonGroupCollapsedBorder(redirect1, needPaint);
+ RibbonGroupCollapsedBack = new KryptonPaletteRibbonGroupCollapsedBack(redirect1, needPaint);
+ RibbonGroupCollapsedFrameBorder = new KryptonPaletteRibbonGroupCollapsedFrameBorder(redirect1, needPaint);
+ RibbonGroupCollapsedFrameBack = new KryptonPaletteRibbonGroupCollapsedFrameBack(redirect1, needPaint);
+ RibbonGroupCollapsedText = new KryptonPaletteRibbonGroupCollapsedText(redirect1, needPaint);
+ RibbonGroupRadioButtonText = new KryptonPaletteRibbonGroupRadioButtonText(redirect1, needPaint);
+ RibbonGroupLabelText = new KryptonPaletteRibbonGroupLabelText(redirect1, needPaint);
RibbonQATFullbar = new PaletteRibbonBack(_ribbonQATFullRedirect, needPaint);
- RibbonQATMinibar = new KryptonPaletteRibbonQATMinibar(redirect!, needPaint);
+ RibbonQATMinibar = new KryptonPaletteRibbonQATMinibar(redirect1, needPaint);
RibbonQATOverflow = new PaletteRibbonBack(_ribbonQATOverRedirect, needPaint);
- RibbonTab = new KryptonPaletteRibbonTab(redirect!, needPaint);
+ RibbonTab = new KryptonPaletteRibbonTab(redirect1, needPaint);
_ribbonGalleryBack = new PaletteRibbonBack(_ribbonGalleryBackRedirect, needPaint);
_ribbonGalleryBorder = new PaletteRibbonBack(_ribbonGalleryBorderRedirect, needPaint);
}
@@ -255,9 +254,21 @@ public void PopulateFromBase()
public PaletteRibbonGeneral RibbonGeneral { get; }
private bool ShouldSerializeRibbonGeneral() => !RibbonGeneral.IsDefault;
-
#endregion
+ #region RibbonFileAppTab
+ ///
+ /// Get access to the "File App Tab" ribbon settings.
+ ///
+ [KryptonPersist]
+ [Category(@"Visuals")]
+ [Description(@"Ribbon File App Tab settings.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteRibbonFileAppTab RibbonFileAppTab { get; }
+
+ private bool ShouldSerializeRibbonFileAppTab() => !RibbonFileAppTab.IsDefault;
+ #endregion
+
#region RibbonGroupArea
///
/// Get access to the ribbon group area settings.
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSButton.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSButton.cs
index 223f85a4c..5e0caa823 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSButton.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSButton.cs
@@ -101,7 +101,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used when the button is checked.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonCheckedGradientBegin
{
get => InternalKCT.InternalButtonCheckedGradientBegin;
@@ -126,7 +126,7 @@ public Color ButtonCheckedGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used when the button is checked.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonCheckedGradientEnd
{
get => InternalKCT.InternalButtonCheckedGradientEnd;
@@ -151,7 +151,7 @@ public Color ButtonCheckedGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color of the gradient used when the button is checked.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonCheckedGradientMiddle
{
get => InternalKCT.InternalButtonCheckedGradientMiddle;
@@ -176,7 +176,7 @@ public Color ButtonCheckedGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Highlight color used when the button is checked.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonCheckedHighlight
{
get => InternalKCT.InternalButtonCheckedHighlight;
@@ -201,7 +201,7 @@ public Color ButtonCheckedHighlight
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use with ButtonCheckedHighlight.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonCheckedHighlightBorder
{
get => InternalKCT.InternalButtonCheckedHighlightBorder;
@@ -226,7 +226,7 @@ public Color ButtonCheckedHighlightBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use with the ButtonPressedGradientBegin, ButtonPressedGradientMiddle, and ButtonPressedGradientEnd colors.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonPressedBorder
{
get => InternalKCT.InternalButtonPressedBorder;
@@ -251,7 +251,7 @@ public Color ButtonPressedBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used when the button is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonPressedGradientBegin
{
get => InternalKCT.InternalButtonPressedGradientBegin;
@@ -276,7 +276,7 @@ public Color ButtonPressedGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used when the button is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonPressedGradientEnd
{
get => InternalKCT.InternalButtonPressedGradientEnd;
@@ -301,7 +301,7 @@ public Color ButtonPressedGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color of the gradient used when the button is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonPressedGradientMiddle
{
get => InternalKCT.InternalButtonPressedGradientMiddle;
@@ -326,7 +326,7 @@ public Color ButtonPressedGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid color used when the button is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonPressedHighlight
{
get => InternalKCT.InternalButtonPressedHighlight;
@@ -351,7 +351,7 @@ public Color ButtonPressedHighlight
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use with ButtonPressedHighlight.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonPressedHighlightBorder
{
get => InternalKCT.InternalButtonPressedHighlightBorder;
@@ -376,7 +376,7 @@ public Color ButtonPressedHighlightBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use with the ButtonSelectedGradientBegin, ButtonSelectedGradientMiddle, and ButtonSelectedGradientEnd colors.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonSelectedBorder
{
get => InternalKCT.InternalButtonSelectedBorder;
@@ -401,7 +401,7 @@ public Color ButtonSelectedBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used when the button is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonSelectedGradientBegin
{
get => InternalKCT.InternalButtonSelectedGradientBegin;
@@ -426,7 +426,7 @@ public Color ButtonSelectedGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used when the button is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonSelectedGradientEnd
{
get => InternalKCT.InternalButtonSelectedGradientEnd;
@@ -451,7 +451,7 @@ public Color ButtonSelectedGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color of the gradient used when the button is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonSelectedGradientMiddle
{
get => InternalKCT.InternalButtonSelectedGradientMiddle;
@@ -476,7 +476,7 @@ public Color ButtonSelectedGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid color used when the button is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonSelectedHighlight
{
get => InternalKCT.InternalButtonSelectedHighlight;
@@ -501,7 +501,7 @@ public Color ButtonSelectedHighlight
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use with ButtonSelectedHighlight.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ButtonSelectedHighlightBorder
{
get => InternalKCT.InternalButtonSelectedHighlightBorder;
@@ -526,7 +526,7 @@ public Color ButtonSelectedHighlightBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid color to use when the button is checked and gradients are being used.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color CheckBackground
{
get => InternalKCT.InternalCheckBackground;
@@ -551,7 +551,7 @@ public Color CheckBackground
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid color to use when the button is checked and selected and gradients are being used.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color CheckPressedBackground
{
get => InternalKCT.InternalCheckPressedBackground;
@@ -576,7 +576,7 @@ public Color CheckPressedBackground
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid color to use when the button is checked and selected and gradients are being used.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color CheckSelectedBackground
{
get => InternalKCT.InternalCheckSelectedBackground;
@@ -601,7 +601,7 @@ public Color CheckSelectedBackground
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the ToolStripOverflowButton.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color OverflowButtonGradientBegin
{
get => InternalKCT.InternalOverflowButtonGradientBegin;
@@ -626,7 +626,7 @@ public Color OverflowButtonGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the ToolStripOverflowButton.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color OverflowButtonGradientEnd
{
get => InternalKCT.InternalOverflowButtonGradientEnd;
@@ -651,7 +651,7 @@ public Color OverflowButtonGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color of the gradient used in the ToolStripOverflowButton.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color OverflowButtonGradientMiddle
{
get => InternalKCT.InternalOverflowButtonGradientMiddle;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSGrip.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSGrip.cs
index dfb60e57f..af62f68b5 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSGrip.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSGrip.cs
@@ -59,7 +59,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to use for shadow effects on the grip (move handle).")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color GripDark
{
get => InternalKCT.InternalGripDark;
@@ -84,7 +84,7 @@ public Color GripDark
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to use for highlight effects on the grip (move handle).")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color GripLight
{
get => InternalKCT.InternalGripLight;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenu.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenu.cs
index 167076fd2..b8842f1c3 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenu.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenu.cs
@@ -85,7 +85,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Staring color of the gradient used in the image margin of a ToolStripDropDownMenu.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageMarginGradientBegin
{
get => InternalKCT.InternalImageMarginGradientBegin;
@@ -110,7 +110,7 @@ public Color ImageMarginGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the image margin of a ToolStripDropDownMenu.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageMarginGradientEnd
{
get => InternalKCT.InternalImageMarginGradientEnd;
@@ -135,7 +135,7 @@ public Color ImageMarginGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color color of the gradient used in the image margin of a ToolStripDropDownMenu.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageMarginGradientMiddle
{
get => InternalKCT.InternalImageMarginGradientMiddle;
@@ -160,7 +160,7 @@ public Color ImageMarginGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the image margin of a ToolStripDropDownMenu when an item is revealed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageMarginRevealedGradientBegin
{
get => InternalKCT.InternalImageMarginRevealedGradientBegin;
@@ -185,7 +185,7 @@ public Color ImageMarginRevealedGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the image margin of a ToolStripDropDownMenu when an item is revealed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageMarginRevealedGradientEnd
{
get => InternalKCT.InternalImageMarginRevealedGradientEnd;
@@ -210,7 +210,7 @@ public Color ImageMarginRevealedGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color of the gradient used in the image margin of a ToolStripDropDownMenu when an item is revealed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageMarginRevealedGradientMiddle
{
get => InternalKCT.InternalImageMarginRevealedGradientMiddle;
@@ -235,7 +235,7 @@ public Color ImageMarginRevealedGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color that is the border color to use on a MenuStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuBorder
{
get => InternalKCT.InternalMenuBorder;
@@ -260,7 +260,7 @@ public Color MenuBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to draw text for individual a ToolStripMenuItem.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemText
{
get => InternalKCT.InternalMenuItemText;
@@ -285,7 +285,7 @@ public Color MenuItemText
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use with a ToolStripMenuItem.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemBorder
{
get => InternalKCT.InternalMenuItemBorder;
@@ -310,7 +310,7 @@ public Color MenuItemBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used when a top-level ToolStripMenuItem is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemPressedGradientBegin
{
get => InternalKCT.InternalMenuItemPressedGradientBegin;
@@ -335,7 +335,7 @@ public Color MenuItemPressedGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used when a top-level ToolStripMenuItem is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemPressedGradientEnd
{
get => InternalKCT.InternalMenuItemPressedGradientEnd;
@@ -360,7 +360,7 @@ public Color MenuItemPressedGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Middle color of the gradient used when a top-level ToolStripMenuItem is pressed.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemPressedGradientMiddle
{
get => InternalKCT.InternalMenuItemPressedGradientMiddle;
@@ -385,7 +385,7 @@ public Color MenuItemPressedGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid color to use when a ToolStripMenuItem other than the top-level ToolStripMenuItem is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemSelected
{
get => InternalKCT.InternalMenuItemSelected;
@@ -410,7 +410,7 @@ public Color MenuItemSelected
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used when the ToolStripMenuItem is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemSelectedGradientBegin
{
get => InternalKCT.InternalMenuItemSelectedGradientBegin;
@@ -435,7 +435,7 @@ public Color MenuItemSelectedGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used when the ToolStripMenuItem is selected.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuItemSelectedGradientEnd
{
get => InternalKCT.InternalMenuItemSelectedGradientEnd;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenuStrip.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenuStrip.cs
index f8584fa24..7b6bad0e6 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenuStrip.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSMenuStrip.cs
@@ -63,7 +63,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to draw text on the MenuStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuStripText
{
get => InternalKCT.InternalMenuStripText;
@@ -113,7 +113,7 @@ public Font? MenuStripFont
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the MenuStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuStripGradientBegin
{
get => InternalKCT.InternalMenuStripGradientBegin;
@@ -138,7 +138,7 @@ public Color MenuStripGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the MenuStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color MenuStripGradientEnd
{
get => InternalKCT.InternalMenuStripGradientEnd;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSRafting.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSRafting.cs
index 04a76685e..8dcc68542 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSRafting.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSRafting.cs
@@ -59,7 +59,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the ToolStripContainer.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color RaftingContainerGradientBegin
{
get => InternalKCT.InternalRaftingContainerGradientBegin;
@@ -84,7 +84,7 @@ public Color RaftingContainerGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the ToolStripContainer.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color RaftingContainerGradientEnd
{
get => InternalKCT.InternalRaftingContainerGradientEnd;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSSeparator.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSSeparator.cs
index 89125d61f..cf8088c8c 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSSeparator.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSSeparator.cs
@@ -59,7 +59,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to use for shadow effects on the ToolStripSeparator.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color SeparatorDark
{
get => InternalKCT.InternalSeparatorDark;
@@ -84,7 +84,7 @@ public Color SeparatorDark
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to use for highlight effects on the ToolStripSeparator.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color SeparatorLight
{
get => InternalKCT.InternalSeparatorLight;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSStatusStrip.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSStatusStrip.cs
index 725dd4be9..cb1a2b4d9 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSStatusStrip.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSStatusStrip.cs
@@ -63,7 +63,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to draw text on the StatusStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color StatusStripText
{
get => InternalKCT.InternalStatusStripText;
@@ -113,7 +113,7 @@ public Font? StatusStripFont
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used on the StatusStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color StatusStripGradientBegin
{
get => InternalKCT.InternalStatusStripGradientBegin;
@@ -138,7 +138,7 @@ public Color StatusStripGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used on the StatusStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color StatusStripGradientEnd
{
get => InternalKCT.InternalStatusStripGradientEnd;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSToolStrip.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSToolStrip.cs
index ae8c63392..daec1bff6 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSToolStrip.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTMSToolStrip.cs
@@ -77,7 +77,7 @@ public void PopulateFromBase()
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Color to draw text on the ToolStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripText
{
get => InternalKCT.InternalToolStripText;
@@ -127,7 +127,7 @@ public Font? ToolStripFont
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Border color to use on the bottom edge of the ToolStrip.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripBorder
{
get => InternalKCT.InternalToolStripBorder;
@@ -152,7 +152,7 @@ public Color ToolStripBorder
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the ToolStripContentPanel..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripContentPanelGradientBegin
{
get => InternalKCT.InternalToolStripContentPanelGradientBegin;
@@ -177,7 +177,7 @@ public Color ToolStripContentPanelGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the ToolStripContentPanel.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripContentPanelGradientEnd
{
get => InternalKCT.InternalToolStripContentPanelGradientEnd;
@@ -202,7 +202,7 @@ public Color ToolStripContentPanelGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Solid background color solid background color of the ToolStripDropDown..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripDropDownBackground
{
get => InternalKCT.InternalToolStripDropDownBackground;
@@ -227,7 +227,7 @@ public Color ToolStripDropDownBackground
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the ToolStrip background..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripGradientBegin
{
get => InternalKCT.InternalToolStripGradientBegin;
@@ -252,7 +252,7 @@ public Color ToolStripGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the ToolStrip background..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripGradientEnd
{
get => InternalKCT.InternalToolStripGradientEnd;
@@ -277,7 +277,7 @@ public Color ToolStripGradientEnd
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the ToolStrip background..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripGradientMiddle
{
get => InternalKCT.InternalToolStripGradientMiddle;
@@ -302,7 +302,7 @@ public Color ToolStripGradientMiddle
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Starting color of the gradient used in the ToolStripPanel..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripPanelGradientBegin
{
get => InternalKCT.InternalToolStripPanelGradientBegin;
@@ -327,7 +327,7 @@ public Color ToolStripPanelGradientBegin
[KryptonPersist(false)]
[Category(@"ToolMenuStatus")]
[Description(@"Ending color of the gradient used in the ToolStripPanel..")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ToolStripPanelGradientEnd
{
get => InternalKCT.InternalToolStripPanelGradientEnd;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButton.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButton.cs
index 9d7d8f827..fb0b9ad29 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButton.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Component/KryptonPaletteTabButton.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -26,15 +24,15 @@ public class KryptonPaletteTabButton : Storage
/// Border style.
/// Content style.
/// Delegate for notifying paint requests.
- public KryptonPaletteTabButton(PaletteRedirect? redirect,
+ public KryptonPaletteTabButton(PaletteRedirect redirect,
PaletteBackStyle backStyle,
PaletteBorderStyle borderStyle,
PaletteContentStyle contentStyle,
NeedPaintHandler needPaint)
{
// Create the storage objects
- OverrideFocus = new PaletteTabTripleRedirect(redirect!, backStyle, borderStyle, contentStyle, needPaint);
- StateCommon = new PaletteTabTripleRedirect(redirect!, backStyle, borderStyle, contentStyle, needPaint);
+ OverrideFocus = new PaletteTabTripleRedirect(redirect, backStyle, borderStyle, contentStyle, needPaint);
+ StateCommon = new PaletteTabTripleRedirect(redirect, backStyle, borderStyle, contentStyle, needPaint);
StateDisabled = new PaletteTabTriple(StateCommon, needPaint);
StateNormal = new PaletteTabTriple(StateCommon, needPaint);
StateTracking = new PaletteTabTriple(StateCommon, needPaint);
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs
index 4372602bf..64696b51e 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteDataGridViewContentStates.cs
@@ -390,7 +390,7 @@ public virtual InheritBool MultiLine
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Main color for the text.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public virtual Color Color1
{
@@ -423,7 +423,7 @@ public virtual Color Color1
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Secondary color for the text.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public virtual Color Color2
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs
index 87f40692c..8b3a8bb91 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlBackStates.cs
@@ -99,7 +99,7 @@ public virtual void PopulateFromBase(PaletteState state) =>
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Main background color.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public Color Color1
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs
index 39b7e3aff..9acce525e 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteInputControlContentStates.cs
@@ -296,7 +296,7 @@ public PaletteRelativeAlign TextH
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Main color for the text.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public virtual Color Color1
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteWrapLabel.cs b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteWrapLabel.cs
index cb2ed5d92..284fc49b9 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteWrapLabel.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Palette Controls/PaletteWrapLabel.cs
@@ -91,7 +91,7 @@ public virtual Font? Font
[KryptonPersist(false)]
[Category(@"Visuals")]
[Description(@"Color for the text.")]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
[RefreshProperties(RefreshProperties.All)]
public virtual Color TextColor
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs
index c46c64cf2..8c519d7a1 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderBase.cs
@@ -291,42 +291,42 @@ public abstract void DrawContent(RenderContext context,
///
/// Cached values from layout call.
/// True if the image is being Displayed; otherwise false.
- public abstract bool GetContentImageDisplayed(IDisposable memento);
+ public abstract bool GetContentImageDisplayed(IDisposable? memento);
///
/// Request the calculated position of the content image.
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- public abstract Rectangle GetContentImageRectangle(IDisposable memento);
+ public abstract Rectangle GetContentImageRectangle(IDisposable? memento);
///
/// Request the calculated display of the short text.
///
/// Cached values from layout call.
/// True if the short text is being Displayed; otherwise false.
- public abstract bool GetContentShortTextDisplayed(IDisposable memento);
+ public abstract bool GetContentShortTextDisplayed(IDisposable? memento);
///
/// Request the calculated position of the content short text.
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- public abstract Rectangle GetContentShortTextRectangle(IDisposable memento);
+ public abstract Rectangle GetContentShortTextRectangle(IDisposable? memento);
///
/// Request the calculated display of the long text.
///
/// Cached values from layout call.
/// True if the long text is being Displayed; otherwise false.
- public abstract bool GetContentLongTextDisplayed(IDisposable memento);
+ public abstract bool GetContentLongTextDisplayed(IDisposable? memento);
///
/// Request the calculated position of the content long text.
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- public abstract Rectangle GetContentLongTextRectangle(IDisposable memento);
+ public abstract Rectangle GetContentLongTextRectangle(IDisposable? memento);
#endregion
#region RenderTabBorder
@@ -439,12 +439,12 @@ public abstract void DrawTabBorder(RenderContext context,
/// Palette used for general ribbon settings.
/// Palette used for background ribbon settings.
/// Cached values to use when drawing.
- public abstract IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
+ public abstract IDisposable? DrawRibbonTabContextTitle(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento);
+ IDisposable? memento);
///
/// Draw the application button.
@@ -455,30 +455,28 @@ public abstract IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
/// State associated with rendering.
/// Palette used for sourcing settings.
/// Cached storage for drawing objects.
- public abstract IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape,
+ public abstract IDisposable? DrawRibbonApplicationButton(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento);
+ IDisposable? memento);
///
- /// Draw the application tab.
+ /// Draw the "File application tab"
///
/// Ribbon shape.
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public abstract IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
+ public abstract IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
- Color baseColor1,
- Color baseColor2,
- IDisposable memento);
+ IPaletteRibbonFileAppTab palette,
+ IDisposable? memento);
///
/// Perform drawing of a ribbon cluster edge.
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderDefinitions.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderDefinitions.cs
index a90b890f0..62d8dcc55 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderDefinitions.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderDefinitions.cs
@@ -252,42 +252,42 @@ void DrawContent(RenderContext context,
///
/// Cached values from layout call.
/// True if the image is being Displayed; otherwise false.
- bool GetContentImageDisplayed(IDisposable memento);
+ bool GetContentImageDisplayed(IDisposable? memento);
///
/// Request the calculated position of the content image.
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- Rectangle GetContentImageRectangle(IDisposable memento);
+ Rectangle GetContentImageRectangle(IDisposable? memento);
///
/// Request the calculated display of the short text.
///
/// Cached values from layout call.
/// True if the short text is being Displayed; otherwise false.
- bool GetContentShortTextDisplayed(IDisposable memento);
+ bool GetContentShortTextDisplayed(IDisposable? memento);
///
/// Request the calculated position of the content short text.
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- Rectangle GetContentShortTextRectangle(IDisposable memento);
+ Rectangle GetContentShortTextRectangle(IDisposable? memento);
///
/// Request the calculated display of the long text.
///
/// Cached values from layout call.
/// True if the long text is being Displayed; otherwise false.
- bool GetContentLongTextDisplayed(IDisposable memento);
+ bool GetContentLongTextDisplayed(IDisposable? memento);
///
/// Request the calculated position of the content long text.
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- Rectangle GetContentLongTextRectangle(IDisposable memento);
+ Rectangle GetContentLongTextRectangle(IDisposable? memento);
}
#endregion
@@ -411,12 +411,12 @@ public interface IRenderRibbon
/// Palette used for general ribbon settings.
/// Palette used for background ribbon settings.
/// Cached values to use when drawing.
- IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
+ IDisposable? DrawRibbonTabContextTitle(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento);
+ IDisposable? memento);
///
/// Draw the application button.
///
@@ -426,12 +426,12 @@ IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
/// State associated with rendering.
/// Palette used for sourcing settings.
/// Cached values to use when drawing.
- IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape,
+ IDisposable? DrawRibbonApplicationButton(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento);
+ IDisposable? memento);
///
/// Draw the application tab.
@@ -440,16 +440,14 @@ IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape,
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
+ IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
- Color baseColor1,
- Color baseColor2,
- IDisposable memento);
+ IPaletteRibbonFileAppTab palette,
+ IDisposable? memento);
///
/// Perform drawing of a ribbon cluster edge.
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderExpertHelpers.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderExpertHelpers.cs
index c622a7289..28d5f6a52 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderExpertHelpers.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderExpertHelpers.cs
@@ -61,7 +61,7 @@ static RenderExpertHelpers()
IDisposable? memento)
{
using var clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -108,7 +108,7 @@ static RenderExpertHelpers()
if (rect is { Width: > 0, Height: > 0 })
{
var generate = true;
- MementoBackExpertShadow? cache;
+ MementoBackExpertShadow cache;
// Access a cache instance and decide if cache resources need generating
if (memento is MementoBackExpertShadow expertShadow)
@@ -194,7 +194,7 @@ static RenderExpertHelpers()
IDisposable? memento)
{
using var clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -243,7 +243,7 @@ static RenderExpertHelpers()
if (rect is { Width: > 0, Height: > 0 })
{
var generate = true;
- MementoBackExpertSquareHighlight? cache;
+ MementoBackExpertSquareHighlight cache;
// Access a cache instance and decide if cache resources need generating
if (memento is MementoBackExpertSquareHighlight highlight)
@@ -375,7 +375,7 @@ private static IDisposable DrawBackSolid(RectangleF drawRect,
if (drawRect is { Width: > 0, Height: > 0 })
{
var generate = true;
- MementoBackExpertChecked? cache;
+ MementoBackExpertChecked cache;
// Access a cache instance and decide if cache resources need generating
if (memento is MementoBackExpertChecked expertChecked)
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderGlassHelpers.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderGlassHelpers.cs
index 7b649f814..455b95f4c 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderGlassHelpers.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderGlassHelpers.cs
@@ -62,7 +62,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -115,7 +115,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -167,7 +167,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -458,7 +458,7 @@ static RenderGlassHelpers()
{
using Clipping clip = new Clipping(context.Graphics, path);
var generate = true;
- MementoBackGlassThreeEdge? cache;
+ MementoBackGlassThreeEdge cache;
// Access a cache instance and decide if cache resources need generating
if (memento is MementoBackGlassThreeEdge glassThreeEdge)
@@ -657,7 +657,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -713,7 +713,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -768,7 +768,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -812,7 +812,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoTriple? cache;
+ MementoTriple cache;
if (memento is MementoTriple triple)
{
@@ -862,7 +862,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoTriple? cache;
+ MementoTriple cache;
if (memento is MementoTriple triple)
{
@@ -914,7 +914,7 @@ static RenderGlassHelpers()
IDisposable? memento)
{
using Clipping clip = new Clipping(context.Graphics, path);
- MementoTriple? cache;
+ MementoTriple cache;
if (memento is MementoTriple triple)
{
@@ -1077,7 +1077,7 @@ private static IDisposable DrawBackLinearRadial(RectangleF drawRect,
float glassPercent,
IDisposable? memento)
{
- MementoDouble? cache;
+ MementoDouble cache;
if (memento is MementoDouble mementoDouble)
{
@@ -1414,7 +1414,7 @@ private static IDisposable DrawBackGlassFade(RectangleF drawRect,
outerRect is { Width: > 0, Height: > 0 })
{
var generate = true;
- MementoBackGlassLinear? cache;
+ MementoBackGlassLinear cache;
// Access a cache instance and decide if cache resources need generating
if (memento is MementoBackGlassLinear glassLinear)
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs
index 7f5254275..97b82776b 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderMicrosoft365.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -19,15 +17,14 @@ namespace Krypton.Toolkit
public class RenderMicrosoft365 : RenderOffice2010
{
#region Static Variables
- private static readonly float BORDER_PERCENT = 0.6f;
-
- private static readonly float WHITE_PERCENT = 0.4f;
+ private const float BORDER_PERCENT = 0.6f;
+ private const float WHITE_PERCENT = 0.4f;
#endregion
#region Constructor
static RenderMicrosoft365()
{
-
+ // ??
}
#endregion
@@ -50,11 +47,11 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
Debug.Assert(paletteBack != null);
// Get the first border color, and then lighten it by merging with white
- Color borderColour = paletteBack.GetBackColor1(state), lightColour = CommonHelper.MergeColors(borderColour, BORDER_PERCENT, Color.White, WHITE_PERCENT);
+ Color borderColour = paletteBack!.GetBackColor1(state), lightColour = CommonHelper.MergeColors(borderColour, BORDER_PERCENT, Color.White, WHITE_PERCENT);
// Draw inside of the border edge in a lighter version of the border
using var drawBrush = new SolidBrush(lightColour);
- context.Graphics.FillRectangle(drawBrush, displayRect);
+ context!.Graphics.FillRectangle(drawBrush, displayRect);
}
#endregion
@@ -88,7 +85,7 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context, Rectangle rect, IPaletteRibbonGeneral paletteGeneral, IPaletteRibbonBack paletteBack, IDisposable memento)
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context, Rectangle rect, IPaletteRibbonGeneral paletteGeneral, IPaletteRibbonBack paletteBack, IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -149,13 +146,15 @@ protected override IDisposable DrawRibbonTabContext(RenderContext context, Recta
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, RenderContext context, Rectangle rect, PaletteState state, Color baseColor1, Color baseColor2, IDisposable memento)
+ public override IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape, RenderContext context, Rectangle rect,
+ PaletteState state, IPaletteRibbonFileAppTab palette, IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
+ Color topColor = palette.GetRibbonFileAppTabTopColor(state);
+ Color bottomColor = palette.GetRibbonFileAppTabBottomColor(state);
var generate = true;
MementoRibbonAppTab2013 cache;
@@ -163,13 +162,13 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, R
if (memento is MementoRibbonAppTab2013 tab2013)
{
cache = tab2013;
- generate = !cache.UseCachedValues(rect, baseColor1);
+ generate = !cache.UseCachedValues(rect, topColor);
}
else
{
memento?.Dispose();
- cache = new MementoRibbonAppTab2013(rect, baseColor1);
+ cache = new MementoRibbonAppTab2013(rect, topColor);
memento = cache;
}
@@ -181,18 +180,15 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, R
// Create common paths to all the app tab states
cache.GeneratePaths(rect, state);
- //cache.borderPen = new Pen(baseColor1);
// Create state specific colors/brushes/pens
cache.InsideFillBrush = state switch
{
- PaletteState.Normal =>
- //cache.borderBrush = new SolidBrush(baseColor1);
- new SolidBrush(baseColor1),
- PaletteState.Tracking => new SolidBrush(baseColor2),
- PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(
- ControlPaint.LightLight(baseColor2)),
- PaletteState.Pressed => new SolidBrush(baseColor2),
+ PaletteState.Normal => new SolidBrush(topColor),
+ PaletteState.Disabled => new SolidBrush(ControlPaint.DarkDark(topColor)),
+ PaletteState.Tracking => new SolidBrush(bottomColor),
+ PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(ControlPaint.LightLight(bottomColor)),
+ PaletteState.Pressed => new SolidBrush(bottomColor),
_ => cache.InsideFillBrush
};
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs
index 266df9752..76b3c8cda 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2007.cs
@@ -113,11 +113,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs
index c3b7b16d2..67cbeddcf 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2010.cs
@@ -115,11 +115,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs
index 5a463d5cc..1d5e0fb92 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderOffice2013.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -18,8 +16,8 @@ namespace Krypton.Toolkit
public class RenderOffice2013 : RenderOffice2010
{
#region Static Fields
- private static readonly float BORDER_PERCENT = 0.6f;
- private static readonly float WHITE_PERCENT = 0.4f;
+ private const float BORDER_PERCENT = 0.6f;
+ private const float WHITE_PERCENT = 0.4f;
//private static readonly Blend _ribbonGroup5Blend;
//private static readonly Blend _ribbonGroup6Blend;
//private static readonly Blend _ribbonGroup7Blend;
@@ -61,7 +59,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
Debug.Assert(paletteBack != null);
// Get the first border color
- Color borderColor = paletteBack.GetBackColor1(state);
+ Color borderColor = paletteBack!.GetBackColor1(state);
// We want to lighten it by merging with white
Color lightColor = CommonHelper.MergeColors(borderColor, BORDER_PERCENT,
@@ -69,7 +67,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
// Draw inside of the border edge in a lighter version of the border
using var drawBrush = new SolidBrush(lightColor);
- context.Graphics.FillRectangle(drawBrush, displayRect);
+ context!.Graphics.FillRectangle(drawBrush, displayRect);
}
#endregion
@@ -94,7 +92,6 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
// Use the professional renderer but pull colors from the palette
var renderer = new KryptonOffice2013Renderer(colorPalette.ColorTable)
{
-
// Setup the need to use rounded corners
RoundedEdges = colorPalette.ColorTable.UseRoundedEdges != InheritBool.False
};
@@ -108,11 +105,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -165,6 +162,7 @@ protected override IDisposable DrawRibbonTabContext(RenderContext context,
return memento;
}
+
///
/// Draw the application tab.
///
@@ -172,19 +170,19 @@ protected override IDisposable DrawRibbonTabContext(RenderContext context,
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
- Color baseColor1,
- Color baseColor2,
- IDisposable memento)
+ IPaletteRibbonFileAppTab palette,
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
+ Color topColor = palette.GetRibbonFileAppTabTopColor(state);
+ Color bottomColor = palette.GetRibbonFileAppTabBottomColor(state);
var generate = true;
MementoRibbonAppTab2013 cache;
@@ -192,13 +190,13 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
if (memento is MementoRibbonAppTab2013 tab2013)
{
cache = tab2013;
- generate = !cache.UseCachedValues(rect, baseColor1);
+ generate = !cache.UseCachedValues(rect, topColor);
}
else
{
memento?.Dispose();
- cache = new MementoRibbonAppTab2013(rect, baseColor1);
+ cache = new MementoRibbonAppTab2013(rect, topColor);
memento = cache;
}
@@ -210,18 +208,15 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
// Create common paths to all the app tab states
cache.GeneratePaths(rect, state);
- //cache.borderPen = new Pen(baseColor1);
// Create state specific colors/brushes/pens
cache.InsideFillBrush = state switch
{
- PaletteState.Normal =>
- //cache.borderBrush = new SolidBrush(baseColor1);
- new SolidBrush(baseColor1),
- PaletteState.Tracking => new SolidBrush(baseColor2),
- PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(
- ControlPaint.LightLight(baseColor2)),
- PaletteState.Pressed => new SolidBrush(baseColor2),
+ PaletteState.Normal => new SolidBrush(topColor),
+ PaletteState.Disabled => new SolidBrush(ControlPaint.DarkDark(topColor)),
+ PaletteState.Tracking => new SolidBrush(bottomColor),
+ PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(ControlPaint.LightLight(bottomColor)),
+ PaletteState.Pressed => new SolidBrush(bottomColor),
_ => cache.InsideFillBrush
};
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderProfessional.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderProfessional.cs
index fbac03aad..43d2e1ab2 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderProfessional.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderProfessional.cs
@@ -146,11 +146,11 @@ protected virtual void DrawGrabHandleGlyph(RenderContext context,
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs
index 7dbfa315f..7c07a579c 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderSparkle.cs
@@ -91,12 +91,12 @@ static RenderSparkle()
/// Palette used for general ribbon settings.
/// Palette used for background ribbon settings.
/// Cached storage for drawing objects.
- public override IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonTabContextTitle(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento) =>
+ IDisposable? memento) =>
DrawRibbonTabContext(context, rect, paletteGeneral, paletteBack, memento);
///
@@ -108,12 +108,12 @@ public override IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
/// State associated with rendering.
/// Palette used for sourcing settings.
/// Cached storage for drawing objects.
- public override IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonApplicationButton(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento) =>
+ IDisposable? memento) =>
DrawRibbonAppButton(shape, context, rect, state, palette, true, memento);
///
@@ -315,11 +315,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs
index 1e13b0bb9..c3f2605ce 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderStandard.cs
@@ -1,12 +1,10 @@
#region BSD License
/*
- *
* Original BSD 3-Clause License (https://github.com/ComponentFactory/Krypton/blob/master/LICENSE)
* © Component Factory Pty Ltd, 2006 - 2016, (Version 4.5.0.0) All rights reserved.
*
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
*/
#endregion
@@ -388,7 +386,6 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
// Use the professional renderer but pull colors from the palette
KryptonStandardRenderer renderer = new KryptonStandardRenderer(colorPalette.ColorTable)
{
-
// Setup the need to use rounded corners
RoundedEdges = colorPalette.ColorTable.UseRoundedEdges != InheritBool.False
};
@@ -498,7 +495,7 @@ public override Padding GetBorderDisplayPadding([DisallowNull] IPaletteBorder pa
var borderWidth = palette.GetBorderWidth(state);
// Divide the rounding effect by PI to get the actual pixel distance needed
- // for offsetting. But add 2 so it starts indenting on a rounding of just 1.
+ // for offsetting. But add 2, so it starts indenting on a rounding of just 1.
int roundPadding = Convert.ToInt16((palette.GetBorderRounding(state) + borderWidth + 2) / Math.PI);
// If not involving rounding then padding for an edge is just the border width
@@ -726,10 +723,10 @@ public override void DrawBorder([DisallowNull] RenderContext context,
// Is there anything to actually draw?
if (rect is { Width: > 0, Height: > 0 } && CommonHelper.HasABorder(borders))
{
- // Only use anti aliasing if the border is rounded
- SmoothingMode smoothMode = paletteBorder.GetBorderRounding(state) > 0 ? SmoothingMode.AntiAlias : SmoothingMode.Default;
+ // Only use antialiasing if the border is rounded
+ //SmoothingMode smoothMode = paletteBorder.GetBorderRounding(state) > 0 ? SmoothingMode.AntiAlias : SmoothingMode.Default;
- // We want to draw using anti aliasing for a nice smooth effect
+ // We want to draw using antialiasing for a nice smooth effect
using var hint = new GraphicsHint(context.Graphics, paletteBorder.GetBorderGraphicsHint(state));
// Cache commonly used values
var borderWidth = paletteBorder.GetBorderWidth(state);
@@ -865,7 +862,7 @@ public override void DrawBorder([DisallowNull] RenderContext context,
state = PaletteState.Normal;
}
- // We want to draw using anti aliasing for a nice smooth effect
+ // We want to draw using antialiasing for a nice smooth effect
using var smooth = new GraphicsHint(context.Graphics, palette.GetBackGraphicsHint(state));
// Cache commonly used values
Image? backImage = palette.GetBackImage(state);
@@ -1477,7 +1474,7 @@ public override void DrawContent([DisallowNull] RenderContext context,
///
/// Cached values from layout call.
/// True if the image is being Displayed; otherwise false.
- public override bool GetContentImageDisplayed(IDisposable memento)
+ public override bool GetContentImageDisplayed(IDisposable? memento)
{
if (memento != null)
{
@@ -1495,7 +1492,7 @@ public override bool GetContentImageDisplayed(IDisposable memento)
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- public override Rectangle GetContentImageRectangle(IDisposable memento)
+ public override Rectangle GetContentImageRectangle(IDisposable? memento)
{
if (memento != null)
{
@@ -1513,7 +1510,7 @@ public override Rectangle GetContentImageRectangle(IDisposable memento)
///
/// Cached values from layout call.
/// True if the short text is being Displayed; otherwise false.
- public override bool GetContentShortTextDisplayed(IDisposable memento)
+ public override bool GetContentShortTextDisplayed(IDisposable? memento)
{
if (memento != null)
{
@@ -1531,7 +1528,7 @@ public override bool GetContentShortTextDisplayed(IDisposable memento)
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- public override Rectangle GetContentShortTextRectangle(IDisposable memento)
+ public override Rectangle GetContentShortTextRectangle(IDisposable? memento)
{
if (memento != null)
{
@@ -1549,7 +1546,7 @@ public override Rectangle GetContentShortTextRectangle(IDisposable memento)
///
/// Cached values from layout call.
/// True if the long text is being Displayed; otherwise false.
- public override bool GetContentLongTextDisplayed(IDisposable memento)
+ public override bool GetContentLongTextDisplayed(IDisposable? memento)
{
if (memento != null)
{
@@ -1567,7 +1564,7 @@ public override bool GetContentLongTextDisplayed(IDisposable memento)
///
/// Cached values from layout call.
/// Display rectangle for the image content.
- public override Rectangle GetContentLongTextRectangle(IDisposable memento)
+ public override Rectangle GetContentLongTextRectangle(IDisposable? memento)
{
if (memento != null)
{
@@ -2136,12 +2133,12 @@ public override void DrawTabBorder([DisallowNull] RenderContext context,
/// Palette used for general ribbon settings.
/// Palette used for background ribbon settings.
/// Cached storage for drawing objects.
- public override IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonTabContextTitle(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento) =>
+ IDisposable? memento) =>
DrawRibbonTabContext(context, rect, paletteGeneral, paletteBack, memento);
///
@@ -2153,12 +2150,12 @@ public override IDisposable DrawRibbonTabContextTitle(PaletteRibbonShape shape,
/// State associated with rendering.
/// Palette used for sourcing settings.
/// Cached storage for drawing objects.
- public override IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonApplicationButton(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento) =>
+ IDisposable? memento) =>
DrawRibbonAppButton(shape, context, rect, state, palette, false, memento);
///
@@ -2168,17 +2165,15 @@ public override IDisposable DrawRibbonApplicationButton(PaletteRibbonShape shape
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
- Color baseColor1,
- Color baseColor2,
- IDisposable memento) =>
- DrawRibbonAppTab(shape, context, rect, state, baseColor1, baseColor2, memento);
+ IPaletteRibbonFileAppTab palette,
+ IDisposable? memento) =>
+ DrawRibbonAppTab(shape, context, rect, state, palette, memento);
///
/// Perform drawing of a ribbon cluster edge.
@@ -8877,12 +8872,12 @@ protected virtual void DrawRibbonTabGlowingBottom(Rectangle rect,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonTabSelected2007(RenderContext context,
+ protected virtual IDisposable? DrawRibbonTabSelected2007(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
VisualOrientation orientation,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -8975,7 +8970,7 @@ protected virtual IDisposable DrawRibbonTabSelected2007(RenderContext context,
///
protected virtual void DrawRibbonTabSelectedTop2007(Rectangle rect,
Color c4, Color c5,
- MementoRibbonTabSelected2007 cache)
+ MementoRibbonTabSelected2007? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -8999,7 +8994,7 @@ protected virtual void DrawRibbonTabSelectedTop2007(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabSelectedTopDraw2007(Rectangle rect,
- MementoRibbonTabSelected2007 cache,
+ MementoRibbonTabSelected2007? cache,
Graphics? g)
{
// Fill in the bottom two lines that the 'FillPath' above missed
@@ -9026,7 +9021,7 @@ protected virtual void DrawRibbonTabSelectedTopDraw2007(Rectangle rect,
///
protected virtual void DrawRibbonTabSelectedLeft2007(Rectangle rect,
Color c4, Color c5,
- MementoRibbonTabSelected2007 cache)
+ MementoRibbonTabSelected2007? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9050,7 +9045,7 @@ protected virtual void DrawRibbonTabSelectedLeft2007(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabSelectedLeftDraw2007(Rectangle rect,
- MementoRibbonTabSelected2007 cache,
+ MementoRibbonTabSelected2007? cache,
Graphics? g)
{
// Fill in the bottom two lines that the 'FillPath' above missed
@@ -9077,7 +9072,7 @@ protected virtual void DrawRibbonTabSelectedLeftDraw2007(Rectangle rect,
///
protected virtual void DrawRibbonTabSelectedRight2007(Rectangle rect,
Color c4, Color c5,
- MementoRibbonTabSelected2007 cache)
+ MementoRibbonTabSelected2007? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9101,7 +9096,7 @@ protected virtual void DrawRibbonTabSelectedRight2007(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabSelectedRightDraw2007(Rectangle rect,
- MementoRibbonTabSelected2007 cache,
+ MementoRibbonTabSelected2007? cache,
Graphics? g)
{
// Fill in the bottom two lines that the 'FillPath' above missed
@@ -9128,7 +9123,7 @@ protected virtual void DrawRibbonTabSelectedRightDraw2007(Rectangle rect,
///
protected virtual void DrawRibbonTabSelectedBottom2007(Rectangle rect,
Color c4, Color c5,
- MementoRibbonTabSelected2007 cache)
+ MementoRibbonTabSelected2007? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9152,7 +9147,7 @@ protected virtual void DrawRibbonTabSelectedBottom2007(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabSelectedBottomDraw2007(Rectangle rect,
- MementoRibbonTabSelected2007 cache,
+ MementoRibbonTabSelected2007? cache,
Graphics? g)
{
// Fill in the bottom two lines that the 'FillPath' above missed
@@ -9536,7 +9531,7 @@ protected virtual void DrawRibbonTabSelectedBottomDraw2010(Rectangle rect,
g.DrawLine(cache.CenterPen, rect.Left + 2, rect.Top + 1, rect.Right - 3, rect.Top + 1);
g.DrawLine(cache.CenterPen, rect.Left + 1, rect.Top, rect.Right - 2, rect.Top);
- using AntiAlias aa = new AntiAlias(g);
+ using var aa = new AntiAlias(g);
// Draw shadow lines on the outside of the left and right edges
g.DrawLine(_mediumShadowPen, rect.Left, rect.Top + 2, rect.Left, rect.Bottom - 4);
g.DrawLine(_mediumShadowPen, rect.Right - 1, rect.Top + 2, rect.Right - 1, rect.Bottom - 4);
@@ -9545,13 +9540,13 @@ protected virtual void DrawRibbonTabSelectedBottomDraw2010(Rectangle rect,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonTabContextSelected(PaletteRibbonShape shape,
+ protected virtual IDisposable? DrawRibbonTabContextSelected(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
VisualOrientation orientation,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -9640,7 +9635,7 @@ protected virtual IDisposable DrawRibbonTabContextSelected(PaletteRibbonShape sh
///
protected virtual void DrawRibbonTabContextSelectedTop(Rectangle rect,
Color c2,
- MementoRibbonTabContextSelected cache)
+ MementoRibbonTabContextSelected? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9669,7 +9664,7 @@ protected virtual void DrawRibbonTabContextSelectedTop(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabContextSelectedTopDraw(Rectangle rect,
- MementoRibbonTabContextSelected cache,
+ MementoRibbonTabContextSelected? cache,
Graphics? g)
{
g.DrawLine(Pens.White, rect.Left + 2, rect.Top + 3, rect.Right - 3, rect.Top + 3);
@@ -9697,7 +9692,7 @@ protected virtual void DrawRibbonTabContextSelectedTopDraw(Rectangle rect,
///
protected virtual void DrawRibbonTabContextSelectedLeft(Rectangle rect,
Color c2,
- MementoRibbonTabContextSelected cache)
+ MementoRibbonTabContextSelected? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9726,7 +9721,7 @@ protected virtual void DrawRibbonTabContextSelectedLeft(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabContextSelectedLeftDraw(Rectangle rect,
- MementoRibbonTabContextSelected cache,
+ MementoRibbonTabContextSelected? cache,
Graphics? g)
{
g.DrawLine(Pens.White, rect.Left + 3, rect.Bottom - 3, rect.Left + 3, rect.Top + 2);
@@ -9754,7 +9749,7 @@ protected virtual void DrawRibbonTabContextSelectedLeftDraw(Rectangle rect,
///
protected virtual void DrawRibbonTabContextSelectedRight(Rectangle rect,
Color c2,
- MementoRibbonTabContextSelected cache)
+ MementoRibbonTabContextSelected? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9783,7 +9778,7 @@ protected virtual void DrawRibbonTabContextSelectedRight(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabContextSelectedRightDraw(Rectangle rect,
- MementoRibbonTabContextSelected cache,
+ MementoRibbonTabContextSelected? cache,
Graphics? g)
{
g.DrawLine(Pens.White, rect.Right - 4, rect.Bottom - 3, rect.Right - 4, rect.Top + 2);
@@ -9811,7 +9806,7 @@ protected virtual void DrawRibbonTabContextSelectedRightDraw(Rectangle rect,
///
protected virtual void DrawRibbonTabContextSelectedBottom(Rectangle rect,
Color c2,
- MementoRibbonTabContextSelected cache)
+ MementoRibbonTabContextSelected? cache)
{
GraphicsPath outsidePath = new GraphicsPath();
@@ -9840,7 +9835,7 @@ protected virtual void DrawRibbonTabContextSelectedBottom(Rectangle rect,
/// Internal rendering method.
///
protected virtual void DrawRibbonTabContextSelectedBottomDraw(Rectangle rect,
- MementoRibbonTabContextSelected cache,
+ MementoRibbonTabContextSelected? cache,
Graphics? g)
{
g.DrawLine(Pens.White, rect.Left + 2, rect.Bottom - 4, rect.Right - 3, rect.Bottom - 4);
@@ -9928,7 +9923,7 @@ protected virtual IDisposable DrawRibbonTabHighlight(PaletteRibbonShape shape,
}
// First of all draw as selected
- cache.SelectedMemento = (MementoRibbonTabSelected2007)DrawRibbonTabSelected2007(context, rect, PaletteState.CheckedNormal, palette, orientation, cache.SelectedMemento);
+ cache.SelectedMemento = DrawRibbonTabSelected2007(context, rect, PaletteState.CheckedNormal, palette, orientation, cache.SelectedMemento) as MementoRibbonTabSelected2007;
switch (orientation)
{
@@ -10149,11 +10144,11 @@ protected virtual void DrawRibbonTabHighlightBottomDraw(Rectangle rect,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonTabContext(RenderContext context,
+ protected virtual IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -10222,13 +10217,13 @@ protected virtual IDisposable DrawRibbonTabContext(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonAppButton(PaletteRibbonShape shape,
+ protected virtual IDisposable? DrawRibbonAppButton(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
bool trackBorderAsPressed,
- IDisposable memento)
+ IDisposable? memento)
{
// Reduce the area of the actual button as the extra space is used for shadow
rect.Width -= 3;
@@ -10305,7 +10300,7 @@ protected virtual IDisposable DrawRibbonAppButton(PaletteRibbonShape shape,
/// Internal rendering method.
///
protected virtual void DrawRibbonAppButtonBorder1(Graphics? g,
- MementoRibbonAppButton memento)
+ MementoRibbonAppButton? memento)
{
g.FillEllipse(_buttonBorder1Brush, memento.BorderShadow1);
g.FillEllipse(_buttonBorder2Brush, memento.BorderShadow2);
@@ -10315,7 +10310,7 @@ protected virtual void DrawRibbonAppButtonBorder1(Graphics? g,
/// Internal rendering method.
///
protected virtual void DrawRibbonAppButtonUpperHalf(Graphics? g,
- MementoRibbonAppButton memento,
+ MementoRibbonAppButton? memento,
PaletteState state,
Color topDark,
Color bottomDark,
@@ -10372,7 +10367,7 @@ protected virtual void DrawRibbonAppButtonUpperHalf(Graphics? g,
/// Internal rendering method.
///
protected virtual void DrawRibbonAppButtonLowerHalf(Graphics? g,
- MementoRibbonAppButton memento,
+ MementoRibbonAppButton? memento,
PaletteState state,
Color bottomDark,
Color bottomLight,
@@ -10398,7 +10393,7 @@ protected virtual void DrawRibbonAppButtonLowerHalf(Graphics? g,
/// Internal rendering method.
///
protected virtual void DrawRibbonAppButtonGlowCenter(Graphics? g,
- MementoRibbonAppButton memento,
+ MementoRibbonAppButton? memento,
PaletteState state,
Color topLight,
Color bottomLight)
@@ -10434,7 +10429,7 @@ protected virtual void DrawRibbonAppButtonGlowCenter(Graphics? g,
/// Internal rendering method.
///
protected virtual void DrawRibbonAppButtonGlowUpperBottom(Graphics? g,
- MementoRibbonAppButton memento,
+ MementoRibbonAppButton? memento,
PaletteState state,
Color bottomLight,
Color bottomMedium,
@@ -10477,7 +10472,7 @@ protected virtual void DrawRibbonAppButtonGlowUpperBottom(Graphics? g,
/// Internal rendering method.
///
protected virtual void DrawRibbonAppButtonBorder2(Graphics? g,
- MementoRibbonAppButton memento,
+ MementoRibbonAppButton? memento,
PaletteState state,
Color bottomLight,
bool trackBorderAsPressed)
@@ -10546,14 +10541,16 @@ protected virtual void DrawRibbonAppButtonBorder2(Graphics? g,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonAppTab(PaletteRibbonShape shape,
+ protected virtual IDisposable? DrawRibbonAppTab(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
- Color baseColor1,
- Color baseColor2,
- IDisposable memento)
+ IPaletteRibbonFileAppTab palette,
+ IDisposable? memento)
{
+ Color topColor = palette.GetRibbonFileAppTabTopColor(state);
+ Color bottomColor = palette.GetRibbonFileAppTabBottomColor(state);
+
if (rect is { Width: > 0, Height: > 0 })
{
var generate = true;
@@ -10563,13 +10560,13 @@ protected virtual IDisposable DrawRibbonAppTab(PaletteRibbonShape shape,
if (memento is MementoRibbonAppTab tab)
{
cache = tab;
- generate = !cache.UseCachedValues(rect, baseColor1, baseColor2);
+ generate = !cache.UseCachedValues(rect, topColor, bottomColor);
}
else
{
memento?.Dispose();
- cache = new MementoRibbonAppTab(rect, baseColor1, baseColor2);
+ cache = new MementoRibbonAppTab(rect, topColor, bottomColor);
memento = cache;
}
@@ -10581,46 +10578,50 @@ protected virtual IDisposable DrawRibbonAppTab(PaletteRibbonShape shape,
// Create common paths to all the app tab states
cache.GeneratePaths(rect, state);
- cache.BorderPen = new Pen(baseColor1);
+ cache.BorderPen = new Pen(topColor);
// Create state specific colors/brushes/pens
switch (state)
{
+ case PaletteState.Disabled:
+ topColor = ControlPaint.DarkDark(topColor);
+ bottomColor = ControlPaint.DarkDark(bottomColor);
+ goto case PaletteState.Normal; // drop through
case PaletteState.Normal:
- cache.BorderBrush = new SolidBrush(CommonHelper.MergeColors(baseColor1, 0.2f, baseColor2, 0.8f));
+ cache.BorderBrush = new SolidBrush(CommonHelper.MergeColors(topColor, 0.2f, bottomColor, 0.8f));
cache.InsideFillBrush = new LinearGradientBrush(new RectangleF(rect.X, rect.Y + 1, rect.Width, rect.Height),
- CommonHelper.MergeColors(baseColor1, 0.3f, baseColor2, 0.7f),
- CommonHelper.MergeColors(baseColor1, 0.6f, baseColor2, 0.4f),
+ CommonHelper.MergeColors(topColor, 0.3f, bottomColor, 0.7f),
+ CommonHelper.MergeColors(topColor, 0.6f, bottomColor, 0.4f),
90f);
cache.InsideFillBrush.SetSigmaBellShape(0.33f);
cache.HighlightBrush.CenterColor = Color.FromArgb(64, Color.White);
break;
case PaletteState.Tracking:
- cache.BorderBrush = new SolidBrush(baseColor2);
+ cache.BorderBrush = new SolidBrush(bottomColor);
cache.InsideFillBrush = new LinearGradientBrush(new RectangleF(rect.X, rect.Y + 1, rect.Width, rect.Height),
- CommonHelper.MergeColors(baseColor1, 0.3f, baseColor2, 0.7f),
- CommonHelper.MergeColors(baseColor1, 0.6f, baseColor2, 0.4f),
+ CommonHelper.MergeColors(topColor, 0.3f, bottomColor, 0.7f),
+ CommonHelper.MergeColors(topColor, 0.6f, bottomColor, 0.4f),
90f);
cache.InsideFillBrush.SetSigmaBellShape(0.33f);
cache.HighlightBrush.CenterColor = Color.FromArgb(100, Color.White);
break;
case PaletteState.Tracking | PaletteState.FocusOverride:
- cache.BorderBrush = new SolidBrush(ControlPaint.LightLight(baseColor2));
+ cache.BorderBrush = new SolidBrush(ControlPaint.LightLight(bottomColor));
cache.InsideFillBrush = new LinearGradientBrush(new RectangleF(rect.X, rect.Y + 1, rect.Width, rect.Height),
- CommonHelper.MergeColors(baseColor1, 0.3f, baseColor2, 0.7f),
- CommonHelper.MergeColors(baseColor1, 0.6f, baseColor2, 0.4f),
+ CommonHelper.MergeColors(topColor, 0.3f, bottomColor, 0.7f),
+ CommonHelper.MergeColors(topColor, 0.6f, bottomColor, 0.4f),
90f);
cache.InsideFillBrush.SetSigmaBellShape(0.33f);
- cache.HighlightBrush.CenterColor = ControlPaint.LightLight(baseColor2);
+ cache.HighlightBrush.CenterColor = ControlPaint.LightLight(bottomColor);
break;
case PaletteState.Pressed:
- cache.BorderBrush = new SolidBrush(CommonHelper.MergeColors(baseColor1, 0.5f, baseColor2, 0.5f));
+ cache.BorderBrush = new SolidBrush(CommonHelper.MergeColors(topColor, 0.5f, bottomColor, 0.5f));
cache.InsideFillBrush = new LinearGradientBrush(new RectangleF(rect.X, rect.Y + 1, rect.Width, rect.Height),
- CommonHelper.MergeColors(baseColor1, 0.3f, baseColor2, 0.7f),
- CommonHelper.MergeColors(baseColor1, 0.75f, baseColor2, 0.25f),
+ CommonHelper.MergeColors(topColor, 0.3f, bottomColor, 0.7f),
+ CommonHelper.MergeColors(topColor, 0.75f, bottomColor, 0.25f),
90f);
cache.InsideFillBrush.SetSigmaBellShape(0f);
@@ -10629,21 +10630,20 @@ protected virtual IDisposable DrawRibbonAppTab(PaletteRibbonShape shape,
}
}
+ using var aa = new AntiAlias(context.Graphics);
// Fill the entire tab area and then add a border around the edge
context.Graphics.FillPath(cache.BorderBrush, cache.BorderFillPath);
// Draw the outside border
- using (AntiAlias aa = new AntiAlias(context.Graphics))
- {
- context.Graphics.DrawPath(cache.BorderPen, cache.BorderPath);
- }
+ context.Graphics.DrawPath(cache.BorderPen, cache.BorderPath);
// Fill inside area
context.Graphics.FillPath(cache.InsideFillBrush, cache.InsideFillPath);
- // Draw highlight over bottom half
- using (Clipping clip = new Clipping(context.Graphics, cache.InsideFillPath))
+ if (state != PaletteState.Disabled)
{
+ // Draw highlight over bottom half
+ using var clip = new Clipping(context.Graphics, cache.InsideFillPath);
context.Graphics.FillPath(cache.HighlightBrush, cache.HighlightPath);
}
}
@@ -10754,7 +10754,7 @@ protected virtual IDisposable DrawRibbonGroupNormal(bool showingInPopup,
Color c2 = palette.GetRibbonBackColor2(state);
var generate = true;
- MementoRibbonGroupNormalBorder? cache;
+ MementoRibbonGroupNormalBorder cache;
// Access a cache instance and decide if cache resources need generating
if (memento is MementoRibbonGroupNormalBorder border)
@@ -10941,11 +10941,11 @@ protected virtual IDisposable DrawRibbonGroupNormalBorderSep(bool showingInPopup
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonGroupNormalTitle(RenderContext context,
+ protected virtual IDisposable? DrawRibbonGroupNormalTitle(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11001,11 +11001,11 @@ protected virtual IDisposable DrawRibbonGroupNormalTitle(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonGroupCollapsedBorder(RenderContext context,
+ protected virtual IDisposable? DrawRibbonGroupCollapsedBorder(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11085,11 +11085,11 @@ protected virtual IDisposable DrawRibbonGroupCollapsedBorder(RenderContext conte
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonGroupCollapsedFrameBorder(RenderContext context,
+ protected virtual IDisposable? DrawRibbonGroupCollapsedFrameBorder(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11151,11 +11151,11 @@ protected virtual IDisposable DrawRibbonGroupCollapsedFrameBorder(RenderContext
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonGroupGradientOne(RenderContext context,
+ protected virtual IDisposable? DrawRibbonGroupGradientOne(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11202,12 +11202,12 @@ protected virtual IDisposable DrawRibbonGroupGradientOne(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonGroupGradientTwo(RenderContext context,
+ protected virtual IDisposable? DrawRibbonGroupGradientTwo(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
float percent,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11264,11 +11264,11 @@ protected virtual IDisposable DrawRibbonGroupGradientTwo(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonQATMinibarSingle(RenderContext context,
+ protected virtual IDisposable? DrawRibbonQATMinibarSingle(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11380,11 +11380,11 @@ protected virtual IDisposable DrawRibbonQATMinibarSingle(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonQATMinibarDouble(RenderContext context,
+ protected virtual IDisposable? DrawRibbonQATMinibarDouble(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11492,11 +11492,11 @@ protected virtual IDisposable DrawRibbonQATMinibarDouble(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonLinear(RenderContext context,
+ protected virtual IDisposable? DrawRibbonLinear(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11538,11 +11538,11 @@ protected virtual IDisposable DrawRibbonLinear(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonLinearBorder(RenderContext context,
+ protected virtual IDisposable? DrawRibbonLinearBorder(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11576,7 +11576,7 @@ protected virtual IDisposable DrawRibbonLinearBorder(RenderContext context,
cache.LinearPen = new Pen(cache.LinearBrush);
// Create the rounded complete border
- GraphicsPath borderPath = new GraphicsPath();
+ var borderPath = new GraphicsPath();
borderPath.AddLine(rect.Left + 2, rect.Top, rect.Right - 3, rect.Top);
borderPath.AddLine(rect.Right - 3, rect.Top, rect.Right - 1, rect.Top + 2);
borderPath.AddLine(rect.Right - 1, rect.Top + 2, rect.Right - 1, rect.Bottom - 3);
@@ -11586,7 +11586,6 @@ protected virtual IDisposable DrawRibbonLinearBorder(RenderContext context,
borderPath.AddLine(rect.Left, rect.Bottom - 3, rect.Left, rect.Top + 2);
borderPath.AddLine(rect.Left, rect.Top + 2, rect.Left + 2, rect.Top);
cache.BorderPath = borderPath;
-
}
context.Graphics.DrawPath(cache.LinearPen, cache.BorderPath);
@@ -11598,11 +11597,11 @@ protected virtual IDisposable DrawRibbonLinearBorder(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonAppMenuInner(RenderContext context,
+ protected virtual IDisposable? DrawRibbonAppMenuInner(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11648,11 +11647,11 @@ protected virtual IDisposable DrawRibbonAppMenuInner(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonAppMenuOuter(RenderContext context,
+ protected virtual IDisposable? DrawRibbonAppMenuOuter(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11709,11 +11708,11 @@ protected virtual IDisposable DrawRibbonAppMenuOuter(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonQATFullbarRound(RenderContext context,
+ protected virtual IDisposable? DrawRibbonQATFullbarRound(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
// We never draw the top line
rect.Y++;
@@ -11795,11 +11794,11 @@ protected virtual IDisposable DrawRibbonQATFullbarRound(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonQATFullbarSquare(RenderContext context,
+ protected virtual IDisposable? DrawRibbonQATFullbarSquare(RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -11852,12 +11851,12 @@ protected virtual IDisposable DrawRibbonQATFullbarSquare(RenderContext context,
///
/// Internal rendering method.
///
- protected virtual IDisposable DrawRibbonQATOverflow(PaletteRibbonShape shape,
+ protected virtual IDisposable? DrawRibbonQATOverflow(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
IPaletteRibbonBack palette,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs
index 1eb2be124..735374fce 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio.cs
@@ -1,20 +1,20 @@
#region BSD License
/*
- *
* New BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
- * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2024 - 2024. All rights reserved.
*/
#endregion
namespace Krypton.Toolkit
{
+ ///
+ ///
+ ///
public class RenderVisualStudio : RenderMicrosoft365
{
#region Static Variables
- private static readonly float BORDER_PERCENT = 0.6f;
-
- private static readonly float WHITE_PERCENT = 0.4f;
+ private const float BORDER_PERCENT = 0.6f;
+ private const float WHITE_PERCENT = 0.4f;
#endregion
#region Constructor
@@ -43,11 +43,11 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
Debug.Assert(paletteBack != null);
// Get the first border color, and then lighten it by merging with white
- Color borderColour = paletteBack.GetBackColor1(state), lightColour = CommonHelper.MergeColors(borderColour, BORDER_PERCENT, Color.White, WHITE_PERCENT);
+ Color borderColour = paletteBack!.GetBackColor1(state), lightColour = CommonHelper.MergeColors(borderColour, BORDER_PERCENT, Color.White, WHITE_PERCENT);
// Draw inside of the border edge in a lighter version of the border
using var drawBrush = new SolidBrush(lightColour);
- context.Graphics.FillRectangle(drawBrush, displayRect);
+ context!.Graphics.FillRectangle(drawBrush, displayRect);
}
#endregion
@@ -81,7 +81,7 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context, Rectangle rect, IPaletteRibbonGeneral paletteGeneral, IPaletteRibbonBack paletteBack, IDisposable memento)
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context, Rectangle rect, IPaletteRibbonGeneral paletteGeneral, IPaletteRibbonBack paletteBack, IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -142,13 +142,15 @@ protected override IDisposable DrawRibbonTabContext(RenderContext context, Recta
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, RenderContext context, Rectangle rect, PaletteState state, Color baseColor1, Color baseColor2, IDisposable memento)
+ public override IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape, RenderContext context,
+ Rectangle rect, PaletteState state, IPaletteRibbonFileAppTab palette, IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
+ Color topColor = palette.GetRibbonFileAppTabTopColor(state);
+ Color bottomColor = palette.GetRibbonFileAppTabBottomColor(state);
var generate = true;
MementoRibbonAppTab2013 cache;
@@ -156,13 +158,13 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, R
if (memento is MementoRibbonAppTab2013 tab2013)
{
cache = tab2013;
- generate = !cache.UseCachedValues(rect, baseColor1);
+ generate = !cache.UseCachedValues(rect, topColor);
}
else
{
memento?.Dispose();
- cache = new MementoRibbonAppTab2013(rect, baseColor1);
+ cache = new MementoRibbonAppTab2013(rect, topColor);
memento = cache;
}
@@ -174,18 +176,15 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, R
// Create common paths to all the app tab states
cache.GeneratePaths(rect, state);
- //cache.borderPen = new Pen(baseColor1);
// Create state specific colors/brushes/pens
cache.InsideFillBrush = state switch
{
- PaletteState.Normal =>
- //cache.borderBrush = new SolidBrush(baseColor1);
- new SolidBrush(baseColor1),
- PaletteState.Tracking => new SolidBrush(baseColor2),
- PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(
- ControlPaint.LightLight(baseColor2)),
- PaletteState.Pressed => new SolidBrush(baseColor2),
+ PaletteState.Normal => new SolidBrush(topColor),
+ PaletteState.Disabled => new SolidBrush(ControlPaint.DarkDark(topColor)),
+ PaletteState.Tracking => new SolidBrush(bottomColor),
+ PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(ControlPaint.LightLight(bottomColor)),
+ PaletteState.Pressed => new SolidBrush(bottomColor),
_ => cache.InsideFillBrush
};
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs
index 247f4ffb8..854e4f288 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2007.cs
@@ -107,11 +107,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs
index f4e03c3eb..b1551a32f 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2010.cs
@@ -111,11 +111,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs
index 8a020149a..3bbbdfc3a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010With2013.cs
@@ -2,7 +2,6 @@
/*
* BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
* Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2023 - 2024. All rights reserved.
- *
*/
#endregion
@@ -14,8 +13,8 @@ namespace Krypton.Toolkit
public class RenderVisualStudio2010With2013 : RenderOffice2010
{
#region Static Fields
- private static readonly float BORDER_PERCENT = 0.6f;
- private static readonly float WHITE_PERCENT = 0.4f;
+ private const float BORDER_PERCENT = 0.6f;
+ private const float WHITE_PERCENT = 0.4f;
//private static readonly Blend _ribbonGroup5Blend;
//private static readonly Blend _ribbonGroup6Blend;
//private static readonly Blend _ribbonGroup7Blend;
@@ -57,7 +56,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
Debug.Assert(paletteBack != null);
// Get the first border color
- Color borderColor = paletteBack.GetBackColor1(state);
+ Color borderColor = paletteBack!.GetBackColor1(state);
// We want to lighten it by merging with white
Color lightColor = CommonHelper.MergeColors(borderColor, BORDER_PERCENT,
@@ -65,7 +64,7 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
// Draw inside of the border edge in a lighter version of the border
using var drawBrush = new SolidBrush(lightColor);
- context.Graphics.FillRectangle(drawBrush, displayRect);
+ context!.Graphics.FillRectangle(drawBrush, displayRect);
}
#endregion
@@ -104,11 +103,11 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context,
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context,
Rectangle rect,
IPaletteRibbonGeneral paletteGeneral,
IPaletteRibbonBack paletteBack,
- IDisposable memento)
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -168,19 +167,19 @@ protected override IDisposable DrawRibbonTabContext(RenderContext context,
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
+ public override IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape,
RenderContext context,
Rectangle rect,
PaletteState state,
- Color baseColor1,
- Color baseColor2,
- IDisposable memento)
+ IPaletteRibbonFileAppTab palette,
+ IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
+ Color topColor = palette.GetRibbonFileAppTabTopColor(state);
+ Color bottomColor = palette.GetRibbonFileAppTabBottomColor(state);
var generate = true;
MementoRibbonAppTab2013 cache;
@@ -188,13 +187,13 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
if (memento is MementoRibbonAppTab2013 tab2013)
{
cache = tab2013;
- generate = !cache.UseCachedValues(rect, baseColor1);
+ generate = !cache.UseCachedValues(rect, topColor);
}
else
{
memento?.Dispose();
- cache = new MementoRibbonAppTab2013(rect, baseColor1);
+ cache = new MementoRibbonAppTab2013(rect, topColor);
memento = cache;
}
@@ -206,18 +205,15 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape,
// Create common paths to all the app tab states
cache.GeneratePaths(rect, state);
- //cache.borderPen = new Pen(baseColor1);
// Create state specific colors/brushes/pens
cache.InsideFillBrush = state switch
{
- PaletteState.Normal =>
- //cache.borderBrush = new SolidBrush(baseColor1);
- new SolidBrush(baseColor1),
- PaletteState.Tracking => new SolidBrush(baseColor2),
- PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(
- ControlPaint.LightLight(baseColor2)),
- PaletteState.Pressed => new SolidBrush(baseColor2),
+ PaletteState.Normal => new SolidBrush(topColor),
+ PaletteState.Disabled => new SolidBrush(ControlPaint.DarkDark(topColor)),
+ PaletteState.Tracking => new SolidBrush(bottomColor),
+ PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(ControlPaint.LightLight(bottomColor)),
+ PaletteState.Pressed => new SolidBrush(bottomColor),
_ => cache.InsideFillBrush
};
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs
index d3f92202b..3ae7081d0 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Rendering/RenderVisualStudio2010WithMicrosoft365.cs
@@ -1,8 +1,7 @@
#region BSD License
/*
* BSD 3-Clause License (https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/LICENSE)
- * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2017 - 2024. All rights reserved.
- *
+ * Modifications by Peter Wagner(aka Wagnerp) & Simon Coghlan(aka Smurf-IV), et al. 2023 - 2024. All rights reserved.
*/
#endregion
@@ -15,15 +14,14 @@ namespace Krypton.Toolkit
public class RenderVisualStudio2010WithMicrosoft365 : RenderOffice2010
{
#region Static Variables
- private static readonly float BORDER_PERCENT = 0.6f;
-
- private static readonly float WHITE_PERCENT = 0.4f;
+ private const float BORDER_PERCENT = 0.6f;
+ private const float WHITE_PERCENT = 0.4f;
#endregion
#region Constructor
static RenderVisualStudio2010WithMicrosoft365()
{
-
+ // ??
}
#endregion
@@ -46,11 +44,11 @@ public override void DrawRibbonClusterEdge(PaletteRibbonShape shape,
Debug.Assert(paletteBack != null);
// Get the first border color, and then lighten it by merging with white
- Color borderColour = paletteBack.GetBackColor1(state), lightColour = CommonHelper.MergeColors(borderColour, BORDER_PERCENT, Color.White, WHITE_PERCENT);
+ Color borderColour = paletteBack!.GetBackColor1(state), lightColour = CommonHelper.MergeColors(borderColour, BORDER_PERCENT, Color.White, WHITE_PERCENT);
// Draw inside of the border edge in a lighter version of the border
using var drawBrush = new SolidBrush(lightColour);
- context.Graphics.FillRectangle(drawBrush, displayRect);
+ context!.Graphics.FillRectangle(drawBrush, displayRect);
}
#endregion
@@ -84,7 +82,7 @@ public override ToolStripRenderer RenderToolStrip([DisallowNull] PaletteBase col
///
/// Internal rendering method.
///
- protected override IDisposable DrawRibbonTabContext(RenderContext context, Rectangle rect, IPaletteRibbonGeneral paletteGeneral, IPaletteRibbonBack paletteBack, IDisposable memento)
+ protected override IDisposable? DrawRibbonTabContext(RenderContext context, Rectangle rect, IPaletteRibbonGeneral paletteGeneral, IPaletteRibbonBack paletteBack, IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
@@ -145,13 +143,15 @@ protected override IDisposable DrawRibbonTabContext(RenderContext context, Recta
/// Rendering context.
/// Target rectangle.
/// State associated with rendering.
- /// Base color1 used for drawing the ribbon tab.
- /// Base color2 used for drawing the ribbon tab.
+ /// Palette used for sourcing settings.
/// Cached values to use when drawing.
- public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, RenderContext context, Rectangle rect, PaletteState state, Color baseColor1, Color baseColor2, IDisposable memento)
+ public override IDisposable? DrawRibbonFileApplicationTab(PaletteRibbonShape shape, RenderContext context,
+ Rectangle rect, PaletteState state, IPaletteRibbonFileAppTab palette, IDisposable? memento)
{
if (rect is { Width: > 0, Height: > 0 })
{
+ Color topColor = palette.GetRibbonFileAppTabTopColor(state);
+ Color bottomColor = palette.GetRibbonFileAppTabBottomColor(state);
var generate = true;
MementoRibbonAppTab2013 cache;
@@ -159,13 +159,13 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, R
if (memento is MementoRibbonAppTab2013 tab2013)
{
cache = tab2013;
- generate = !cache.UseCachedValues(rect, baseColor1);
+ generate = !cache.UseCachedValues(rect, topColor);
}
else
{
memento?.Dispose();
- cache = new MementoRibbonAppTab2013(rect, baseColor1);
+ cache = new MementoRibbonAppTab2013(rect, topColor);
memento = cache;
}
@@ -177,18 +177,15 @@ public override IDisposable DrawRibbonApplicationTab(PaletteRibbonShape shape, R
// Create common paths to all the app tab states
cache.GeneratePaths(rect, state);
- //cache.borderPen = new Pen(baseColor1);
// Create state specific colors/brushes/pens
cache.InsideFillBrush = state switch
{
- PaletteState.Normal =>
- //cache.borderBrush = new SolidBrush(baseColor1);
- new SolidBrush(baseColor1),
- PaletteState.Tracking => new SolidBrush(baseColor2),
- PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(
- ControlPaint.LightLight(baseColor2)),
- PaletteState.Pressed => new SolidBrush(baseColor2),
+ PaletteState.Normal => new SolidBrush(topColor),
+ PaletteState.Disabled => new SolidBrush(ControlPaint.DarkDark(topColor)),
+ PaletteState.Tracking => new SolidBrush(bottomColor),
+ PaletteState.Tracking | PaletteState.FocusOverride => new SolidBrush(ControlPaint.LightLight(bottomColor)),
+ PaletteState.Pressed => new SolidBrush(bottomColor),
_ => cache.InsideFillBrush
};
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Utilities/Interop.HRESULT.cs b/Source/Krypton Components/Krypton.Toolkit/Utilities/Interop.HRESULT.cs
index 9ad19462b..e4cf801ba 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Utilities/Interop.HRESULT.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Utilities/Interop.HRESULT.cs
@@ -6,7 +6,7 @@ namespace System.Runtime.InteropServices
internal static partial class Interop
{
// https://msdn.microsoft.com/en-us/library/cc231198.aspx
- internal enum HRESULT : int
+ internal enum HRESULT
{
S_OK = 0,
S_FALSE = 1,
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs
index 87ed17a87..3917d1c90 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs
@@ -126,7 +126,7 @@ public Image? Image
[Category(@"Visuals")]
[Description(@"Label image transparent color.")]
[RefreshProperties(RefreshProperties.All)]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _transparent;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/ColorButtonValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/ColorButtonValues.cs
index e8bf032d1..9f76c239c 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Values/ColorButtonValues.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/ColorButtonValues.cs
@@ -123,7 +123,7 @@ public Image? Image
[Category(@"Visuals")]
[Description(@"Label image transparent color.")]
[RefreshProperties(RefreshProperties.All)]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _transparent;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs
index b89850520..9ec97a59f 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs
@@ -78,7 +78,7 @@ public bool DisplayUACShield
[Category("Visuals")]
[Description("Image transparent color.")]
[RefreshProperties(RefreshProperties.All)]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _transparencyKey;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs b/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs
index 4aaaa1521..b5b7209d4 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/HeaderValuesBase.cs
@@ -136,7 +136,7 @@ public Image? Image
[Category(@"Visuals")]
[Description(@"Heading image transparent color.")]
[RefreshProperties(RefreshProperties.All)]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _transparent;
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/LabelValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/LabelValues.cs
index 79576feed..d85c383c9 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Values/LabelValues.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/LabelValues.cs
@@ -114,7 +114,7 @@ public Image? Image
[Category(@"Visuals")]
[Description(@"Label image transparent color.")]
[RefreshProperties(RefreshProperties.All)]
- [KryptonDefaultColor()]
+ [KryptonDefaultColor]
public Color ImageTransparentColor
{
get => _transparent;
diff --git a/Source/Krypton Components/Krypton.Workspace/General/Definitions.cs b/Source/Krypton Components/Krypton.Workspace/General/Definitions.cs
index 79aae085a..d2e592b75 100644
--- a/Source/Krypton Components/Krypton.Workspace/General/Definitions.cs
+++ b/Source/Krypton Components/Krypton.Workspace/General/Definitions.cs
@@ -16,7 +16,7 @@ namespace Krypton.Workspace
///
/// Specifies the compacting operations performed during layout.
///
- [Flags()]
+ [Flags]
public enum CompactFlags
{
///