diff --git a/Documents/Help/Changelog.md b/Documents/Help/Changelog.md
index 186963ee7..0bd5d15d6 100644
--- a/Documents/Help/Changelog.md
+++ b/Documents/Help/Changelog.md
@@ -5,6 +5,7 @@
## 2024-11-xx - Build 2411 - November 2024
* Resolved [#1197](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1197), `KryptonTaskDialog` Footer Images
* Resolved [#1189](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1189), The Context and Next/Pervious buttons of the `KryptonDockableNavigator` cannot be used
+* Implement [#1187](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1187), Bring over the `KryptonCommandLinkButtons`
* Resolved [#1176](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1176), KryptonProgressBar: small values escape drawing area
* Resolved [#1169](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1169), Button Spec Krypton Context Menu (Canary)
* Implemented [#1166](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1166), Use a struct to contain `KryptonMessageBox` data
diff --git a/README.md b/README.md
index ab354015c..205562ff3 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,9 @@
* [Discord Server](#discord-server)
* [Version History](#version-history)
* [Breaking Changes](#breaking-changes)
+ * [V90.## (2024-11-xx - Build 2411 - November 2024)](v90-24-11-xx--build-2411---november-2024)
+ * [Support for .NET 7](#support-for-net-7)
+ * [`KryptonButton` Properties](#kryptonbutton-properties)
* [V80.## (2023-11-14 - Build 2311 - November 2023)](#v80-2023-11-14---build-2311---november-2023)
* [Support for .NET Core 3.1 and .NET 5](#support-for-net-core-31-and-net-5)
* [KryptonMessageBoxButtons](#kryptonmessageboxbuttons)
@@ -172,6 +175,15 @@ Follow the links to see the different objects and layouts that this framework al
# Breaking Changes
+## V90.## (2024-11-xx - Build 2411 - November 2024)
+There are list of changes that have occurred during the development of the V90.## version
+
+### Support for .NET 7
+As of V90.##, support for .NET 7 has been removed due to their release cadences.
+
+### `KryptonButton` Properties
+Some properties previously found in the root such as, `ShowSplitOption`, `UseAsADialogButton`, `UseAsUACElevationButton` and `UACShieldIconSize` are now located in the `Values` section.
+
## V80.## (2023-11-14 - Build 2311 - November 2023)
There are list of changes that have occurred during the development of the V80.## version
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs
new file mode 100644
index 000000000..6ffba35e6
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonAlternateCommandLinkButton.cs
@@ -0,0 +1,143 @@
+#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. 2023 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ ///
+ /// A KryptonCommandLink button.
+ /// Boilerplate code from (https://blogs.msdn.microsoft.com/knom/2007/03/12/vista-command-link-control-with-c-windows-forms/)
+ ///
+ /// If used on Windows Vista or higher, the button will be a CommandLink: Basically the same functionality as a Button but looks different.
+ [DesignerCategory("Code")]
+ [DisplayName("Krypton Command Link")]
+ [Description("A Krypton Command Link Button.")]
+ [ToolboxItem(true)]
+ [ToolboxBitmap(typeof(KryptonAlternateCommandLinkButton), @"ToolboxBitmaps.KryptonCommandLinkButton.bmp")]
+ public class KryptonAlternateCommandLinkButton : KryptonButton
+ {
+ #region Static Fields
+
+ private const int BS_COMMANDLINK = 0x0000000E;
+
+ private const int BCM_SETNOTE = 0x00001609;
+
+ private const int BCM_GETNOTE = 0x0000160A;
+
+ private const int BCM_GETNOTELENGTH = 0x0000160B;
+
+ private const int BCM_SETSHIELD = 0x0000160C;
+
+ #endregion
+
+ #region Instance Fields
+
+ private bool _showUACShield;
+
+ #endregion
+
+ #region Public
+
+ ///
+ /// Gets or sets the shield icon visibility of the command link.
+ ///
+ [Category("Command Link"), Description("Gets or sets the shield icon visibility of the command link."), DefaultValue(false)]
+ public bool ShowUACShield
+ {
+ get => _showUACShield;
+
+ set
+ {
+ _showUACShield = value;
+
+ SendMessage(new HandleRef(this, Handle), BCM_SETSHIELD, IntPtr.Zero, _showUACShield);
+ }
+ }
+
+ ///
+ /// Gets or sets the note text of the command link.
+ ///
+ [Category("Command Link"), Description("Gets or sets the note text of the command link."), DefaultValue("")]
+ public string NoteText
+ {
+ get => GetNoteText();
+
+ set => SetNoteText(value);
+ }
+ #endregion
+
+ #region WIN32 Calls
+
+ [DllImport(Libraries.User32, CharSet = CharSet.Unicode)]
+ static extern int SendMessage(HandleRef hWnd, uint msg, ref int wParam, StringBuilder lParam);
+
+ [DllImport(Libraries.User32, CharSet = CharSet.Unicode)]
+ static extern int SendMessage(HandleRef hWnd, uint msg, IntPtr wParam, string lParam);
+
+ [DllImport(Libraries.User32, CharSet = CharSet.Unicode)]
+ static extern int SendMessage(HandleRef hWnd, uint msg, IntPtr wParam, bool lParam);
+
+ [DllImport(Libraries.User32, CharSet = CharSet.Unicode)]
+ static extern int SendMessage(HandleRef hWnd, uint msg, IntPtr wParam, IntPtr lParam);
+
+ #endregion
+
+ #region Identity
+
+ /// Initializes a new instance of the class.
+ public KryptonAlternateCommandLinkButton()
+ {
+
+ }
+
+ #endregion
+
+ #region Protected
+
+ ///
+ protected override Size DefaultSize => new Size(160, 60);
+
+ ///
+ protected override CreateParams CreateParams
+ {
+ get
+ {
+ CreateParams createParams = base.CreateParams;
+
+ createParams.Style |= BS_COMMANDLINK;
+
+ return createParams;
+ }
+ }
+
+ #endregion
+
+ #region Implementation
+
+ /// Sets the NoteText to the value of value.
+ /// The desired value of NoteText.
+ private void SetNoteText(string value) => SendMessage(new HandleRef(this, Handle), BCM_SETNOTE, IntPtr.Zero, value);
+
+ ///
+ /// Returns the value of the NoteText.
+ ///
+ /// The value of the NoteText.
+ private string GetNoteText()
+ {
+ int length = SendMessage(new HandleRef(this, Handle), BCM_GETNOTELENGTH, IntPtr.Zero, IntPtr.Zero) + 1;
+
+ StringBuilder stringBuilder = new StringBuilder(length);
+
+ SendMessage(new HandleRef(this, Handle), BCM_GETNOTE, ref length, stringBuilder);
+
+ return stringBuilder.ToString();
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs
index a0f94f3ab..48c9d9a48 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonButton.cs
@@ -45,13 +45,11 @@ public class KryptonButton : VisualSimpleBase, IButtonControl, IContentValues
private readonly PaletteTripleOverride _overrideTracking;
private readonly PaletteTripleOverride _overridePressed;
private IKryptonCommand? _command;
- private bool _useAsDialogButton;
private bool _isDefault;
private bool _useMnemonic;
private bool _wasEnabled;
- private bool _useAsUACElevationButton;
private bool _skipNextOpen;
- private bool _showSplitOption;
+ //private bool _showSplitOption;
//private bool _useOSUACShieldIcon;
private float _cornerRoundingRadius;
private Size _customUACShieldSize;
@@ -135,10 +133,6 @@ public KryptonButton()
// Create the view manager instance
ViewManager = new ViewManager(this, _drawButton);
- _useAsDialogButton = false;
-
- _useAsUACElevationButton = false;
-
_uacShieldIconSize = GlobalStaticValues.DEFAULT_UAC_SHIELD_ICON_SIZE;
//_useOSUACShieldIcon = false;
@@ -148,9 +142,6 @@ public KryptonButton()
// Set `CornerRoundingRadius' to 'GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE' (-1)
CornerRoundingRadius = GlobalStaticValues.PRIMARY_CORNER_ROUNDING_VALUE;
- // Split settings
- _showSplitOption = false;
-
_skipNextOpen = false;
_dropDownRectangle = new Rectangle();
@@ -268,65 +259,7 @@ public ButtonStyle ButtonStyle
private void ResetButtonStyle() => ButtonStyle = ButtonStyle.Standalone;
- [DefaultValue(false),
- Description(@"If set to true, the text will pair up with the equivalent KryptonManager's dialog button text result. (Note: You'll lose any previous text)")]
- public bool UseAsADialogButton
- {
- get => _useAsDialogButton;
- set => _useAsDialogButton = value;
- }
- [DefaultValue(false),
- Description(@"Transforms the button into a UAC elevated button.")]
- public bool UseAsUACElevationButton
- {
- get => _useAsUACElevationButton;
- set
- {
- _useAsUACElevationButton = value;
-
- switch (_uacShieldIconSize)
- {
- //if (_customUACShieldSize.Height > 0 && _customUACShieldSize.Width > 0)
- //{
- // ShowUACShield(value, UACShieldIconSize.Custom, _customUACShieldSize.Width, _customUACShieldSize.Height);
- //}
- //else if (_uacShieldIconSize != UACShieldIconSize.Custom)
- //{
- // ShowUACShield(value, _uacShieldIconSize);
- //}
- case UACShieldIconSize.ExtraSmall:
- ShowUACShield(value, UACShieldIconSize.ExtraSmall);
- break;
- case UACShieldIconSize.Small:
- ShowUACShield(value, UACShieldIconSize.Small);
- break;
- case UACShieldIconSize.Medium:
- ShowUACShield(value, UACShieldIconSize.Medium);
- break;
- case UACShieldIconSize.Large:
- ShowUACShield(value, UACShieldIconSize.Large);
- break;
- case UACShieldIconSize.ExtraLarge:
- ShowUACShield(value, UACShieldIconSize.ExtraLarge);
- break;
- default:
- ShowUACShield(value, UACShieldIconSize.ExtraSmall);
- break;
- }
- }
- }
-
- /*
- [DefaultValue(false), Description(@"Use the operating system UAC shield icon image.")]
- public bool UseOSUACShieldIcon { get => _useOSUACShieldIcon; set { _useOSUACShieldIcon = value; UpdateOSUACShieldIcon(); } }
-
- [DefaultValue(null), Description(@"")]
- public Size CustomUACShieldSize { get => _customUACShieldSize; set { _customUACShieldSize = value; ShowUACShield(_useAsUACElevationButton, UACShieldIconSize.Custom, value.Width, value.Height); } }
- */
-
- [DefaultValue(UACShieldIconSize.ExtraSmall), Description(@"")]
- public UACShieldIconSize UACShieldIconSize { get => _uacShieldIconSize; set { _uacShieldIconSize = value; ShowUACShield(_useAsUACElevationButton, value); } }
///
/// Gets access to the button content.
@@ -543,7 +476,7 @@ public virtual void SetFixedState(PaletteState state)
set => base.ImeMode = value;
}
- /// Gets or sets a value indicating whether [show split option].
+ /*/// Gets or sets a value indicating whether [show split option].
/// true if [show split option]; otherwise, false.
[Category(@"Visuals")]
[DefaultValue(false)]
@@ -563,7 +496,7 @@ public bool ShowSplitOption
Parent?.PerformLayout();
}
}
- }
+ }*/
#endregion
@@ -598,11 +531,12 @@ public Color GetImageTransparentColor(PaletteState state) =>
#region Public Overrides
+ ///
public override Size GetPreferredSize(Size proposedSize)
{
Size preferredSize = base.GetPreferredSize(proposedSize);
- if (_showSplitOption && !string.IsNullOrWhiteSpace(Text) && TextRenderer.MeasureText(Text, Font).Width + DEFAULT_PUSH_BUTTON_WIDTH > preferredSize.Width)
+ if (Values.ShowSplitOption && !string.IsNullOrWhiteSpace(Text) && TextRenderer.MeasureText(Text, Font).Width + DEFAULT_PUSH_BUTTON_WIDTH > preferredSize.Width)
{
return preferredSize + new Size(DEFAULT_PUSH_BUTTON_WIDTH + BORDER_SIZE * 2, 0);
}
@@ -720,7 +654,7 @@ protected override void OnClick(EventArgs e)
// If we have an attached command then execute it
KryptonCommand?.PerformExecute();
- if (_useAsUACElevationButton)
+ if (Values.UseAsUACElevationButton)
{
var rawUACShield = SystemIcons.Shield.ToBitmap();
@@ -766,9 +700,10 @@ protected override bool ProcessMnemonic(char charCode)
///
protected override void ContextMenuClosed() => _buttonController.RemoveFixed();
+ ///
protected override void OnPaint(PaintEventArgs? e)
{
- if (_useAsDialogButton)
+ if (Values.UseAsADialogButton)
{
if (DialogResult == DialogResult.Abort)
{
@@ -806,16 +741,35 @@ protected override void OnPaint(PaintEventArgs? e)
}
}
+ if (Values.UseAsUACElevationButton)
+ {
+ switch (Values.UACShieldIconSize)
+ {
+ case UACShieldIconSize.ExtraSmall:
+ break;
+ case UACShieldIconSize.Small:
+ break;
+ case UACShieldIconSize.Medium:
+ break;
+ case UACShieldIconSize.Large:
+ break;
+ case UACShieldIconSize.ExtraLarge:
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
+
base.OnPaint(e);
#region Split Code
- if (!_showSplitOption)
+ if (!Values.ShowSplitOption)
{
return;
}
- Graphics g = e.Graphics;
+ Graphics g = e?.Graphics!;
Rectangle bounds = ClientRectangle;
@@ -863,7 +817,7 @@ protected override void OnPaint(PaintEventArgs? e)
protected override bool IsInputKey(Keys keyData)
{
- if (keyData.Equals(Keys.Down) && _showSplitOption)
+ if (keyData.Equals(Keys.Down) && Values.ShowSplitOption)
{
return true;
}
@@ -875,7 +829,7 @@ protected override bool IsInputKey(Keys keyData)
protected override void OnKeyDown(KeyEventArgs e)
{
- if (_showSplitOption && e.KeyCode.Equals(Keys.Down))
+ if (Values.ShowSplitOption && e.KeyCode.Equals(Keys.Down))
{
ShowContextMenuStrip();
}
@@ -885,7 +839,7 @@ protected override void OnKeyDown(KeyEventArgs e)
protected override void OnMouseDown(MouseEventArgs e)
{
- if (!_showSplitOption)
+ if (!Values.ShowSplitOption)
{
base.OnMouseDown(e);
return;
@@ -903,7 +857,7 @@ protected override void OnMouseDown(MouseEventArgs e)
protected override void OnMouseUp(MouseEventArgs e)
{
- if (!_showSplitOption)
+ if (!Values.ShowSplitOption)
{
base.OnMouseUp(e);
@@ -1012,102 +966,6 @@ private void SetCornerRoundingRadius(float? radius)
StateCommon.Border.Rounding = _cornerRoundingRadius;
}
- #region UAC Stuff
-
- /// Shows the uac shield.
- /// if set to true [show uac shield].
- /// Size of the shield icon.
- /// The width.
- /// The height.
- private void ShowUACShield(bool showUACShield, UACShieldIconSize? shieldIconSize = null, int? width = null, int? height = null)
- {
- if (showUACShield)
- {
- int h = height ?? 16, w = width ?? 16;
-
- Image shield = SystemIcons.Shield.ToBitmap();
-
- switch (shieldIconSize)
- {
- //case UACShieldIconSize.Custom:
- // Values.Image = GraphicsExtensions.ScaleImage(shield, w, h);
- // break;
- case UACShieldIconSize.ExtraSmall:
- Values.Image = GraphicsExtensions.ScaleImage(shield, 16, 16);
- break;
- case UACShieldIconSize.Small:
- Values.Image = GraphicsExtensions.ScaleImage(shield, 32, 32);
- break;
- case UACShieldIconSize.Medium:
- Values.Image = GraphicsExtensions.ScaleImage(shield, 64, 64);
- break;
- case UACShieldIconSize.Large:
- Values.Image = GraphicsExtensions.ScaleImage(shield, 128, 128);
- break;
- case UACShieldIconSize.ExtraLarge:
- Values.Image = GraphicsExtensions.ScaleImage(shield, 256, 256);
- break;
- case null:
- Values.Image = GraphicsExtensions.ScaleImage(shield, 16, 16);
- break;
- }
-
- Invalidate();
- }
- else
- {
- Values.Image = null;
- }
- }
-
- /// Updates the UAC shield icon.
- /// Size of the icon.
- /// Size of the custom.
- private void UpdateOSUACShieldIcon(UACShieldIconSize? iconSize = null, Size? customSize = null)
- {
- //if (OSUtilities.IsWindowsEleven)
- //{
- // Image windowsElevenUacShieldImage = UACShieldIconResources.UACShieldWindows11;
-
- // if (iconSize == UACShieldIconSize.Custom)
- // {
- // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsElevenUacShieldImage);
- // }
- // else
- // {
- // UpdateShieldSize(iconSize, null, windowsElevenUacShieldImage);
- // }
- //}
- //else if (OSUtilities.IsWindowsTen)
- //{
- // Image windowsTenUacShieldImage = UACShieldIconResources.UACShieldWindows10;
-
- // if (iconSize == UACShieldIconSize.Custom)
- // {
- // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsTenUacShieldImage);
- // }
- // else
- // {
- // UpdateShieldSize(iconSize, null, windowsTenUacShieldImage);
- // }
- //}
- //else if (OSUtilities.IsWindowsEightPointOne || OSUtilities.IsWindowsEight || OSUtilities.IsWindowsSeven)
- //{
- // Image windowsEightUacShieldImage = UACShieldIconResources.UACShieldWindows7881;
-
- // if (iconSize == UACShieldIconSize.Custom)
- // {
- // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsEightUacShieldImage);
- // }
- // else
- // {
- // UpdateShieldSize(iconSize, null, windowsEightUacShieldImage);
- // }
- //}
- }
-
- #endregion
-
#region Splitter Stuff
private static void PaintArrow(Graphics graphics, Rectangle rectangle)
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs
new file mode 100644
index 000000000..d22d78500
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCommandLinkButton.cs
@@ -0,0 +1,730 @@
+#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. 2023 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ /// Combines button functionality with the styling features of the Krypton Toolkit.
+ /// Main code taken from KryptonButton, then trimmed out to force the CommandLink layout.
+ [ToolboxBitmap(typeof(KryptonCommandLinkButton), @"ToolboxBitmaps.KryptonCommandLinkButton.bmp")]
+ [ToolboxItem(true)]
+ [DefaultEvent("Click")]
+ [DefaultProperty("Heading")]
+ [Designer(typeof(KryptonCommandLinkButtonDesigner))]
+ [DesignerCategory("code")]
+ [ClassInterface(ClassInterfaceType.AutoDispatch)]
+ [DisplayName("Krypton Command Link")]
+ [Description("A Krypton Command Link Button.")]
+ [ComVisible(true)]
+ public class KryptonCommandLinkButton : VisualSimpleBase, IButtonControl
+ {
+ #region Static Fields
+
+ private const int BCM_SETSHIELD = 0x0000160C;
+
+ #endregion
+
+ #region Instance Fields
+
+ private bool _isDefault;
+ private bool _useMnemonic;
+ private bool _wasEnabled;
+ private ButtonStyle _buttonStyle;
+ private IKryptonCommand? _command;
+ private readonly ButtonController _buttonController;
+ private readonly PaletteTripleOverride _overrideFocus;
+ private readonly PaletteTripleOverride _overrideNormal;
+ private readonly PaletteTripleOverride _overridePressed;
+ private readonly PaletteTripleOverride _overrideTracking;
+ private readonly ViewDrawCommandLinkButton _drawCommandLinkButton;
+ private VisualOrientation _orientation;
+
+ #endregion
+
+ #region Events
+
+ ///
+ /// Occurs when the value of the KryptonCommand property changes.
+ ///
+ [Category("Property Changed")]
+ [Description("Occurs when the value of the KryptonCommand property changes.")]
+ public event EventHandler KryptonCommandChanged;
+
+ #endregion
+
+ #region Identity
+
+ /// Initializes a new instance of the class.
+ public KryptonCommandLinkButton()
+ {
+ // We generate click events manually, suppress default
+ // production of them by the base Control class
+ SetStyle(ControlStyles.StandardClick |
+ ControlStyles.StandardDoubleClick, false);
+
+ // Set default button properties
+ base.AutoSize = false;
+ DialogResult = DialogResult.None;
+ _orientation = VisualOrientation.Top;
+ _useMnemonic = true;
+
+ // Create content storage
+ CommandLinkImageValues = new CommandLinkImageValues(NeedPaintDelegate);
+ CommandLinkTextValues = new CommandLinkTextValues(NeedPaintDelegate);
+
+ // Create the palette storage
+ StateCommon = new PaletteTripleRedirect(Redirector, PaletteBackStyle.ButtonCommand, PaletteBorderStyle.ButtonCommand, PaletteContentStyle.ButtonCommand, NeedPaintDelegate);
+ PaletteContentText contentShortText = StateCommon.Content.ShortText;
+ contentShortText.Font = new Font(@"Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point, 0);
+ contentShortText.TextH = PaletteRelativeAlign.Near;
+ contentShortText.TextV = PaletteRelativeAlign.Center;
+ StateCommon.Content.LongText.TextH = PaletteRelativeAlign.Near;
+ StateCommon.Content.LongText.TextV = PaletteRelativeAlign.Far;
+
+ StateDisabled = new PaletteTriple(StateCommon, NeedPaintDelegate);
+ StateNormal = new PaletteTriple(StateCommon, NeedPaintDelegate);
+ StateTracking = new PaletteTriple(StateCommon, NeedPaintDelegate);
+ StatePressed = new PaletteTriple(StateCommon, NeedPaintDelegate);
+ OverrideDefault = new PaletteTripleRedirect(Redirector, PaletteBackStyle.ButtonCommand, PaletteBorderStyle.ButtonCommand, PaletteContentStyle.ButtonCommand, NeedPaintDelegate);
+ OverrideFocus = new PaletteTripleRedirect(Redirector, PaletteBackStyle.ButtonCommand, PaletteBorderStyle.ButtonCommand, PaletteContentStyle.ButtonCommand, NeedPaintDelegate);
+ OverrideFocus.Border.Draw = InheritBool.True;
+ OverrideFocus.Border.DrawBorders = PaletteDrawBorders.All;
+ OverrideFocus.Border.GraphicsHint = PaletteGraphicsHint.AntiAlias;
+ // Force style update
+ ButtonStyle = ButtonStyle.Command;
+
+ // Create the override handling classes
+ _overrideFocus = new PaletteTripleOverride(OverrideFocus, StateNormal, PaletteState.FocusOverride);
+ _overrideNormal = new PaletteTripleOverride(OverrideDefault, _overrideFocus, PaletteState.NormalDefaultOverride);
+ _overrideTracking = new PaletteTripleOverride(OverrideFocus, StateTracking, PaletteState.FocusOverride);
+ _overridePressed = new PaletteTripleOverride(OverrideFocus, StatePressed, PaletteState.FocusOverride);
+
+ // Create the view button instance
+ _drawCommandLinkButton = new ViewDrawCommandLinkButton(StateDisabled,
+ _overrideNormal,
+ _overrideTracking,
+ _overridePressed,
+ new PaletteMetricRedirect(Redirector!),
+ CommandLinkImageValues, CommandLinkTextValues,
+ Orientation,
+ UseMnemonic)
+ {
+ // Only draw a focus rectangle when focus cues are needed in the top level form
+ TestForFocusCues = true
+ };
+
+ // Create a button controller to handle button style behaviour
+ _buttonController = new ButtonController(_drawCommandLinkButton, NeedPaintDelegate);
+
+ // Assign the controller to the view element to treat as a button
+ _drawCommandLinkButton.MouseController = _buttonController;
+ _drawCommandLinkButton.KeyController = _buttonController;
+ _drawCommandLinkButton.SourceController = _buttonController;
+
+ // Need to know when user clicks the button view or mouse selects it
+ _buttonController.Click += OnButtonClick;
+ _buttonController.MouseSelect += OnButtonSelect;
+
+ // Create the view manager instance
+ ViewManager = new ViewManager(this, _drawCommandLinkButton);
+ }
+
+ #endregion
+
+ #region Public
+
+ ///
+ /// Gets and sets the automatic resize of the control to fit contents.
+ ///
+ [Browsable(false)]
+ [Localizable(false)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public override bool AutoSize
+ {
+ get => base.AutoSize;
+ set
+ {
+ // Do nothing }
+ }
+ }
+
+ ///
+ /// Gets and sets the internal padding space.
+ ///
+ [Browsable(false)]
+ [Localizable(false)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public new Padding Padding
+ {
+ get => base.Padding;
+ set => base.Padding = value;
+ }
+
+ ///
+ /// Gets or sets the text associated with this control.
+ ///
+ [Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
+ [Browsable(false)]
+ [Localizable(false)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public override string Text
+ {
+ get => CommandLinkTextValues.Heading;
+
+ set => CommandLinkTextValues.Heading = value;
+ }
+
+ private bool ShouldSerializeText()
+ {
+ // Never serialize, let the button values serialize instead
+ return false;
+ }
+
+ ///
+ /// Resets the Text property to its default value.
+ ///
+ public override void ResetText()
+ {
+ CommandLinkTextValues.ResetText();
+ }
+
+ ///
+ /// Gets and sets the visual orientation of the control.
+ ///
+ [Category("Visuals")]
+ [Description("Visual orientation of the control.")]
+ [DefaultValue(typeof(VisualOrientation), "Top")]
+ public virtual VisualOrientation Orientation
+ {
+ get => _orientation;
+
+ set
+ {
+ if (_orientation != value)
+ {
+ _orientation = value;
+
+ // Update the associated visual elements that are effected
+ _drawCommandLinkButton.Orientation = value;
+
+ PerformNeedPaint(true);
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the button style.
+ ///
+ [Category("Visuals")]
+ [Description("Button style.")]
+ public ButtonStyle ButtonStyle
+ {
+ get => _buttonStyle;
+
+ set
+ {
+ if (_buttonStyle != value)
+ {
+ _buttonStyle = value;
+ SetStyles(_buttonStyle);
+ PerformNeedPaint(true);
+ }
+ }
+ }
+
+ private bool ShouldSerializeButtonStyle()
+ {
+ return (ButtonStyle != ButtonStyle.Command);
+ }
+
+ private void ResetButtonStyle()
+ {
+ ButtonStyle = ButtonStyle.Command;
+ }
+
+ ///
+ /// Gets access to the button content.
+ ///
+ [Category("CommandLink")]
+ [Description("CommandLink Button Text")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public CommandLinkTextValues CommandLinkTextValues { get; }
+
+ ///
+ /// Gets access to the button content.
+ ///
+ [Category("CommandLink")]
+ [Description("CommandLink Button Image")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public CommandLinkImageValues CommandLinkImageValues { get; }
+
+ private bool ShouldSerializeValues()
+ {
+ return false;
+ }
+
+ ///
+ /// Gets access to the common button appearance that other states can override.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining common button appearance that other states can override.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTripleRedirect StateCommon { get; }
+
+ private bool ShouldSerializeStateCommon()
+ {
+ return !StateCommon.IsDefault;
+ }
+
+ ///
+ /// Gets access to the disabled button appearance entries.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining disabled button appearance.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTriple StateDisabled { get; }
+
+ private bool ShouldSerializeStateDisabled()
+ {
+ return !StateDisabled.IsDefault;
+ }
+
+ ///
+ /// Gets access to the normal button appearance entries.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining normal button appearance.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTriple StateNormal { get; }
+
+ private bool ShouldSerializeStateNormal()
+ {
+ return !StateNormal.IsDefault;
+ }
+
+ ///
+ /// Gets access to the hot tracking button appearance entries.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining hot tracking button appearance.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTriple StateTracking { get; }
+
+ private bool ShouldSerializeStateTracking()
+ {
+ return !StateTracking.IsDefault;
+ }
+
+ ///
+ /// Gets access to the pressed button appearance entries.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining pressed button appearance.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTriple StatePressed { get; }
+
+ private bool ShouldSerializeStatePressed()
+ {
+ return !StatePressed.IsDefault;
+ }
+
+ ///
+ /// Gets access to the normal button appearance when default.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining normal button appearance when default.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTripleRedirect OverrideDefault { get; }
+
+ private bool ShouldSerializeOverrideDefault()
+ {
+ return !OverrideDefault.IsDefault;
+ }
+
+ ///
+ /// Gets access to the button appearance when it has focus.
+ ///
+ [Category("Visuals")]
+ [Description("Overrides for defining button appearance when it has focus.")]
+ [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
+ public PaletteTripleRedirect OverrideFocus { get; }
+
+ private bool ShouldSerializeOverrideFocus()
+ {
+ return !OverrideFocus.IsDefault;
+ }
+
+ ///
+ /// Gets or sets the value returned to the parent form when the button is clicked.
+ ///
+ [Category("Behavior")]
+ [Description("The dialog-box result produced in a modal form by clicking the button.")]
+ [DefaultValue(typeof(DialogResult), "None")]
+ public DialogResult DialogResult { get; set; }
+
+ ///
+ /// Gets and sets the associated KryptonCommand.
+ ///
+ [Category("Behavior")]
+ [Description("Command associated with the button.")]
+ [DefaultValue(null)]
+ public virtual IKryptonCommand? KryptonCommand
+ {
+ get => _command;
+
+ set
+ {
+ if (_command == value)
+ {
+ return;
+ }
+
+ if (_command != null)
+ {
+ _command.PropertyChanged -= OnCommandPropertyChanged;
+ }
+ else
+ {
+ _wasEnabled = Enabled;
+ }
+
+ _command = value;
+ OnKryptonCommandChanged(EventArgs.Empty);
+
+ if (_command != null)
+ {
+ _command.PropertyChanged += OnCommandPropertyChanged;
+ }
+ else
+ {
+ Enabled = _wasEnabled;
+ }
+ }
+ }
+
+ ///
+ /// Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly.
+ ///
+ /// true if the control should behave as a default button; otherwise false.
+ public void NotifyDefault(bool value)
+ {
+ if (!ViewDrawButton.IsFixed && (_isDefault != value))
+ {
+ // Remember new default status
+ _isDefault = value;
+
+ // Decide if the default overrides should be applied
+ _overrideNormal.Apply = value;
+
+ // Change in default state requires a layout and repaint
+ PerformNeedPaint(true);
+ }
+ }
+
+ ///
+ /// Generates a Click event for the control.
+ ///
+ public void PerformClick()
+ {
+ if (CanSelect)
+ {
+ OnClick(EventArgs.Empty);
+ }
+ }
+
+ ///
+ /// Gets or sets a value indicating whether an ampersand is included in the text of the control.
+ ///
+ [Category("Appearance")]
+ [Description("When true the first character after an ampersand will be used as a mnemonic.")]
+ [DefaultValue(true)]
+ public bool UseMnemonic
+ {
+ get => _useMnemonic;
+
+ set
+ {
+ if (_useMnemonic != value)
+ {
+ _useMnemonic = value;
+ _drawCommandLinkButton.UseMnemonic = value;
+ PerformNeedPaint(true);
+ }
+ }
+ }
+
+ ///
+ /// Fix the control to a particular palette state.
+ ///
+ /// Palette state to fix.
+ public virtual void SetFixedState(PaletteState state)
+ {
+ if (state == PaletteState.NormalDefaultOverride)
+ {
+ // Setup the overrides correctly to match state
+ _overrideFocus.Apply = true;
+ _overrideNormal.Apply = true;
+
+ // Must pass a proper drawing state to the view
+ state = PaletteState.Normal;
+ }
+
+ // Request fixed state from the view
+ _drawCommandLinkButton.FixedState = state;
+ }
+
+ ///
+ /// Determines the IME status of the object when selected.
+ ///
+ [Browsable(false)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public new ImeMode ImeMode
+ {
+ get => base.ImeMode;
+ set => base.ImeMode = value;
+ }
+
+ #endregion
+
+ #region Protected Overrides
+
+ ///
+ /// Gets the default size of the control.
+ ///
+ protected override Size DefaultSize => new Size(287, 61);
+
+ ///
+ /// Gets the default Input Method Editor (IME) mode supported by this control.
+ ///
+ protected override ImeMode DefaultImeMode => ImeMode.Disable;
+
+ ///
+ /// Raises the EnabledChanged event.
+ ///
+ /// An EventArgs that contains the event data.
+ protected override void OnEnabledChanged(EventArgs e)
+ {
+ // Change in enabled state requires a layout and repaint
+ PerformNeedPaint(true);
+
+ // Let base class fire standard event
+ base.OnEnabledChanged(e);
+ }
+
+ ///
+ /// Raises the GotFocus event.
+ ///
+ /// An EventArgs that contains the event data.
+ protected override void OnGotFocus(EventArgs e)
+ {
+ if (!ViewDrawButton.IsFixed)
+ {
+ // Apply the focus overrides
+ _overrideFocus.Apply = true;
+ _overrideTracking.Apply = true;
+ _overridePressed.Apply = true;
+
+ // Change in focus requires a repaint
+ PerformNeedPaint(false);
+ }
+
+ // Let base class fire standard event
+ base.OnGotFocus(e);
+ }
+
+ ///
+ /// Raises the LostFocus event.
+ ///
+ /// An EventArgs that contains the event data.
+ protected override void OnLostFocus(EventArgs e)
+ {
+ if (!ViewDrawButton.IsFixed)
+ {
+ // Apply the focus overrides
+ _overrideFocus.Apply = false;
+ _overrideTracking.Apply = false;
+ _overridePressed.Apply = false;
+
+ // Change in focus requires a repaint
+ PerformNeedPaint(false);
+ }
+
+ // Let base class fire standard event
+ base.OnLostFocus(e);
+ }
+
+ ///
+ /// Raises the Click event.
+ ///
+ /// An EventArgs that contains the event data.
+ protected override void OnClick(EventArgs e)
+ {
+ // Find the form this button is on
+ Form? owner = FindForm();
+
+ // If we find a valid owner
+ if (owner != null)
+ {
+ // Update owner with our dialog result setting
+ owner.DialogResult = DialogResult;
+ }
+
+ // Let base class fire standard event
+ base.OnClick(e);
+
+ // If we have an attached command then execute it
+ KryptonCommand?.PerformExecute();
+ }
+
+ ///
+ /// Processes a mnemonic character.
+ ///
+ /// The mnemonic character entered.
+ /// true if the mnemonic was processed; otherwise, false.
+ protected override bool ProcessMnemonic(char charCode)
+ {
+ // Are we allowed to process mnemonics?
+ if (UseMnemonic && CanProcessMnemonic())
+ {
+ // Does the button primary text contain the mnemonic?
+ if (IsMnemonic(charCode, CommandLinkTextValues.Heading))
+ {
+ // Perform default action for a button, click it!
+ PerformClick();
+ return true;
+ }
+ }
+
+ // No match found, let base class do standard processing
+ return base.ProcessMnemonic(charCode);
+ }
+
+ ///
+ /// Called when a context menu has just been closed.
+ ///
+ protected override void ContextMenuClosed()
+ {
+ _buttonController.RemoveFixed();
+ }
+
+ ///
+ protected override void OnPaint(PaintEventArgs? e)
+ {
+ //if (CommandLinkImageValues.ShowUACShield)
+ //{
+ // SendMessage(new HandleRef(this, Handle), BCM_SETSHIELD, IntPtr.Zero,
+ // CommandLinkImageValues.ShowUACShield);
+ //}
+
+ base.OnPaint(e);
+ }
+
+ #endregion
+
+ #region WIN32 Calls
+
+
+ [DllImport(Libraries.User32, CharSet = CharSet.Unicode)]
+ static extern int SendMessage(HandleRef hWnd, uint msg, IntPtr wParam, bool lParam);
+
+ #endregion
+
+ #region Protected Virtual
+
+ ///
+ /// Update the state objects to reflect the new button style.
+ ///
+ /// New button style.
+ protected virtual void SetStyles(ButtonStyle buttonStyle)
+ {
+ StateCommon.SetStyles(buttonStyle);
+ OverrideDefault.SetStyles(buttonStyle);
+ OverrideFocus.SetStyles(buttonStyle);
+ }
+
+ ///
+ /// Creates a values storage object appropriate for control.
+ ///
+ /// Set of button values.
+ /// Delegate for notifying paint requests.
+ protected virtual ButtonValues CreateButtonValues(NeedPaintHandler needPaint) => new ButtonValues(needPaint);
+
+ ///
+ /// Raises the KryptonCommandChanged event.
+ ///
+ /// An EventArgs containing the event data.
+ protected virtual void OnKryptonCommandChanged(EventArgs e)
+ {
+ KryptonCommandChanged.Invoke(this, e);
+
+ // Use the values from the new command
+ if (KryptonCommand != null)
+ {
+ Enabled = KryptonCommand.Enabled;
+ }
+
+ // Redraw to update the text/extratext/image properties
+ PerformNeedPaint(true);
+ }
+
+ ///
+ /// Handles a change in the property of an attached command.
+ ///
+ /// Source of the event.
+ /// A PropertyChangedEventArgs that contains the event data.
+ protected virtual void OnCommandPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ switch (e.PropertyName)
+ {
+ case "Enabled":
+ Enabled = KryptonCommand!.Enabled;
+ break;
+ case "Text":
+ case "ExtraText":
+ case "ImageSmall":
+ case "ImageTransparentColor":
+ PerformNeedPaint(true);
+ break;
+ }
+ }
+
+ ///
+ /// Gets access to the view element for the color button.
+ ///
+ protected virtual ViewDrawCommandLinkButton ViewDrawButton => _drawCommandLinkButton;
+
+ #endregion
+
+ #region Implementation
+
+ private void OnButtonTextChanged(object sender, EventArgs e) => OnTextChanged(EventArgs.Empty);
+
+ private void OnButtonClick(object sender, MouseEventArgs e)
+ {
+ // Raise the standard click event
+ OnClick(EventArgs.Empty);
+
+ // Raise event to indicate it was a mouse activated click
+ OnMouseClick(e);
+ }
+
+ private void OnButtonSelect(object sender, MouseEventArgs e)
+ {
+ // Take the focus if allowed
+ if (CanFocus)
+ {
+ Focus();
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs
index de829ecce..0d5754468 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonMessageBox.cs
@@ -10,6 +10,7 @@
*/
#endregion
+// Only used in this class
using ContentAlignment = System.Drawing.ContentAlignment;
// ReSharper disable ClassNeverInstantiated.Global
diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualThemeBrowserForm.Designer.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualThemeBrowserForm.Designer.cs
index d2e4f8ced..33d3d0798 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualThemeBrowserForm.Designer.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Controls Visuals/VisualThemeBrowserForm.Designer.cs
@@ -95,7 +95,7 @@ private void InitializeComponent()
this.kbtnOK.Name = "kbtnOK";
this.kbtnOK.Size = new System.Drawing.Size(90, 25);
this.kbtnOK.TabIndex = 3;
- this.kbtnOK.UseAsADialogButton = true;
+ this.kbtnOK.Values.UseAsADialogButton = true;
this.kbtnOK.Values.Text = "O&K";
this.kbtnOK.Click += new System.EventHandler(this.kbtnOK_Click);
//
@@ -106,7 +106,7 @@ private void InitializeComponent()
this.kbtnCancel.Name = "kbtnCancel";
this.kbtnCancel.Size = new System.Drawing.Size(90, 25);
this.kbtnCancel.TabIndex = 2;
- this.kbtnCancel.UseAsADialogButton = true;
+ this.kbtnCancel.Values.UseAsADialogButton = true;
this.kbtnCancel.Values.Text = "Cance&l";
this.kbtnCancel.Click += new System.EventHandler(this.kbtnCancel_Click);
//
diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonButtonActionList.cs
index aa5d05d86..9970e127d 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonButtonActionList.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonButtonActionList.cs
@@ -228,19 +228,19 @@ public float StateCommonCornerRoundingRadius
[DefaultValue(false)]
public bool UseAsUACElevatedButton
{
- get => _button.UseAsUACElevationButton;
+ get => _button.Values.UseAsUACElevationButton;
set
{
- if (_button.UseAsUACElevationButton != value)
+ if (_button.Values.UseAsUACElevationButton != value)
{
- _service.OnComponentChanged(_button, null, _button.UseAsUACElevationButton, value);
+ _service.OnComponentChanged(_button, null, _button.Values.UseAsUACElevationButton, value);
- _button.UseAsUACElevationButton = value;
+ _button.Values.UseAsUACElevationButton = value;
}
}
}
-
+
#endregion
#region Public Override
diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandLinkButtonActionList.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandLinkButtonActionList.cs
new file mode 100644
index 000000000..480071a6e
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Action Lists/KryptonCommandLinkButtonActionList.cs
@@ -0,0 +1,168 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ internal class KryptonCommandLinkButtonActionList : DesignerActionList
+ {
+ #region Instance Fields
+ private readonly KryptonCommandLinkButton? _button;
+ private readonly IComponentChangeService? _service;
+ #endregion
+
+ #region Identity
+ ///
+ /// Initialize a new instance of the KryptonButtonActionList class.
+ ///
+ /// Designer that owns this action list instance.
+ public KryptonCommandLinkButtonActionList(KryptonCommandLinkButtonDesigner owner)
+ : base(owner.Component)
+ {
+ // Remember the button instance
+ _button = owner.Component as KryptonCommandLinkButton;
+
+ // Cache service used to notify when a property has changed
+ _service = GetService(typeof(IComponentChangeService)) as IComponentChangeService;
+ }
+ #endregion
+
+ #region Public
+ ///
+ /// Gets and sets the button style.
+ ///
+ public ButtonStyle ButtonStyle
+ {
+ get => _button!.ButtonStyle;
+
+ set
+ {
+ if (_button!.ButtonStyle != value)
+ {
+ _service?.OnComponentChanged(_button, null, _button.ButtonStyle, value);
+ _button.ButtonStyle = value;
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the visual orientation.
+ ///
+ public VisualOrientation Orientation
+ {
+ get => _button!.Orientation;
+
+ set
+ {
+ if (_button!.Orientation != value)
+ {
+ _service?.OnComponentChanged(_button, null, _button.Orientation, value);
+ _button.Orientation = value;
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the button text.
+ ///
+ public string Heading
+ {
+ get => _button!.CommandLinkTextValues.Heading;
+
+ set
+ {
+ if (_button!.CommandLinkTextValues.Heading != value)
+ {
+ _service?.OnComponentChanged(_button, null, _button.CommandLinkTextValues.Heading, value);
+ _button.CommandLinkTextValues.Heading = value;
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the extra button text.
+ ///
+ public string Description
+ {
+ get => _button!.CommandLinkTextValues.Description;
+
+ set
+ {
+ if (_button!.CommandLinkTextValues.Description != value)
+ {
+ _service?.OnComponentChanged(_button, null, _button.CommandLinkTextValues.Description, value);
+ _button.CommandLinkTextValues.Description = value;
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the button image.
+ ///
+ public Image Image
+ {
+ get => _button!.CommandLinkImageValues.Image;
+
+ set
+ {
+ if (_button!.CommandLinkImageValues.Image != value)
+ {
+ _service?.OnComponentChanged(_button, null, _button.CommandLinkImageValues.Image, value);
+ _button.CommandLinkImageValues.Image = value;
+ }
+ }
+ }
+
+ ///
+ /// Gets and sets the palette mode.
+ ///
+ public PaletteMode PaletteMode
+ {
+ get => _button!.PaletteMode;
+
+ set
+ {
+ if (_button!.PaletteMode != value)
+ {
+ _service?.OnComponentChanged(_button, null, _button.PaletteMode, value);
+ _button.PaletteMode = value;
+ }
+ }
+ }
+ #endregion
+
+ #region Public Override
+ ///
+ /// Returns the collection of DesignerActionItem objects contained in the list.
+ ///
+ /// A DesignerActionItem array that contains the items in this list.
+ public override DesignerActionItemCollection GetSortedActionItems()
+ {
+ // Create a new collection for holding the single item we want to create
+ DesignerActionItemCollection actions = new DesignerActionItemCollection();
+
+ // This can be null when deleting a control instance at design time
+ if (_button != null)
+ {
+ // Add the list of button specific actions
+ actions.Add(new DesignerActionHeaderItem("Appearance"));
+ actions.Add(new DesignerActionPropertyItem("Orientation", "Orientation", "Appearance", "Button orientation"));
+ actions.Add(new DesignerActionHeaderItem("CommandLink"));
+ actions.Add(new DesignerActionPropertyItem("Heading", "Heading", "CommandLink", "Button Heading text"));
+ actions.Add(new DesignerActionPropertyItem("Description", "Description", "CommandLink", "Button Subscript Description text"));
+ actions.Add(new DesignerActionPropertyItem("Image", "Image", "CommandLink", "Button image"));
+ actions.Add(new DesignerActionHeaderItem("Visuals"));
+ actions.Add(new DesignerActionPropertyItem("ButtonStyle", "Style", "Visuals", "Button style"));
+ actions.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals", "Palette applied to drawing"));
+ }
+
+ return actions;
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonCommandLinkButtonDesigner.cs b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonCommandLinkButtonDesigner.cs
new file mode 100644
index 000000000..53ad668de
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Designers/Designers/KryptonCommandLinkButtonDesigner.cs
@@ -0,0 +1,47 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ internal class KryptonCommandLinkButtonDesigner : ControlDesigner
+ {
+ #region Identity
+ ///
+ /// Initialize a new instance of the KryptonButtonDesigner class.
+ ///
+ public KryptonCommandLinkButtonDesigner()
+ {
+ // The resizing handles around the control need to change depending on the
+ // value of the AutoSize and AutoSizeMode properties. When in AutoSize you
+ // do not get the resizing handles, otherwise you do.
+ AutoResizeHandles = true;
+ }
+ #endregion
+
+ #region Public Overrides
+ ///
+ /// Gets the design-time action lists supported by the component associated with the designer.
+ ///
+ public override DesignerActionListCollection ActionLists
+ {
+ get
+ {
+ // Create a collection of action lists
+ DesignerActionListCollection actionLists = new DesignerActionListCollection
+ {
+ // Add the button specific list
+ new KryptonCommandLinkButtonActionList(this)
+ };
+
+ return actionLists;
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/General/PlatformInvoke.cs b/Source/Krypton Components/Krypton.Toolkit/General/PlatformInvoke.cs
index e90f73147..202e10986 100644
--- a/Source/Krypton Components/Krypton.Toolkit/General/PlatformInvoke.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/General/PlatformInvoke.cs
@@ -18,9 +18,6 @@
// ReSharper disable ArrangeTypeMemberModifiers
// ReSharper disable BuiltInTypeReferenceStyle
// ReSharper disable ClassNeverInstantiated.Global
-
-using Microsoft.Win32.SafeHandles;
-
// ReSharper disable CommentTypo
// ReSharper disable UnusedType.Local
// ReSharper disable MemberHidesStaticFromOuterClass
@@ -31,6 +28,9 @@
#pragma warning disable 649
+// Note: DO NOT REMOVE!!!
+using Microsoft.Win32.SafeHandles;
+
namespace Krypton.Toolkit
{
@@ -2279,7 +2279,7 @@ public const int
//
CPL_LAUNCHED = USER + 0x1001,
- OCM_CTLCOLOR = 0x2019,
+ OCM_CTLCOLOR = 0x2019,
// if ( msg.Msg == PI.WM_.OCM_NOTIFY )
//{
// PI.NMHEADER h2 = (PI.NMHEADER)m.GetLParam(typeof(PI.NMHEADER));
diff --git a/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.Designer.cs b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.Designer.cs
index 6c3ab827b..c825a230a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.Designer.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.Designer.cs
@@ -170,6 +170,76 @@ internal static System.Drawing.Bitmap Information_Windows_11 {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxAsterisk {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxAsterisk", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxCritical {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxCritical", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxHelp {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxHelp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxInformation {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxInformation", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxOk {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxOk", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxStop {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxStop", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap MessageBoxWarning {
+ get {
+ object obj = ResourceManager.GetObject("MessageBoxWarning", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
diff --git a/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.resx b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.resx
index fe39c6553..c613cce7a 100644
--- a/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.resx
+++ b/Source/Krypton Components/Krypton.Toolkit/ResourceFiles/MessageBox/MessageBoxImageResources.resx
@@ -151,6 +151,27 @@
..\..\Resources\Information_Windows_11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\..\Resources\MessageBoxAsterisk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\..\Resources\MessageBoxCritical.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\..\Resources\MessageBoxHelp.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\..\Resources\MessageBoxInformation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\..\Resources\MessageBoxOk.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\..\Resources\MessageBoxStop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\..\Resources\MessageBoxWarning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\..\Resources\Question_Windows_11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxAsterisk.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxAsterisk.png
new file mode 100644
index 000000000..72a010bb1
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxAsterisk.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxCritical.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxCritical.png
new file mode 100644
index 000000000..589970806
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxCritical.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxHelp.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxHelp.png
new file mode 100644
index 000000000..e73c71530
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxHelp.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxInformation.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxInformation.png
new file mode 100644
index 000000000..6c2475a1c
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxInformation.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxOk.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxOk.png
new file mode 100644
index 000000000..854a8b6ba
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxOk.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxStop.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxStop.png
new file mode 100644
index 000000000..909eb6e1c
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxStop.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxWarning.png b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxWarning.png
new file mode 100644
index 000000000..8b2eaa188
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/Resources/MessageBoxWarning.png differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/ToolboxBitmaps/KryptonCommandLinkButton.bmp b/Source/Krypton Components/Krypton.Toolkit/ToolboxBitmaps/KryptonCommandLinkButton.bmp
new file mode 100644
index 000000000..e7f1ba674
Binary files /dev/null and b/Source/Krypton Components/Krypton.Toolkit/ToolboxBitmaps/KryptonCommandLinkButton.bmp differ
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs
index 46f69559b..183a13ede 100644
--- a/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/ButtonValues.cs
@@ -10,6 +10,8 @@
*/
#endregion
+using static System.Windows.Forms.VisualStyles.VisualStyleElement.TextBox;
+
namespace Krypton.Toolkit
{
///
@@ -24,6 +26,11 @@ public class ButtonValues : Storage,
#endregion
#region Instance Fields
+
+ private bool _useAsDialogButton;
+ private bool _useAsUACElevationButton;
+ private bool _showSplitOption;
+ private UACShieldIconSize _uacShieldIconSize;
private Image? _image;
private Color _transparent;
private string? _text;
@@ -53,6 +60,10 @@ public ButtonValues(NeedPaintHandler needPaint)
_transparent = Color.Empty;
_text = _defaultText;
_extraText = _defaultExtraText;
+ _useAsDialogButton = false;
+ _useAsUACElevationButton = false;
+ _showSplitOption = false;
+ _uacShieldIconSize = GlobalStaticValues.DEFAULT_UAC_SHIELD_ICON_SIZE;
ImageStates = CreateImageStates();
ImageStates.NeedPaint = needPaint;
}
@@ -65,6 +76,10 @@ public ButtonValues(NeedPaintHandler needPaint)
[Browsable(false)]
public override bool IsDefault => ImageStates.IsDefault &&
(Image == null) &&
+ (UseAsADialogButton == false) &&
+ (UseAsUACElevationButton == false) &&
+ (ShowSplitOption == false) &&
+ //(UACShieldIconSize == UACShieldIconSize.ExtraSmall)
(ImageTransparentColor == Color.Empty) &&
(Text == _defaultText) &&
(ExtraText == _defaultExtraText);
@@ -218,6 +233,143 @@ public string ExtraText
public void ResetExtraText() => ExtraText = _defaultExtraText;
#endregion
+ #region UseAsADialogButton
+
+ [DefaultValue(false),
+ Description(@"If set to true, the text will pair up with the equivalent KryptonManager's dialog button text result. (Note: You'll lose any previous text)")]
+ public bool UseAsADialogButton
+ {
+ get => _useAsDialogButton;
+ set => _useAsDialogButton = value;
+ }
+
+ #endregion
+
+ #region UseAsUACElevationButton
+
+ [DefaultValue(false),
+ Description(@"Transforms the button into a UAC elevated button.")]
+ public bool UseAsUACElevationButton
+ {
+ get => _useAsUACElevationButton;
+ set
+ {
+ _useAsUACElevationButton = value;
+
+ switch (_uacShieldIconSize)
+ {
+ //if (_customUACShieldSize.Height > 0 && _customUACShieldSize.Width > 0)
+ //{
+ // ShowUACShield(value, UACShieldIconSize.Custom, _customUACShieldSize.Width, _customUACShieldSize.Height);
+ //}
+ //else if (_uacShieldIconSize != UACShieldIconSize.Custom)
+ //{
+ // ShowUACShield(value, _uacShieldIconSize);
+ //}
+ case UACShieldIconSize.ExtraSmall:
+ ShowUACShieldImage(value, UACShieldIconSize.ExtraSmall);
+ break;
+ case UACShieldIconSize.Small:
+ ShowUACShieldImage(value, UACShieldIconSize.Small);
+ break;
+ case UACShieldIconSize.Medium:
+ ShowUACShieldImage(value, UACShieldIconSize.Medium);
+ break;
+ case UACShieldIconSize.Large:
+ ShowUACShieldImage(value, UACShieldIconSize.Large);
+ break;
+ case UACShieldIconSize.ExtraLarge:
+ ShowUACShieldImage(value, UACShieldIconSize.ExtraLarge);
+ break;
+ default:
+ ShowUACShieldImage(value, UACShieldIconSize.ExtraSmall);
+ break;
+ }
+ }
+ }
+
+ #endregion
+
+ #region UseOSUACShieldIcon
+
+ /*
+ [DefaultValue(false), Description(@"Use the operating system UAC shield icon image.")]
+ public bool UseOSUACShieldIcon
+ {
+ get => _useOSUACShieldIcon;
+
+ set
+ {
+ _useOSUACShieldIcon = value;
+
+ UpdateOSUACShieldIcon();
+ }
+ }
+ */
+
+ #endregion
+
+ #region CustomUACShieldSize
+
+ /*
+ [DefaultValue(null), Description(@"")]
+ public Size CustomUACShieldSize
+ {
+ get => _customUACShieldSize;
+
+ set
+ { _customUACShieldSize = value;
+
+ ShowUACShield(_useAsUACElevationButton, UACShieldIconSize.Custom, value.Width, value.Height);
+ }
+ }
+ */
+
+ #endregion
+
+ #region UACShieldIconSize
+
+ [DefaultValue(UACShieldIconSize.ExtraSmall), Description(@"")]
+ public UACShieldIconSize UACShieldIconSize
+ {
+ get => _uacShieldIconSize;
+
+ set
+ {
+ _uacShieldIconSize = value;
+
+ ShowUACShieldImage(_useAsUACElevationButton, value);
+ }
+ }
+
+ #endregion
+
+ #region ShowSpltOption
+
+ /// Gets or sets a value indicating whether [show split option].
+ /// true if [show split option]; otherwise, false.
+ [Category(@"Visuals")]
+ [DefaultValue(false)]
+ [Description(@"Displays the split/dropdown option.")]
+ public bool ShowSplitOption
+ {
+ get => _showSplitOption;
+
+ set
+ {
+ if (value != _showSplitOption)
+ {
+ _showSplitOption = value;
+
+ PerformNeedPaint(true);
+
+ //Parent?.PerformLayout();
+ }
+ }
+ }
+
+ #endregion
+
#region CreateImageStates
///
/// Create the storage for the image states.
@@ -260,5 +412,102 @@ public string ExtraText
public virtual string GetLongText() => ExtraText;
#endregion
+
+ #region UAC Stuff
+
+ /// Shows the uac shield.
+ /// if set to true [show uac shield].
+ /// Size of the shield icon.
+ /// The width.
+ /// The height.
+ private void ShowUACShieldImage(bool showUACShield, UACShieldIconSize? shieldIconSize = null, int? width = null, int? height = null)
+ {
+ if (showUACShield)
+ {
+ int h = height ?? 16, w = width ?? 16;
+
+ Image shield = SystemIcons.Shield.ToBitmap();
+
+ switch (shieldIconSize)
+ {
+ //case UACShieldIconSize.Custom:
+ // Values.Image = GraphicsExtensions.ScaleImage(shield, w, h);
+ // break;
+ case UACShieldIconSize.ExtraSmall:
+ Image = GraphicsExtensions.ScaleImage(shield, 16, 16);
+ break;
+ case UACShieldIconSize.Small:
+ Image = GraphicsExtensions.ScaleImage(shield, 32, 32);
+ break;
+ case UACShieldIconSize.Medium:
+ Image = GraphicsExtensions.ScaleImage(shield, 64, 64);
+ break;
+ case UACShieldIconSize.Large:
+ Image = GraphicsExtensions.ScaleImage(shield, 128, 128);
+ break;
+ case UACShieldIconSize.ExtraLarge:
+ Image = GraphicsExtensions.ScaleImage(shield, 256, 256);
+ break;
+ case null:
+ Image = GraphicsExtensions.ScaleImage(shield, 16, 16);
+ break;
+ }
+
+ // Force a repaint
+ PerformNeedPaint(true);
+ }
+ else
+ {
+ Image = null;
+ }
+ }
+
+ /// Updates the UAC shield icon.
+ /// Size of the icon.
+ /// Size of the custom.
+ private void UpdateOSUACShieldIcon(UACShieldIconSize? iconSize = null, Size? customSize = null)
+ {
+ //if (OSUtilities.IsWindowsEleven)
+ //{
+ // Image windowsElevenUacShieldImage = UACShieldIconResources.UACShieldWindows11;
+
+ // if (iconSize == UACShieldIconSize.Custom)
+ // {
+ // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsElevenUacShieldImage);
+ // }
+ // else
+ // {
+ // UpdateShieldSize(iconSize, null, windowsElevenUacShieldImage);
+ // }
+ //}
+ //else if (OSUtilities.IsWindowsTen)
+ //{
+ // Image windowsTenUacShieldImage = UACShieldIconResources.UACShieldWindows10;
+
+ // if (iconSize == UACShieldIconSize.Custom)
+ // {
+ // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsTenUacShieldImage);
+ // }
+ // else
+ // {
+ // UpdateShieldSize(iconSize, null, windowsTenUacShieldImage);
+ // }
+ //}
+ //else if (OSUtilities.IsWindowsEightPointOne || OSUtilities.IsWindowsEight || OSUtilities.IsWindowsSeven)
+ //{
+ // Image windowsEightUacShieldImage = UACShieldIconResources.UACShieldWindows7881;
+
+ // if (iconSize == UACShieldIconSize.Custom)
+ // {
+ // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsEightUacShieldImage);
+ // }
+ // else
+ // {
+ // UpdateShieldSize(iconSize, null, windowsEightUacShieldImage);
+ // }
+ //}
+ }
+
+ #endregion
}
}
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs
new file mode 100644
index 000000000..39600a039
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkImageValues.cs
@@ -0,0 +1,280 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ public class CommandLinkImageValues : Storage, IContentValues
+ {
+ #region Static Fields
+
+ private static readonly Image DEFAULT_IMAGE = MessageBoxImageResources.GenericQuestion;
+
+ #endregion
+
+ #region Instance Fields
+
+ private bool _displayUACShield;
+
+ private Color _transparencyKey;
+
+ private Image? _image;
+
+ private UACShieldIconSize _uacShieldIconSize;
+
+ #endregion
+
+ #region Public
+
+ public bool DisplayUACShield
+ {
+ get => _displayUACShield;
+
+ set
+ {
+ if (_displayUACShield != value)
+ {
+ _displayUACShield = value;
+
+ switch (_uacShieldIconSize)
+ {
+ case UACShieldIconSize.ExtraSmall:
+ ShowUACShieldImage(value, UACShieldIconSize.ExtraSmall);
+ break;
+ case UACShieldIconSize.Small:
+ ShowUACShieldImage(value, UACShieldIconSize.Small);
+ break;
+ case UACShieldIconSize.Medium:
+ ShowUACShieldImage(value, UACShieldIconSize.Medium);
+ break;
+ case UACShieldIconSize.Large:
+ ShowUACShieldImage(value, UACShieldIconSize.Large);
+ break;
+ case UACShieldIconSize.ExtraLarge:
+ ShowUACShieldImage(value, UACShieldIconSize.ExtraLarge);
+ break;
+ default:
+ ShowUACShieldImage(value, UACShieldIconSize.ExtraSmall);
+ break;
+ }
+ }
+ }
+ }
+
+ private bool ShouldSerializeDisplayUACShield() => !DisplayUACShield;
+
+ public void ResetDisplayUACShield() => DisplayUACShield = false;
+
+ /// Gets and sets the heading image transparent color.
+ [Localizable(true)]
+ [Category("Visuals")]
+ [Description("Image transparent color.")]
+ [RefreshProperties(RefreshProperties.All)]
+ [KryptonDefaultColor()]
+ public Color ImageTransparentColor
+ {
+ get => _transparencyKey;
+
+ set
+ {
+ if (_transparencyKey != value)
+ {
+ _transparencyKey = value;
+ PerformNeedPaint(true);
+ }
+ }
+ }
+
+ private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor != Color.Empty;
+
+ /// Resets the ImageTransparentColor property to its default value.
+ public void ResetImageTransparentColor() => ImageTransparentColor = Color.Empty;
+
+ /// Gets or sets the image.
+ /// The image.
+ [Localizable(true)]
+ [Category("Visuals")]
+ [Description("The image.")]
+ [RefreshProperties(RefreshProperties.All)]
+ public Image? Image
+ {
+ get => _image;
+ set
+ {
+ if (_image != value)
+ {
+ _image = value;
+ PerformNeedPaint(true);
+ }
+ }
+
+ }
+
+ private bool ShouldSerializeImage() => Image != DEFAULT_IMAGE;
+
+ public void ResetImage() => Image = DEFAULT_IMAGE;
+
+ [DefaultValue(UACShieldIconSize.Small), Description(@"")]
+ public UACShieldIconSize UACShieldIconSize
+ {
+ get => _uacShieldIconSize;
+
+ set
+ {
+ _uacShieldIconSize = value;
+
+ ShowUACShieldImage(_displayUACShield, value);
+ }
+ }
+
+ private bool ShouldSerializeUACShieldIconSize() => UACShieldIconSize != UACShieldIconSize.Small;
+
+ public void ResetUACShieldIconSize() => UACShieldIconSize = UACShieldIconSize.Small;
+
+ #endregion
+
+ #region Identity
+
+ /// Initializes a new instance of the class.
+ /// The need paint.
+ public CommandLinkImageValues(NeedPaintHandler needPaint)
+ {
+ NeedPaint = needPaint;
+
+ ResetDisplayUACShield();
+
+ ResetImage();
+
+ ResetImageTransparentColor();
+
+ ResetUACShieldIconSize();
+ }
+
+ #endregion
+
+ #region IsDefault
+
+ ///
+ [Browsable(false)]
+ public override bool IsDefault => (DisplayUACShield.Equals(false) &&
+ Image!.Equals(DEFAULT_IMAGE) &&
+ ImageTransparentColor.Equals(Color.Empty) &&
+ UACShieldIconSize.Equals(UACShieldIconSize.Small));
+
+ #endregion
+
+ #region Implementation
+
+ ///
+ public Image? GetImage(PaletteState state) => Image;
+
+ ///
+ public Color GetImageTransparentColor(PaletteState state) => ImageTransparentColor;
+
+ ///
+ public string GetShortText() => string.Empty;
+
+ ///
+ public string GetLongText() => string.Empty;
+
+ /// Shows the uac shield.
+ /// if set to true [show uac shield].
+ /// Size of the shield icon.
+ /// The width.
+ /// The height.
+ private void ShowUACShieldImage(bool showUACShield, UACShieldIconSize? shieldIconSize = null, int? width = null, int? height = null)
+ {
+ if (showUACShield)
+ {
+ int h = height ?? 16, w = width ?? 16;
+
+ Image shield = SystemIcons.Shield.ToBitmap();
+
+ switch (shieldIconSize)
+ {
+ //case UACShieldIconSize.Custom:
+ // Values.Image = GraphicsExtensions.ScaleImage(shield, w, h);
+ // break;
+ case UACShieldIconSize.ExtraSmall:
+ Image = GraphicsExtensions.ScaleImage(shield, 16, 16);
+ break;
+ case UACShieldIconSize.Small:
+ Image = GraphicsExtensions.ScaleImage(shield, 32, 32);
+ break;
+ case UACShieldIconSize.Medium:
+ Image = GraphicsExtensions.ScaleImage(shield, 64, 64);
+ break;
+ case UACShieldIconSize.Large:
+ Image = GraphicsExtensions.ScaleImage(shield, 128, 128);
+ break;
+ case UACShieldIconSize.ExtraLarge:
+ Image = GraphicsExtensions.ScaleImage(shield, 256, 256);
+ break;
+ case null:
+ Image = GraphicsExtensions.ScaleImage(shield, 16, 16);
+ break;
+ }
+
+ // Force a repaint
+ PerformNeedPaint(true);
+ }
+ else
+ {
+ Image = null;
+ }
+ }
+
+ /// Updates the UAC shield icon.
+ /// Size of the icon.
+ /// Size of the custom.
+ private void UpdateOSUACShieldIcon(UACShieldIconSize? iconSize = null, Size? customSize = null)
+ {
+ //if (OSUtilities.IsWindowsEleven)
+ //{
+ // Image windowsElevenUacShieldImage = UACShieldIconResources.UACShieldWindows11;
+
+ // if (iconSize == UACShieldIconSize.Custom)
+ // {
+ // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsElevenUacShieldImage);
+ // }
+ // else
+ // {
+ // UpdateShieldSize(iconSize, null, windowsElevenUacShieldImage);
+ // }
+ //}
+ //else if (OSUtilities.IsWindowsTen)
+ //{
+ // Image windowsTenUacShieldImage = UACShieldIconResources.UACShieldWindows10;
+
+ // if (iconSize == UACShieldIconSize.Custom)
+ // {
+ // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsTenUacShieldImage);
+ // }
+ // else
+ // {
+ // UpdateShieldSize(iconSize, null, windowsTenUacShieldImage);
+ // }
+ //}
+ //else if (OSUtilities.IsWindowsEightPointOne || OSUtilities.IsWindowsEight || OSUtilities.IsWindowsSeven)
+ //{
+ // Image windowsEightUacShieldImage = UACShieldIconResources.UACShieldWindows7881;
+
+ // if (iconSize == UACShieldIconSize.Custom)
+ // {
+ // UpdateShieldSize(UACShieldIconSize.Custom, customSize, windowsEightUacShieldImage);
+ // }
+ // else
+ // {
+ // UpdateShieldSize(iconSize, null, windowsEightUacShieldImage);
+ // }
+ //}
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkMainTextValue.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkMainTextValue.cs
new file mode 100644
index 000000000..e28c385a4
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkMainTextValue.cs
@@ -0,0 +1,30 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ public class CommandLinkMainTextValue : NullContentValues
+ {
+ #region Public
+
+ /// Gets or sets the short text.
+ /// The short text.
+ public string ShortText { get; set; }
+
+ #endregion
+
+ #region Implementation
+
+ /// Gets the content short text.
+ /// String value.
+ public override string GetShortText() => ShortText;
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkSubscriptTextValue.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkSubscriptTextValue.cs
new file mode 100644
index 000000000..c8f412725
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkSubscriptTextValue.cs
@@ -0,0 +1,30 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ public class CommandLinkSubscriptTextValue : NullContentValues
+ {
+ #region Public
+
+ /// Gets or sets the long text.
+ /// The long text.
+ public string LongText { get; set; }
+
+ #endregion
+
+ #region Implementation
+
+ /// Gets the content long text.
+ /// String value.
+ public override string GetLongText() => LongText;
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs
new file mode 100644
index 000000000..0fc04cab8
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/Values/CommandLinkTextValues.cs
@@ -0,0 +1,58 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ public class CommandLinkTextValues : CaptionValues
+ {
+ #region Static Fields
+
+ private const string DEFAULT_HEADING = @"Krypton Command Link Button";
+
+ private const string DEFAULT_DESCRIPTION = @"Krypton Command Link Button ""Note Text""";
+
+ #endregion
+
+ #region Identity
+
+ /// Initializes a new instance of the class.
+ /// Delegate for notifying paint requests.
+ public CommandLinkTextValues(NeedPaintHandler needPaint) : base(needPaint)
+ {
+ }
+
+ #endregion
+
+ #region Protected
+
+ ///
+ protected override string GetDescriptionDefault() => DEFAULT_DESCRIPTION;
+
+ ///
+ protected override string GetHeadingDefault() => DEFAULT_HEADING;
+
+ #endregion
+
+ #region Implementation
+
+ ///
+ [DefaultValue(DEFAULT_DESCRIPTION)]
+ public override string Description { get => base.Description; set => base.Description = value; }
+
+ /// Resets the text.
+ public void ResetText()
+ {
+ Heading = DEFAULT_HEADING;
+
+ Description = DEFAULT_DESCRIPTION;
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCommandLinkButton.cs b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCommandLinkButton.cs
new file mode 100644
index 000000000..e3f460ff6
--- /dev/null
+++ b/Source/Krypton Components/Krypton.Toolkit/View Draw/ViewDrawCommandLinkButton.cs
@@ -0,0 +1,518 @@
+#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 - 2023. All rights reserved.
+ *
+ */
+#endregion
+
+namespace Krypton.Toolkit
+{
+ ///
+ /// View element that can draw a CommandLinkButton.
+ ///
+ public class ViewDrawCommandLinkButton : ViewComposite
+ {
+ #region Instance Fields
+
+ private IPaletteTriple _paletteDisabled;
+ private IPaletteTriple _paletteNormal;
+ private IPaletteTriple _paletteTracking;
+ private IPaletteTriple _palettePressed;
+ private IPaletteTriple _paletteCheckedNormal;
+ private IPaletteTriple _paletteCheckedTracking;
+ private IPaletteTriple _paletteCheckedPressed;
+ private readonly ViewDrawCanvas _drawCanvas;
+ private readonly ViewDrawContent _drawContent;
+ private readonly ViewDrawContent _drawImageContent;
+ private readonly ViewLayoutCenter _drawImage;
+ private bool _forcePaletteUpdate;
+
+ #endregion
+
+ #region Identity
+
+ ///
+ /// Initialize a new instance of the class.
+ ///
+ /// Palette source for the disabled state.
+ /// Palette source for the normal state.
+ /// Palette source for the tracking state.
+ /// Palette source for the pressed state.
+ /// Palette source for metric values.
+ ///
+ ///
+ /// Visual orientation of the content.
+ /// Use mnemonics.
+ public ViewDrawCommandLinkButton(IPaletteTriple paletteDisabled,
+ IPaletteTriple paletteNormal,
+ IPaletteTriple paletteTracking,
+ IPaletteTriple palettePressed,
+ IPaletteMetric paletteMetric,
+ CommandLinkImageValues imageValues,
+ CommandLinkTextValues commandLinkTextValues,
+ VisualOrientation orientation,
+ bool useMnemonic)
+ : this(paletteDisabled, paletteNormal, paletteTracking, palettePressed,
+ paletteNormal, paletteTracking, palettePressed, paletteMetric,
+ imageValues, commandLinkTextValues, orientation, useMnemonic)
+ {
+ }
+
+ ///
+ /// Initialize a new instance of the ViewDrawButton class.
+ ///
+ /// Palette source for the disabled state.
+ /// Palette source for the normal state.
+ /// Palette source for the tracking state.
+ /// Palette source for the pressed state.
+ /// Palette source for the normal checked state.
+ /// Palette source for the tracking checked state.
+ /// Palette source for the pressed checked state.
+ /// Palette source for metric values.
+ ///
+ ///
+ /// Visual orientation of the content.
+ /// Use mnemonics.
+ public ViewDrawCommandLinkButton(IPaletteTriple paletteDisabled,
+ IPaletteTriple paletteNormal,
+ IPaletteTriple paletteTracking,
+ IPaletteTriple palettePressed,
+ IPaletteTriple paletteCheckedNormal,
+ IPaletteTriple paletteCheckedTracking,
+ IPaletteTriple paletteCheckedPressed,
+ IPaletteMetric paletteMetric,
+ CommandLinkImageValues imageValues,
+ CommandLinkTextValues commandLinkTextValues,
+ VisualOrientation orientation,
+ bool useMnemonic)
+ {
+ // Remember the source information
+ _paletteDisabled = paletteDisabled;
+ _paletteNormal = paletteNormal;
+ _paletteTracking = paletteTracking;
+ _palettePressed = palettePressed;
+ _paletteCheckedNormal = paletteCheckedNormal;
+ _paletteCheckedTracking = paletteCheckedTracking;
+ _paletteCheckedPressed = paletteCheckedPressed;
+ CurrentPalette = _paletteNormal;
+
+ // Default to not being checked
+ Checked = false;
+ AllowUncheck = true;
+
+ // Create the drop down view
+ _drawImageContent = new ViewDrawContent(_paletteNormal.PaletteContent, imageValues, orientation);
+ _drawImage = new ViewLayoutCenter(paletteMetric, PaletteMetricPadding.BarPaddingOnly,
+ orientation, _drawImageContent);
+
+ // Our view contains background and border with content inside
+ _drawContent = new ViewDrawContent(_paletteNormal.PaletteContent, commandLinkTextValues, orientation)
+ {
+ // Pass the mnemonic default to the content view
+ UseMnemonic = useMnemonic
+ };
+
+ // Use a docker layout to organize the contents of the canvas
+ LayoutDocker = new ViewLayoutDocker
+ {
+ { _drawContent, ViewDockStyle.Left },
+ { _drawImage, ViewDockStyle.Left }
+ };
+ LayoutDocker.Tag = this;
+
+
+ _drawCanvas = new ViewDrawCanvas(_paletteNormal.PaletteBack, _paletteNormal.PaletteBorder, paletteMetric,
+ PaletteMetricPadding.BarPaddingTabs, orientation)
+ {
+ // Place the content inside the canvas
+ LayoutDocker
+ };
+
+ // Place the canvas inside ourself
+ Add(_drawCanvas);
+ }
+
+ ///
+ /// Obtains the String representation of this instance.
+ ///
+ /// User readable name of the instance.
+ public override string ToString()
+ {
+ // Return the class name and instance identifier
+ return "ViewDrawButton:" + Id;
+ }
+ #endregion
+
+ #region LayoutDocker
+ ///
+ /// Gets access to the contained layout docker.
+ ///
+ public ViewLayoutDocker LayoutDocker { get; }
+
+ #endregion
+
+ #region CurrentPalette
+ ///
+ /// Gets access to the currently selected palette.
+ ///
+ public IPaletteTriple CurrentPalette { get; private set; }
+
+ #endregion
+
+ #region ButtonValues
+ ///
+ /// Gets and sets the source for button values.
+ ///
+ public IContentValues? ButtonValues
+ {
+ get => _drawContent.Values;
+ set => _drawContent.Values = value;
+ }
+ #endregion
+
+ #region DrawTabBorder
+ ///
+ /// Gets and sets if the border should be drawn as a tab border.
+ ///
+ public bool DrawTabBorder
+ {
+ get => _drawCanvas.DrawTabBorder;
+ set => _drawCanvas.DrawTabBorder = value;
+ }
+ #endregion
+
+ #region TabBorderStyle
+ ///
+ /// Gets and sets the tab border style of the button.
+ ///
+ public TabBorderStyle TabBorderStyle
+ {
+ get => _drawCanvas.TabBorderStyle;
+ set => _drawCanvas.TabBorderStyle = value;
+ }
+ #endregion
+
+ #region Enabled
+ ///
+ /// Gets and sets the enabled state of the element.
+ ///
+ public override bool Enabled
+ {
+ get => base.Enabled;
+
+ set
+ {
+ base.Enabled = value;
+
+ if (Enabled && (ElementState == PaletteState.Disabled))
+ {
+ ElementState = Checked ? PaletteState.CheckedNormal : PaletteState.Normal;
+ }
+
+ // Pass on the new state to the child elements
+ _drawCanvas.Enabled = value;
+ _drawContent.Enabled = value;
+ _drawImageContent.Enabled = value;
+ }
+ }
+ #endregion
+
+ #region Orientation
+ ///
+ /// Gets and sets the visual orientation.
+ ///
+ public virtual VisualOrientation Orientation
+ {
+ get => _drawCanvas.Orientation;
+ set => SetOrientation(value, value);
+ }
+
+ ///
+ /// Set the orientation of the two button components.
+ ///
+ /// Orientation of the button border and background..
+ /// Orientation of the button contents.
+ public void SetOrientation(VisualOrientation borderBackOrient,
+ VisualOrientation contentOrient)
+ {
+ _drawCanvas.Orientation = borderBackOrient;
+ _drawContent.Orientation = contentOrient;
+ }
+ #endregion
+
+ #region UseMnemonic
+ ///
+ /// Gets and sets usage of mnemonics.
+ ///
+ public bool UseMnemonic
+ {
+ get => _drawContent.UseMnemonic;
+ set => _drawContent.UseMnemonic = value;
+ }
+ #endregion
+
+ #region Checked
+ ///
+ /// Gets and sets the checked state.
+ ///
+ public bool Checked { get; set; }
+
+ #endregion
+
+ #region AllowUncheck
+ ///
+ /// Gets and sets the allow uncheck state.
+ ///
+ public bool AllowUncheck { get; set; }
+
+ #endregion
+
+ #region DrawButtonComposition
+ ///
+ /// Gets and sets the composition usage of the button.
+ ///
+ public bool DrawButtonComposition
+ {
+ get => _drawCanvas.DrawCanvasOnComposition;
+ set => _drawCanvas.DrawCanvasOnComposition = value;
+ }
+ #endregion
+
+ #region TestForFocusCues
+ ///
+ /// Gets and sets the use of focus cues for deciding if focus rects are allowed.
+ ///
+ public bool TestForFocusCues
+ {
+ get => _drawContent.TestForFocusCues;
+ set => _drawContent.TestForFocusCues = value;
+ }
+ #endregion
+
+ #region Palettes
+ ///
+ /// Update the source palettes for non-checked drawing.
+ ///
+ /// Palette source for the disabled state.
+ /// Palette source for the normal state.
+ /// Palette source for the tracking state.
+ /// Palette source for the pressed state.
+ public void SetPalettes(IPaletteTriple paletteDisabled,
+ IPaletteTriple paletteNormal,
+ IPaletteTriple paletteTracking,
+ IPaletteTriple palettePressed)
+ {
+ Debug.Assert(paletteDisabled != null);
+ Debug.Assert(paletteNormal != null);
+ Debug.Assert(paletteTracking != null);
+ Debug.Assert(palettePressed != null);
+
+ // Remember the new palette settings
+ _paletteDisabled = paletteDisabled;
+ _paletteNormal = paletteNormal;
+ _paletteTracking = paletteTracking;
+ _palettePressed = palettePressed;
+
+ // Must force update of palettes to use latest ones provided
+ _forcePaletteUpdate = true;
+ }
+
+ ///
+ /// Update the source palettes for checked state drawing.
+ ///
+ /// Palette source for the normal checked state.
+ /// Palette source for the tracking checked state.
+ /// Palette source for the pressed checked state.
+ public void SetCheckedPalettes(IPaletteTriple paletteCheckedNormal,
+ IPaletteTriple paletteCheckedTracking,
+ IPaletteTriple paletteCheckedPressed)
+ {
+ Debug.Assert(paletteCheckedNormal != null);
+ Debug.Assert(paletteCheckedTracking != null);
+ Debug.Assert(paletteCheckedPressed != null);
+
+ // Remember the new palette settings
+ _paletteCheckedNormal = paletteCheckedNormal;
+ _paletteCheckedTracking = paletteCheckedTracking;
+ _paletteCheckedPressed = paletteCheckedPressed;
+
+ // Must force update of palettes to use latest ones provided
+ _forcePaletteUpdate = true;
+ }
+ #endregion
+
+ #region Eval
+ ///
+ /// Evaluate the need for drawing transparent areas.
+ ///
+ /// Evaluation context.
+ /// True if transparent areas exist; otherwise false.
+ public override bool EvalTransparentPaint(ViewContext context)
+ {
+ Debug.Assert(context != null);
+
+ // Ensure that child elements have correct palette state
+ CheckPaletteState(context);
+
+ // Ask the renderer to evaluate the given palette
+ return _drawCanvas.EvalTransparentPaint(context);
+ }
+ #endregion
+
+ #region Layout
+ ///
+ /// Discover the preferred size of the element.
+ ///
+ /// Layout context.
+ public override Size GetPreferredSize(ViewLayoutContext context)
+ {
+ Debug.Assert(context != null);
+ Debug.Assert(_drawCanvas != null);
+
+ // Ensure that child elements have correct palette state
+ CheckPaletteState(context);
+
+ // Delegate work to the child canvas
+ return _drawCanvas.GetPreferredSize(context);
+ }
+
+ ///
+ /// Perform a layout of the elements.
+ ///
+ /// Layout context.
+ ///
+ public override void Layout(ViewLayoutContext context)
+ {
+ Debug.Assert(context != null);
+
+ // Validate incoming reference
+ if (context == null)
+ {
+ throw new ArgumentNullException(nameof(context));
+ }
+
+ // We take on all the available display area
+ ClientRectangle = context.DisplayRectangle;
+
+ // Ensure that child elements have correct palette state
+ CheckPaletteState(context);
+
+ // Let base class perform usual processing
+ base.Layout(context);
+
+
+ }
+ #endregion
+
+ #region Paint
+ ///
+ /// Perform a render of the elements.
+ ///
+ /// Rendering context.
+ public override void Render(RenderContext context)
+ {
+ Debug.Assert(context != null);
+
+ // Ensure that child elements have correct palette state
+ CheckPaletteState(context);
+
+ // Let base class perform standard rendering
+ base.Render(context);
+ }
+ #endregion
+
+ #region Protected
+ ///
+ /// Check that the palette and state are correct.
+ ///
+ /// Reference to the view context.
+ protected virtual void CheckPaletteState(ViewContext context)
+ {
+ // Default to using this element calculated state
+ PaletteState buttonState = State;
+
+ // If the actual control is not enabled, force to disabled state
+ if (!IsFixed && !context.Control.Enabled)
+ {
+ buttonState = PaletteState.Disabled;
+ }
+
+ // Apply the checked state if not fixed
+ if (!IsFixed && Checked)
+ {
+ // Is the checked button allowed to become unchecked
+ if (AllowUncheck)
+ {
+ // Show feedback on tracking and pressed
+ switch (buttonState)
+ {
+ case PaletteState.Normal:
+ buttonState = PaletteState.CheckedNormal;
+ break;
+ case PaletteState.Tracking:
+ buttonState = PaletteState.CheckedTracking;
+ break;
+ case PaletteState.Pressed:
+ buttonState = PaletteState.CheckedPressed;
+ break;
+ }
+ }
+ else
+ {
+ // Always use the normal state as user cannot uncheck the button
+ buttonState = PaletteState.CheckedNormal;
+ }
+ }
+
+ // If the child elements are not in correct state
+ if (_forcePaletteUpdate || (_drawCanvas.ElementState != buttonState))
+ {
+ // No longer need to force the palettes to be updated
+ _forcePaletteUpdate = false;
+
+ // Switch the child elements over to correct state
+ _drawCanvas.ElementState = buttonState;
+ _drawContent.ElementState = buttonState;
+ _drawImageContent.ElementState = buttonState;
+
+ // Push the correct palettes into them
+ switch (buttonState)
+ {
+ case PaletteState.Disabled:
+ CurrentPalette = _paletteDisabled;
+ break;
+ case PaletteState.Normal:
+ CurrentPalette = _paletteNormal;
+ break;
+ case PaletteState.CheckedNormal:
+ CurrentPalette = _paletteCheckedNormal;
+ break;
+ case PaletteState.Pressed:
+ CurrentPalette = _palettePressed;
+ break;
+ case PaletteState.CheckedPressed:
+ CurrentPalette = _paletteCheckedPressed;
+ break;
+ case PaletteState.Tracking:
+ CurrentPalette = _paletteTracking;
+ break;
+ case PaletteState.CheckedTracking:
+ CurrentPalette = _paletteCheckedTracking;
+ break;
+ default:
+ // Should never happen!
+ Debug.Assert(false);
+ break;
+ }
+
+ // Update with the correct palettes
+ _drawCanvas.SetPalettes(CurrentPalette.PaletteBack, CurrentPalette.PaletteBorder);
+ _drawContent.SetPalette(CurrentPalette.PaletteContent);
+ //_drawImageContent.SetPalette(CurrentPalette.PaletteContent);
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/TestForm/Form1.Designer.cs b/Source/Krypton Components/TestForm/Form1.Designer.cs
index a70e54e96..c1328b9ed 100644
--- a/Source/Krypton Components/TestForm/Form1.Designer.cs
+++ b/Source/Krypton Components/TestForm/Form1.Designer.cs
@@ -29,7 +29,9 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.kryptonPanel1 = new Krypton.Toolkit.KryptonPanel();
+ this.kryptonButton9 = new Krypton.Toolkit.KryptonButton();
this.kryptonButton5 = new Krypton.Toolkit.KryptonButton();
this.kryptonButton8 = new Krypton.Toolkit.KryptonButton();
this.kcbtnSizableToolWindow = new Krypton.Toolkit.KryptonCheckButton();
@@ -85,6 +87,7 @@ private void InitializeComponent()
//
// kryptonPanel1
//
+ this.kryptonPanel1.Controls.Add(this.kryptonButton9);
this.kryptonPanel1.Controls.Add(this.kryptonButton5);
this.kryptonPanel1.Controls.Add(this.kryptonButton8);
this.kryptonPanel1.Controls.Add(this.kcbtnSizableToolWindow);
@@ -118,6 +121,15 @@ private void InitializeComponent()
this.kryptonPanel1.Size = new System.Drawing.Size(1112, 752);
this.kryptonPanel1.TabIndex = 0;
//
+ // kryptonButton9
+ //
+ this.kryptonButton9.Location = new System.Drawing.Point(15, 415);
+ this.kryptonButton9.Name = "kryptonButton9";
+ this.kryptonButton9.Size = new System.Drawing.Size(183, 25);
+ this.kryptonButton9.TabIndex = 34;
+ this.kryptonButton9.Values.Text = "Command Links";
+ this.kryptonButton9.Click += new System.EventHandler(this.kryptonButton9_Click);
+ //
// kryptonButton5
//
this.kryptonButton5.Location = new System.Drawing.Point(15, 384);
@@ -321,7 +333,9 @@ private void InitializeComponent()
this.kryptonButton2.Name = "kryptonButton2";
this.kryptonButton2.Size = new System.Drawing.Size(185, 25);
this.kryptonButton2.TabIndex = 6;
+ this.kryptonButton2.Values.Image = ((System.Drawing.Image)(resources.GetObject("kryptonButton2.Values.Image")));
this.kryptonButton2.Values.Text = "Ribbon (Form3)";
+ this.kryptonButton2.Values.UseAsUACElevationButton = true;
this.kryptonButton2.Click += new System.EventHandler(this.kryptonButton2_Click);
//
// kryptonThemeComboBox1
@@ -345,9 +359,9 @@ private void InitializeComponent()
this.kryptonButton1.KryptonContextMenu = this.kryptonContextMenu1;
this.kryptonButton1.Location = new System.Drawing.Point(12, 132);
this.kryptonButton1.Name = "kryptonButton1";
- this.kryptonButton1.ShowSplitOption = true;
this.kryptonButton1.Size = new System.Drawing.Size(185, 25);
this.kryptonButton1.TabIndex = 5;
+ this.kryptonButton1.Values.ShowSplitOption = true;
this.kryptonButton1.Values.Text = "Button (form2)";
this.kryptonButton1.Click += new System.EventHandler(this.kryptonButton1_Click);
//
@@ -561,5 +575,6 @@ private void InitializeComponent()
private Krypton.Toolkit.KryptonButton kryptonButton8;
private Krypton.Toolkit.KryptonButton kryptonButton5;
private Krypton.Toolkit.KryptonTaskDialog kryptonTaskDialog1;
+ private Krypton.Toolkit.KryptonButton kryptonButton9;
}
}
\ No newline at end of file
diff --git a/Source/Krypton Components/TestForm/Form1.cs b/Source/Krypton Components/TestForm/Form1.cs
index ba1d62a0b..344d8ca44 100644
--- a/Source/Krypton Components/TestForm/Form1.cs
+++ b/Source/Krypton Components/TestForm/Form1.cs
@@ -312,5 +312,12 @@ private void kryptonButton5_Click(object sender, EventArgs e)
{
kryptonTaskDialog1.ShowDialog();
}
+
+ private void kryptonButton9_Click(object sender, EventArgs e)
+ {
+ Form7 commandLinks = new Form7();
+
+ commandLinks.ShowDialog();
+ }
}
}
\ No newline at end of file
diff --git a/Source/Krypton Components/TestForm/Form1.resx b/Source/Krypton Components/TestForm/Form1.resx
index a8a986400..558f5cc03 100644
--- a/Source/Krypton Components/TestForm/Form1.resx
+++ b/Source/Krypton Components/TestForm/Form1.resx
@@ -117,6 +117,25 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK/SURBVDhPrZJbSNNRHMfPLrDmcpuFS21u5jTNwjShBwl8
+ iMKHeojyyfcgetOox9HLSKdmoYE1N28tZqSUZgmW5W3et7Y551Jzw43N4X95hUT/387mIKioHvrAl3P7
+ fb/8zuGQP3GtulrYb1AeiC3/nXy9/XKWMdhVaJoO+ayHAruzpGd1gFccO/6VQt1QfH7dlDK3YepqbrPb
+ mNPuh6p7DwVdS9j2JAAhgl0nB2tmTnugj3cl2CFQjbYScdRcpDYcONXkcuaYfOvZJj+yXm1B9TwEuXEV
+ ee2zYJw0wE2ABaplDvYcXHyzcTaZj1wXIte7dL0h7njT/KaKGtNNK0h76kdamx8pLSHkGp0IO6SAi4B1
+ RsSJzuEl2BzhbvWrEw9GAzJ1c6tK0yqUrT5W0bIMRfMyZIYgTrbOgLHSgBlqthOWtXPA2mjAHMHGADfc
+ W05ENEAdp3jkDie1rUHWGGRluiASdQGIGxio9C5sWESAgwbYCAsrNX+imiXY7idMb/kRESkpKeHl1w+6
+ ThjnkW1wIFtvR1ajDelPXCgwDMNrTkV4UoLwONVYRGJ8tUrg6ZHOqYsIP/qQX14fblp3JYCZkIIZl7LM
+ WHSEZ0SOM48HoKh3QFVvQXrdNI5RZercyLvb2RY1R9h4QS5gjLZG78dO0lYn6ThF2C2zEPKHdvC1QQir
+ vBBqvRDUBCDVuJF4493FmH2flQ5+M+xcYJy+tJlqlCA8KIaydgqCCg/iKz5DpF2E9L4P8rK3LTHbDyxq
+ iZTp5A3BFjFTDdOADxKkVk2Ar1mC8N4C4mv8SLrVN3y2VL3/iX7GqhXJgiZ+N0YjndCA92IkV4yDaPwQ
+ axaRXNb7JqekMilW/nseFGcI/AaeZruL7OwMSpBSZYfwtmX36M2XlcUZGYJY2d/x1ZJzDn3y6Ok7pgFZ
+ 6bPzse3/DSHfAf2EqkKNe37BAAAAAElFTkSuQmCC
+
+
539, 16
diff --git a/Source/Krypton Components/TestForm/Form7.Designer.cs b/Source/Krypton Components/TestForm/Form7.Designer.cs
new file mode 100644
index 000000000..601d117bd
--- /dev/null
+++ b/Source/Krypton Components/TestForm/Form7.Designer.cs
@@ -0,0 +1,236 @@
+namespace TestForm
+{
+ partial class Form7
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form7));
+ this.kryptonPanel1 = new Krypton.Toolkit.KryptonPanel();
+ this.kryptonCommandLinkButton5 = new Krypton.Toolkit.KryptonCommandLinkButton();
+ this.kryptonCommandLinkButton4 = new Krypton.Toolkit.KryptonCommandLinkButton();
+ this.kryptonCommandLinkButton3 = new Krypton.Toolkit.KryptonCommandLinkButton();
+ this.kryptonCommandLinkButton2 = new Krypton.Toolkit.KryptonCommandLinkButton();
+ this.kryptonAlternateCommandLinkButton1 = new Krypton.Toolkit.KryptonAlternateCommandLinkButton();
+ this.kryptonCommandLinkButton1 = new Krypton.Toolkit.KryptonCommandLinkButton();
+ ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
+ this.kryptonPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // kryptonPanel1
+ //
+ this.kryptonPanel1.Controls.Add(this.kryptonCommandLinkButton5);
+ this.kryptonPanel1.Controls.Add(this.kryptonCommandLinkButton4);
+ this.kryptonPanel1.Controls.Add(this.kryptonCommandLinkButton3);
+ this.kryptonPanel1.Controls.Add(this.kryptonCommandLinkButton2);
+ this.kryptonPanel1.Controls.Add(this.kryptonAlternateCommandLinkButton1);
+ this.kryptonPanel1.Controls.Add(this.kryptonCommandLinkButton1);
+ this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
+ this.kryptonPanel1.Name = "kryptonPanel1";
+ this.kryptonPanel1.Size = new System.Drawing.Size(690, 386);
+ this.kryptonPanel1.TabIndex = 0;
+ //
+ // kryptonCommandLinkButton5
+ //
+ this.kryptonCommandLinkButton5.ButtonStyle = Krypton.Toolkit.ButtonStyle.Standalone;
+ this.kryptonCommandLinkButton5.CommandLinkImageValues.DisplayUACShield = false;
+ this.kryptonCommandLinkButton5.CommandLinkImageValues.Image = null;
+ this.kryptonCommandLinkButton5.CommandLinkTextValues.Description = "What happens when the text is really long, \r\nand wants to go off the edge?\r\nThen " +
+ "Use a Multi-line ;-)\r\n";
+ this.kryptonCommandLinkButton5.CommandLinkTextValues.Heading = "&Control the World";
+ this.kryptonCommandLinkButton5.Location = new System.Drawing.Point(359, 12);
+ this.kryptonCommandLinkButton5.Name = "kryptonCommandLinkButton5";
+ this.kryptonCommandLinkButton5.OverrideFocus.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton5.OverrideFocus.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton5.OverrideFocus.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton5.Size = new System.Drawing.Size(319, 86);
+ this.kryptonCommandLinkButton5.StateCommon.Back.Color1 = System.Drawing.SystemColors.GradientActiveCaption;
+ this.kryptonCommandLinkButton5.StateCommon.Back.Color2 = System.Drawing.SystemColors.ActiveCaption;
+ this.kryptonCommandLinkButton5.StateCommon.Back.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton5.StateCommon.Border.Color1 = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.kryptonCommandLinkButton5.StateCommon.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton5.StateCommon.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton5.StateCommon.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton5.StateCommon.Border.Rounding = 6F;
+ this.kryptonCommandLinkButton5.StateCommon.Border.Width = 2;
+ this.kryptonCommandLinkButton5.StateCommon.Content.LongText.MultiLine = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton5.StateCommon.Content.LongText.MultiLineH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton5.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton5.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far;
+ this.kryptonCommandLinkButton5.StateCommon.Content.LongText.Trim = Krypton.Toolkit.PaletteTextTrim.Word;
+ this.kryptonCommandLinkButton5.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.kryptonCommandLinkButton5.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton5.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonCommandLinkButton5.TabIndex = 5;
+ //
+ // kryptonCommandLinkButton4
+ //
+ this.kryptonCommandLinkButton4.ButtonStyle = Krypton.Toolkit.ButtonStyle.NavigatorMini;
+ this.kryptonCommandLinkButton4.CommandLinkImageValues.DisplayUACShield = false;
+ this.kryptonCommandLinkButton4.CommandLinkImageValues.Image = ((System.Drawing.Image)(resources.GetObject("kryptonCommandLinkButton4.CommandLinkImageValues.Image")));
+ this.kryptonCommandLinkButton4.CommandLinkTextValues.Description = " Demo the Shortcut display and rounded borders";
+ this.kryptonCommandLinkButton4.CommandLinkTextValues.Heading = "&Disabled Navigator Mini style";
+ this.kryptonCommandLinkButton4.Enabled = false;
+ this.kryptonCommandLinkButton4.Location = new System.Drawing.Point(13, 315);
+ this.kryptonCommandLinkButton4.Name = "kryptonCommandLinkButton4";
+ this.kryptonCommandLinkButton4.OverrideFocus.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton4.OverrideFocus.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton4.OverrideFocus.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton4.Size = new System.Drawing.Size(340, 55);
+ this.kryptonCommandLinkButton4.StateCommon.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton4.StateCommon.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton4.StateCommon.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton4.StateCommon.Border.Rounding = 4F;
+ this.kryptonCommandLinkButton4.StateCommon.Border.Width = 2;
+ this.kryptonCommandLinkButton4.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton4.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far;
+ this.kryptonCommandLinkButton4.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.kryptonCommandLinkButton4.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton4.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonCommandLinkButton4.TabIndex = 4;
+ //
+ // kryptonCommandLinkButton3
+ //
+ this.kryptonCommandLinkButton3.ButtonStyle = Krypton.Toolkit.ButtonStyle.NavigatorMini;
+ this.kryptonCommandLinkButton3.CommandLinkImageValues.DisplayUACShield = false;
+ this.kryptonCommandLinkButton3.CommandLinkImageValues.Image = null;
+ this.kryptonCommandLinkButton3.CommandLinkTextValues.Description = " Demo the Shortcut display and rounded borders";
+ this.kryptonCommandLinkButton3.CommandLinkTextValues.Heading = "&Navigator Mini style";
+ this.kryptonCommandLinkButton3.Location = new System.Drawing.Point(12, 247);
+ this.kryptonCommandLinkButton3.Name = "kryptonCommandLinkButton3";
+ this.kryptonCommandLinkButton3.OverrideFocus.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton3.OverrideFocus.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton3.OverrideFocus.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton3.Size = new System.Drawing.Size(341, 61);
+ this.kryptonCommandLinkButton3.StateCommon.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton3.StateCommon.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton3.StateCommon.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton3.StateCommon.Border.Rounding = 4F;
+ this.kryptonCommandLinkButton3.StateCommon.Border.Width = 2;
+ this.kryptonCommandLinkButton3.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton3.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far;
+ this.kryptonCommandLinkButton3.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.kryptonCommandLinkButton3.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton3.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonCommandLinkButton3.TabIndex = 3;
+ //
+ // kryptonCommandLinkButton2
+ //
+ this.kryptonCommandLinkButton2.ButtonStyle = Krypton.Toolkit.ButtonStyle.Standalone;
+ this.kryptonCommandLinkButton2.CommandLinkImageValues.DisplayUACShield = false;
+ this.kryptonCommandLinkButton2.CommandLinkImageValues.Image = null;
+ this.kryptonCommandLinkButton2.CommandLinkTextValues.Description = " Here be the extra Text with some spaces";
+ this.kryptonCommandLinkButton2.CommandLinkTextValues.Heading = "Standalone Style";
+ this.kryptonCommandLinkButton2.Location = new System.Drawing.Point(12, 180);
+ this.kryptonCommandLinkButton2.Name = "kryptonCommandLinkButton2";
+ this.kryptonCommandLinkButton2.OverrideFocus.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton2.OverrideFocus.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton2.OverrideFocus.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton2.Size = new System.Drawing.Size(341, 61);
+ this.kryptonCommandLinkButton2.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton2.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far;
+ this.kryptonCommandLinkButton2.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.kryptonCommandLinkButton2.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton2.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonCommandLinkButton2.TabIndex = 2;
+ //
+ // kryptonAlternateCommandLinkButton1
+ //
+ this.kryptonAlternateCommandLinkButton1.Location = new System.Drawing.Point(12, 12);
+ this.kryptonAlternateCommandLinkButton1.Name = "kryptonAlternateCommandLinkButton1";
+ this.kryptonAlternateCommandLinkButton1.Size = new System.Drawing.Size(341, 69);
+ this.kryptonAlternateCommandLinkButton1.StateCommon.Content.Image.ImageH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonAlternateCommandLinkButton1.StateCommon.Content.Image.ImageV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonAlternateCommandLinkButton1.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonAlternateCommandLinkButton1.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far;
+ this.kryptonAlternateCommandLinkButton1.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonAlternateCommandLinkButton1.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonAlternateCommandLinkButton1.TabIndex = 1;
+ this.kryptonAlternateCommandLinkButton1.Values.ExtraText = "Text here is forced in to the lower part of the button";
+ this.kryptonAlternateCommandLinkButton1.Values.Image = ((System.Drawing.Image)(resources.GetObject("kryptonAlternateCommandLinkButton1.Values.Image")));
+ this.kryptonAlternateCommandLinkButton1.Values.Text = "Normal Krypton Button";
+ //
+ // kryptonCommandLinkButton1
+ //
+ this.kryptonCommandLinkButton1.CommandLinkImageValues.DisplayUACShield = false;
+ this.kryptonCommandLinkButton1.CommandLinkImageValues.UACShieldIconSize = Krypton.Toolkit.UACShieldIconSize.Small;
+ this.kryptonCommandLinkButton1.CommandLinkTextValues.Description = "Here be the \"Note Text\"";
+ this.kryptonCommandLinkButton1.CommandLinkTextValues.Heading = "Default Ext Command Link";
+ this.kryptonCommandLinkButton1.Location = new System.Drawing.Point(12, 99);
+ this.kryptonCommandLinkButton1.Name = "kryptonCommandLinkButton1";
+ this.kryptonCommandLinkButton1.OverrideFocus.Border.Draw = Krypton.Toolkit.InheritBool.True;
+ this.kryptonCommandLinkButton1.OverrideFocus.Border.DrawBorders = ((Krypton.Toolkit.PaletteDrawBorders)((((Krypton.Toolkit.PaletteDrawBorders.Top | Krypton.Toolkit.PaletteDrawBorders.Bottom)
+ | Krypton.Toolkit.PaletteDrawBorders.Left)
+ | Krypton.Toolkit.PaletteDrawBorders.Right)));
+ this.kryptonCommandLinkButton1.OverrideFocus.Border.GraphicsHint = Krypton.Toolkit.PaletteGraphicsHint.AntiAlias;
+ this.kryptonCommandLinkButton1.Size = new System.Drawing.Size(341, 61);
+ this.kryptonCommandLinkButton1.StateCommon.Content.LongText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton1.StateCommon.Content.LongText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Far;
+ this.kryptonCommandLinkButton1.StateCommon.Content.ShortText.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.kryptonCommandLinkButton1.StateCommon.Content.ShortText.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near;
+ this.kryptonCommandLinkButton1.StateCommon.Content.ShortText.TextV = Krypton.Toolkit.PaletteRelativeAlign.Center;
+ this.kryptonCommandLinkButton1.TabIndex = 0;
+ //
+ // Form7
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(690, 386);
+ this.Controls.Add(this.kryptonPanel1);
+ this.Name = "Form7";
+ this.Text = "Form7";
+ ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
+ this.kryptonPanel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private Krypton.Toolkit.KryptonPanel kryptonPanel1;
+ private Krypton.Toolkit.KryptonCommandLinkButton kryptonCommandLinkButton1;
+ private Krypton.Toolkit.KryptonCommandLinkButton kryptonCommandLinkButton5;
+ private Krypton.Toolkit.KryptonCommandLinkButton kryptonCommandLinkButton4;
+ private Krypton.Toolkit.KryptonCommandLinkButton kryptonCommandLinkButton3;
+ private Krypton.Toolkit.KryptonCommandLinkButton kryptonCommandLinkButton2;
+ private Krypton.Toolkit.KryptonAlternateCommandLinkButton kryptonAlternateCommandLinkButton1;
+ }
+}
\ No newline at end of file
diff --git a/Source/Krypton Components/TestForm/Form7.cs b/Source/Krypton Components/TestForm/Form7.cs
new file mode 100644
index 000000000..75f30409a
--- /dev/null
+++ b/Source/Krypton Components/TestForm/Form7.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+using Krypton.Toolkit;
+
+namespace TestForm
+{
+ public partial class Form7 : KryptonForm
+ {
+ public Form7()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Source/Krypton Components/TestForm/Form7.resx b/Source/Krypton Components/TestForm/Form7.resx
new file mode 100644
index 000000000..224a170ed
--- /dev/null
+++ b/Source/Krypton Components/TestForm/Form7.resx
@@ -0,0 +1,251 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
+ DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
+ bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
+ sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
+ AIABHmCAK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