diff --git a/Documents/Changelog/Changelog.md b/Documents/Changelog/Changelog.md index 9abc30957..f663052cf 100644 --- a/Documents/Changelog/Changelog.md +++ b/Documents/Changelog/Changelog.md @@ -3,6 +3,7 @@ ======= ## 2025-11-xx - Build 2511 - November 2025 +* Resolved [#1977](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1977), When a control is set to anchor to the bottom, the control can be stretched beyond the form bottom. * Resolved [#1964](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1964), `KryptonTreeView` Node crosses are not Dpi Scaled * Implemented [#1968](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1968), Open up 'ExceptionHandler' for public use - To invoke, use `KryptonExceptionHandler` @@ -22,7 +23,7 @@ * Resolved [#980](https://github.com/Krypton-Suite/Standard-Toolkit/issues/980), `KryptonDockableNavigator` with pages without `AllowConfigSave` flag are incorrectly saved * Resolved [#1909](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1909), `KryptonDataGridViewComboBoxCell` displays an empty drop-down list on the first new row. * Resolved [#1910](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1910), `Workspace Persistence` -> "Save to array" Causes an exception in `Toolkit.XmlHelper.Image.Save` -* Implemented [#1177](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1177), Is it possible to have the KForm back colour as the KPanel colour +* Implemented [#1117](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1117), Is it possible to have the KForm back colour as the KPanel colour * Resolved [#1900](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1900), Remove Obsolete `KryptonMessageBoxDep` from V100 code base * Resolved [#1211](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1211), Button 'drop down' arrows should use palette text colour * Resolved [#1212](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1212), **[Breaking Change]** `KColorButton` 'drop-down' arrow should be drawn diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuCheckBox.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuCheckBox.cs index b8f3864be..240fbb1ae 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuCheckBox.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuCheckBox.cs @@ -206,7 +206,6 @@ public string Text [KryptonPersist] [Category(@"Appearance")] [Description(@"Check box extra text.")] - [DefaultValue(null)] [Localizable(true)] [AllowNull] public string ExtraText @@ -223,6 +222,8 @@ public string ExtraText } } + private bool ShouldSerializeExtraText() => !string.IsNullOrEmpty(_extraText); + /// <summary> /// Gets and sets the check box image. /// </summary> diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuHeading.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuHeading.cs index 67541437d..692d8c826 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuHeading.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuHeading.cs @@ -165,7 +165,6 @@ public string Text [Description(@"Heading menu item extra text.")] [Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))] [Localizable(true)] - [DefaultValue("")] [AllowNull] public string ExtraText { @@ -180,6 +179,7 @@ public string ExtraText } } } + private bool ShouldSerializeExtraText() => !string.IsNullOrEmpty(_extraText); /// <summary> /// Gets and sets the heading menu item image. diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItem.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItem.cs index 5af06551b..b2ccf1048 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItem.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuItem.cs @@ -253,7 +253,6 @@ public string Text [Category(@"Appearance")] [Description(@"Standard menu item extra text.")] [Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))] - [DefaultValue(@"")] [Localizable(true)] [Bindable(true)] public string ExtraText @@ -269,6 +268,7 @@ public string ExtraText } } } + private bool ShouldSerializeExtraText() => !string.IsNullOrEmpty(_extraText); /// <summary> /// Gets and sets the standard menu item image. diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuLinkLabel.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuLinkLabel.cs index 0c5ee5950..19b415aff 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuLinkLabel.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuLinkLabel.cs @@ -261,7 +261,6 @@ public string Text [KryptonPersist] [Category(@"Appearance")] [Description(@"Link label extra text.")] - [DefaultValue(null)] [Localizable(true)] public string? ExtraText { @@ -276,6 +275,7 @@ public string? ExtraText } } } + private bool ShouldSerializeExtraText() => !string.IsNullOrEmpty(_extraText); /// <summary> /// Gets and sets the link label image. diff --git a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuRadioButton.cs b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuRadioButton.cs index d5ca5be22..e84d6e478 100644 --- a/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuRadioButton.cs +++ b/Source/Krypton Components/Krypton.Toolkit/ContextMenu/KryptonContextMenuRadioButton.cs @@ -194,7 +194,6 @@ public string Text [KryptonPersist] [Category(@"Appearance")] [Description(@"Radio button extra text.")] - [DefaultValue(null)] [Localizable(true)] public string? ExtraText { @@ -209,6 +208,7 @@ public string? ExtraText } } } + private bool ShouldSerializeExtraText() => !string.IsNullOrEmpty(_extraText); /// <summary> /// Gets and sets the radio button image. diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs index 3eee9f1f6..295dc8872 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonForm.cs @@ -439,6 +439,10 @@ public void SetInheritedControlOverride() { get { + if (_internalKryptonPanel.Controls.Count == 0) + { + _internalKryptonPanel.ClientSize = ClientSize; + } // Deal with adding after the `InitializeComponent` has completed return _foundRibbonOffset == -1 ? _internalKryptonPanel.Controls diff --git a/Source/Krypton Components/TestForm/DataGridViewTest.Designer.cs b/Source/Krypton Components/TestForm/DataGridViewTest.Designer.cs index 791a8f9f7..e34390d5d 100644 --- a/Source/Krypton Components/TestForm/DataGridViewTest.Designer.cs +++ b/Source/Krypton Components/TestForm/DataGridViewTest.Designer.cs @@ -84,11 +84,11 @@ private void InitializeComponent() // this.kryptonPanel1.Controls.Add(this.kryptonBorderEdge1); this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.kryptonPanel1.Location = new System.Drawing.Point(0, 567); - this.kryptonPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonPanel1.Location = new System.Drawing.Point(0, 511); + this.kryptonPanel1.Margin = new System.Windows.Forms.Padding(4); this.kryptonPanel1.Name = "kryptonPanel1"; this.kryptonPanel1.PanelBackStyle = Krypton.Toolkit.PaletteBackStyle.PanelAlternate; - this.kryptonPanel1.Size = new System.Drawing.Size(1645, 62); + this.kryptonPanel1.Size = new System.Drawing.Size(1661, 62); this.kryptonPanel1.TabIndex = 0; // // kryptonBorderEdge1 @@ -96,9 +96,9 @@ private void InitializeComponent() this.kryptonBorderEdge1.BorderStyle = Krypton.Toolkit.PaletteBorderStyle.HeaderSecondary; this.kryptonBorderEdge1.Dock = System.Windows.Forms.DockStyle.Top; this.kryptonBorderEdge1.Location = new System.Drawing.Point(0, 0); - this.kryptonBorderEdge1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonBorderEdge1.Margin = new System.Windows.Forms.Padding(4); this.kryptonBorderEdge1.Name = "kryptonBorderEdge1"; - this.kryptonBorderEdge1.Size = new System.Drawing.Size(1645, 1); + this.kryptonBorderEdge1.Size = new System.Drawing.Size(1661, 1); this.kryptonBorderEdge1.Text = "kryptonBorderEdge1"; // // kryptonPanel2 @@ -113,25 +113,27 @@ private void InitializeComponent() this.kryptonPanel2.Controls.Add(this.kryptonPropertyGrid1); this.kryptonPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel2.Location = new System.Drawing.Point(0, 0); - this.kryptonPanel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonPanel2.Margin = new System.Windows.Forms.Padding(4); this.kryptonPanel2.Name = "kryptonPanel2"; - this.kryptonPanel2.Size = new System.Drawing.Size(1645, 567); + this.kryptonPanel2.Size = new System.Drawing.Size(1661, 511); this.kryptonPanel2.TabIndex = 1; // // kryptonDataGridView1 // + this.kryptonDataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.kryptonDataGridView1.AutoGenerateColumns = false; - this.kryptonDataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.kryptonDataGridView1.ColumnHeadersHeight = 36; this.kryptonDataGridView1.DataMember = "TestData"; this.kryptonDataGridView1.DataSource = this.dataSet; this.kryptonDataGridView1.GridStyles.Style = Krypton.Toolkit.DataGridViewStyle.Mixed; this.kryptonDataGridView1.KryptonContextMenu = this.kryptonContextMenu1; this.kryptonDataGridView1.Location = new System.Drawing.Point(17, 15); - this.kryptonDataGridView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonDataGridView1.Margin = new System.Windows.Forms.Padding(4); this.kryptonDataGridView1.Name = "kryptonDataGridView1"; this.kryptonDataGridView1.RowHeadersWidth = 51; - this.kryptonDataGridView1.Size = new System.Drawing.Size(1160, 310); + this.kryptonDataGridView1.Size = new System.Drawing.Size(1170, 275); this.kryptonDataGridView1.TabIndex = 2; // // dataSet @@ -210,26 +212,16 @@ private void InitializeComponent() this.kryptonContextMenuImageSelect1, this.kryptonContextMenuMonthCalendar1}); // - // kryptonContextMenuHeading1 - // - this.kryptonContextMenuHeading1.ExtraText = ""; - // - // kryptonContextMenuCheckBox1 - // - this.kryptonContextMenuCheckBox1.ExtraText = ""; - // // kryptonContextMenuCheckButton1 // this.kryptonContextMenuCheckButton1.Text = "CheckButton"; // // kryptonContextMenuRadioButton1 // - this.kryptonContextMenuRadioButton1.ExtraText = ""; this.kryptonContextMenuRadioButton1.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; // // kryptonContextMenuLinkLabel1 // - this.kryptonContextMenuLinkLabel1.ExtraText = ""; this.kryptonContextMenuLinkLabel1.LabelStyle = Krypton.Toolkit.LabelStyle.NormalControl; // // kryptonContextMenuColorColumns1 @@ -239,7 +231,7 @@ private void InitializeComponent() // kryptonLabel1 // this.kryptonLabel1.Location = new System.Drawing.Point(456, 335); - this.kryptonLabel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonLabel1.Margin = new System.Windows.Forms.Padding(4); this.kryptonLabel1.Name = "kryptonLabel1"; this.kryptonLabel1.Size = new System.Drawing.Size(295, 26); this.kryptonLabel1.TabIndex = 8; @@ -248,7 +240,7 @@ private void InitializeComponent() // kryptonButton1 // this.kryptonButton1.Location = new System.Drawing.Point(15, 486); - this.kryptonButton1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonButton1.Margin = new System.Windows.Forms.Padding(4); this.kryptonButton1.Name = "kryptonButton1"; this.kryptonButton1.Size = new System.Drawing.Size(432, 36); this.kryptonButton1.TabIndex = 7; @@ -258,7 +250,7 @@ private void InitializeComponent() // buttonClearCellColors // this.buttonClearCellColors.Location = new System.Drawing.Point(15, 443); - this.buttonClearCellColors.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.buttonClearCellColors.Margin = new System.Windows.Forms.Padding(4); this.buttonClearCellColors.Name = "buttonClearCellColors"; this.buttonClearCellColors.Size = new System.Drawing.Size(432, 36); this.buttonClearCellColors.TabIndex = 6; @@ -268,7 +260,7 @@ private void InitializeComponent() // buttonRandomCellColors // this.buttonRandomCellColors.Location = new System.Drawing.Point(16, 401); - this.buttonRandomCellColors.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.buttonRandomCellColors.Margin = new System.Windows.Forms.Padding(4); this.buttonRandomCellColors.Name = "buttonRandomCellColors"; this.buttonRandomCellColors.Size = new System.Drawing.Size(432, 36); this.buttonRandomCellColors.TabIndex = 5; @@ -281,7 +273,7 @@ private void InitializeComponent() this.kcmbGridStyle.DropDownWidth = 323; this.kcmbGridStyle.IntegralHeight = false; this.kcmbGridStyle.Location = new System.Drawing.Point(17, 368); - this.kcmbGridStyle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kcmbGridStyle.Margin = new System.Windows.Forms.Padding(4); this.kcmbGridStyle.Name = "kcmbGridStyle"; this.kcmbGridStyle.Size = new System.Drawing.Size(431, 26); this.kcmbGridStyle.StateCommon.ComboBox.Content.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; @@ -293,7 +285,7 @@ private void InitializeComponent() this.kryptonThemeComboBox1.DropDownWidth = 323; this.kryptonThemeComboBox1.IntegralHeight = false; this.kryptonThemeComboBox1.Location = new System.Drawing.Point(17, 334); - this.kryptonThemeComboBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonThemeComboBox1.Margin = new System.Windows.Forms.Padding(4); this.kryptonThemeComboBox1.Name = "kryptonThemeComboBox1"; this.kryptonThemeComboBox1.Size = new System.Drawing.Size(431, 26); this.kryptonThemeComboBox1.StateCommon.ComboBox.Content.TextH = Krypton.Toolkit.PaletteRelativeAlign.Near; @@ -302,7 +294,7 @@ private void InitializeComponent() // kryptonPropertyGrid1 // this.kryptonPropertyGrid1.Location = new System.Drawing.Point(1184, 15); - this.kryptonPropertyGrid1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.kryptonPropertyGrid1.Margin = new System.Windows.Forms.Padding(4); this.kryptonPropertyGrid1.Name = "kryptonPropertyGrid1"; this.kryptonPropertyGrid1.Padding = new System.Windows.Forms.Padding(1); this.kryptonPropertyGrid1.Size = new System.Drawing.Size(445, 528); @@ -313,10 +305,10 @@ private void InitializeComponent() // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1645, 629); + this.ClientSize = new System.Drawing.Size(1661, 573); this.Controls.Add(this.kryptonPanel2); this.Controls.Add(this.kryptonPanel1); - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "DataGridViewTest"; this.Text = "DataGridViewTest"; this.Load += new System.EventHandler(this.DataGridViewTest_Load);