2017-11-27 13:11:20 -05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing.Design;
|
|
|
|
|
using System.Windows.Forms.Design;
|
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
namespace Vanara.Windows.Forms.Design;
|
|
|
|
|
|
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Never)]
|
|
|
|
|
internal class CommandLinkDesigner : AttributedControlDesigner<CommandLink>, IToolboxUser
|
2017-11-27 13:11:20 -05:00
|
|
|
|
{
|
2023-03-31 11:47:53 -04:00
|
|
|
|
public CommandLinkDesigner() { }
|
2017-11-27 13:11:20 -05:00
|
|
|
|
|
2023-09-29 13:58:35 -04:00
|
|
|
|
public override SelectionRules SelectionRules => SelectionRules.Visible | SelectionRules.AllSizeable | SelectionRules.Moveable;
|
2017-11-27 13:11:20 -05:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
protected override IEnumerable<string> PropertiesToRemove { get; } = new string[] { "AllowDrop", "AutoEllipsis", "BackColor",
|
|
|
|
|
"BackgroundImage", "BackgroundImageLayout", "ContextMenuStrip", "Cursor", "FlatStyle", "FlatAppearance", "Font",
|
|
|
|
|
"ForeColor", "ImageAlign", "ImageIndex", "ImageKey", "ImageList", "Padding", "TextAlign", "TextImageRelation",
|
|
|
|
|
"UseCompatibleTextRendering", "UseVisualStyleBackColor", "UseWaitCursor" };
|
2017-11-27 13:11:20 -05:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
public override void Initialize(IComponent component)
|
|
|
|
|
{
|
|
|
|
|
base.Initialize(component);
|
|
|
|
|
AutoResizeHandles = true;
|
|
|
|
|
}
|
2017-11-27 13:11:20 -05:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
bool IToolboxUser.GetToolSupported(ToolboxItem tool) => true;
|
2017-11-27 13:11:20 -05:00
|
|
|
|
|
2023-03-31 11:47:53 -04:00
|
|
|
|
void IToolboxUser.ToolPicked(ToolboxItem tool) { }
|
2017-11-27 13:11:20 -05:00
|
|
|
|
}
|