DotNet 4.8.1 build of DotNetBar

This commit is contained in:
2025-02-07 10:35:23 -05:00
parent 33439b63a0
commit 6b0a5d60f4
2609 changed files with 989814 additions and 7 deletions

View File

@@ -0,0 +1,35 @@
using System;
using System.Text;
using System.ComponentModel;
using System.Drawing;
using System.Collections;
namespace DevComponents.DotNetBar.Design
{
public class ColorPickerButtonDesigner : ButtonXDesigner
{
#if FRAMEWORK20
public override void InitializeNewComponent(IDictionary defaultValues)
{
base.InitializeNewComponent(defaultValues);
SetDesignTimeDefaults();
}
#else
public override void OnSetComponentDefaults()
{
base.OnSetComponentDefaults();
SetDesignTimeDefaults();
}
#endif
private void SetDesignTimeDefaults()
{
ColorPickerButton b = this.Control as ColorPickerButton;
TypeDescriptor.GetProperties(b)["Image"].SetValue(b, Helpers.LoadBitmap("SystemImages.ColorPickerButtonImage.png"));
TypeDescriptor.GetProperties(b)["SelectedColorImageRectangle"].SetValue(b, new Rectangle(2,2,12,12));
TypeDescriptor.GetProperties(b)["Text"].SetValue(b, "");
TypeDescriptor.GetProperties(b)["Size"].SetValue(b, new Size(37,23));
TypeDescriptor.GetProperties(b)["Style"].SetValue(b, eDotNetBarStyle.StyleManagerControlled);
}
}
}