Skip to content

Commit

Permalink
Merge pull request #1629 from Krypton-Suite/alpha-632-KPropertyGrid-B…
Browse files Browse the repository at this point in the history
…ackColour

- `KryptonPropertyGrid` now uses the State### sets like the rest of t…
  • Loading branch information
PWagner1 authored Jul 13, 2024
2 parents c961f80 + c1a3943 commit 275539d
Show file tree
Hide file tree
Showing 11 changed files with 989 additions and 193 deletions.
1 change: 1 addition & 0 deletions Documents/Changelog/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
=======

## 2024-11-xx - Build 2411 - November 2024
* Implemented [#632](https://github.com/Krypton-Suite/Standard-Toolkit/issues/632), **[Breaking Change]** `KryptonPropertyGrid` should have a customisable back colour.
* Resolved [#1583](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1583), `KryptonThemeComboBox` and `KrpytonThemeListBox` have the wrong designer assigned. Adds the `KryptonStubDesigner` internal class.
* Resolved [#1564](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1564), Disabled Button Text in Ribbons is not visible in some themes
* Resolved [#1607](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1607), "MS365 - Black" theme is unreadable
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ Follow the links to see the different objects and layouts that this framework al

## V90.## (2024-11-xx - Build 2411 - November 2024)
There are list of changes that have occurred during the development of the V90.## version
- [#632](https://github.com/Krypton-Suite/Standard-Toolkit/issues/632), **[Breaking Change]** `KryptonPropertyGrid` should have a customisable back colour.
- `KryptonPropertyGrid` now uses the State### sets like the rest of the controls.
- Any build breaks in the designers can just be deleted, as the the colouring will be done by the `State####` equivalents
- [#1435](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1435), **Breaking Change** Take KMB back to the Winform override (Remove Checkbox etc)
- and [#1432](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1432), **Breaking Change placeholder** Copy `KryptonMessageBox` to `KryptonMessageBoxDep`
- The introduction of new Parameters elements to the `KryptonMessageBox` is now supported in the `KryptonMessageBoxDep` class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public Size MaximumSize
[Category(@"Appearance")]
[Description(@"Text associated with the control.")]
[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
public string Text
public virtual string Text
{
get => ComboBox.Text;
set => ComboBox.Text = value;
Expand Down Expand Up @@ -491,7 +491,7 @@ public string DisplayMember
[Description(@"Controls the appearance and functionality of the KryptonComboBox.")]
[DefaultValue(typeof(ComboBoxStyle), nameof(DropDown))]
[RefreshProperties(RefreshProperties.Repaint)]
public ComboBoxStyle DropDownStyle
public virtual ComboBoxStyle DropDownStyle
{
get => ComboBox.DropDownStyle;
set => ComboBox.DropDownStyle = value;
Expand Down Expand Up @@ -589,7 +589,7 @@ public bool Sorted
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[MergableProperty(false)]
[Localizable(true)]
public ComboBox.ObjectCollection Items => ComboBox.Items;
public virtual ComboBox.ObjectCollection Items => ComboBox.Items;

/// <summary>
/// Gets and sets a value indicating if tooltips should be Displayed for button specs.
Expand Down Expand Up @@ -632,7 +632,7 @@ public bool AllowButtonSpecToolTipPriority
[EditorBrowsable(EditorBrowsableState.Always)]
[Localizable(true)]
[Browsable(true)]
public AutoCompleteStringCollection AutoCompleteCustomSource
public virtual AutoCompleteStringCollection AutoCompleteCustomSource
{
get => ComboBox.AutoCompleteCustomSource;
set => ComboBox.AutoCompleteCustomSource = value;
Expand All @@ -645,7 +645,7 @@ public AutoCompleteStringCollection AutoCompleteCustomSource
[DefaultValue(typeof(AutoCompleteMode), "None")]
[EditorBrowsable(EditorBrowsableState.Always)]
[Browsable(true)]
public AutoCompleteMode AutoCompleteMode
public virtual AutoCompleteMode AutoCompleteMode
{
get => ComboBox.AutoCompleteMode;
set => ComboBox.AutoCompleteMode = value;
Expand All @@ -658,7 +658,7 @@ public AutoCompleteMode AutoCompleteMode
[DefaultValue(typeof(AutoCompleteSource), "None")]
[EditorBrowsable(EditorBrowsableState.Always)]
[Browsable(true)]
public AutoCompleteSource AutoCompleteSource
public virtual AutoCompleteSource AutoCompleteSource
{
get => ComboBox.AutoCompleteSource;
set => ComboBox.AutoCompleteSource = value;
Expand All @@ -671,7 +671,7 @@ public AutoCompleteSource AutoCompleteSource
[Editor(@"System.Windows.Forms.Design.FormatStringEditor", typeof(UITypeEditor))]
[MergableProperty(false)]
[DefaultValue("")]
public string FormatString
public virtual string FormatString
{
get => ComboBox.FormatString;
set => ComboBox.FormatString = value;
Expand Down Expand Up @@ -1109,7 +1109,7 @@ private void OnPaletteNeedPaint(object sender, NeedLayoutEventArgs e) =>

private void OnComboBoxSelectionChangeCommitted(object sender, EventArgs e) => OnSelectionChangeCommitted(e);

private void OnComboBoxSelectedIndexChanged(object sender, EventArgs e) => OnSelectedIndexChanged(e);
private protected void OnComboBoxSelectedIndexChanged(object sender, EventArgs e) => OnSelectedIndexChanged(e);

private void OnComboBoxDropDownStyleChanged(object sender, EventArgs e) => OnDropDownStyleChanged(e);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Krypton.Ribbon
[DesignTimeVisible(false)]
[DefaultEvent("SelectedTextChanged")]
[DefaultProperty(nameof(Text))]
public class KryptonRibbonGroupThemeComboBox : KryptonRibbonGroupComboBox, IKryptonThemeSelectorBase
public sealed class KryptonRibbonGroupThemeComboBox : KryptonRibbonGroupComboBox, IKryptonThemeSelectorBase
{
// TODO: grouped Ribbon controls do expose designers, needs a closer look

Expand All @@ -42,8 +42,9 @@ public class KryptonRibbonGroupThemeComboBox : KryptonRibbonGroupComboBox, IKryp
#region Identity

/// <summary>Initializes a new instance of the <see cref="KryptonRibbonGroupThemeComboBox" /> class.</summary>
public KryptonRibbonGroupThemeComboBox() : base()
public KryptonRibbonGroupThemeComboBox()
{
ComboBox.SelectedIndexChanged -= OnComboBoxSelectedIndexChanged;
_manager = new KryptonManager();
DropDownStyle = ComboBoxStyle.DropDownList;

Expand All @@ -55,6 +56,7 @@ public KryptonRibbonGroupThemeComboBox() : base()

// React to theme changes from outside this control.
KryptonManager.GlobalPaletteChanged += KryptonManagerGlobalPaletteChanged;
ComboBox.SelectedIndexChanged -= OnComboBoxSelectedIndexChanged;
}

#endregion
Expand Down Expand Up @@ -127,7 +129,7 @@ protected override void OnSelectedIndexChanged(EventArgs e)
/// <summary>Gets and sets the text associated with the control.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new string Text
public override string Text
{
get => base.Text;
set => base.Text = value;
Expand All @@ -136,7 +138,7 @@ protected override void OnSelectedIndexChanged(EventArgs e)
/// <summary>Gets or sets the format specifier characters that indicate how a value is to be Displayed.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new string FormatString
public override string FormatString
{
get => base.FormatString;
set => base.FormatString = value;
Expand All @@ -145,7 +147,7 @@ protected override void OnSelectedIndexChanged(EventArgs e)
/// <summary>Gets and sets the appearance and functionality of the KryptonComboBox.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new ComboBoxStyle DropDownStyle
public override ComboBoxStyle DropDownStyle
{
get => base.DropDownStyle;
set => base.DropDownStyle = value;
Expand All @@ -154,12 +156,12 @@ protected override void OnSelectedIndexChanged(EventArgs e)
/// <summary>Gets or sets the items in the KryptonComboBox.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new ComboBox.ObjectCollection Items => base.Items;
public override ComboBox.ObjectCollection Items => base.Items;

/// <summary>Gets or sets the StringCollection to use when the AutoCompleteSource property is set to CustomSource.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new AutoCompleteStringCollection AutoCompleteCustomSource
public override AutoCompleteStringCollection AutoCompleteCustomSource
{
get => base.AutoCompleteCustomSource;
set => base.AutoCompleteCustomSource = value;
Expand All @@ -168,7 +170,7 @@ protected override void OnSelectedIndexChanged(EventArgs e)
/// <summary>Gets or sets the text completion behavior of the combobox.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new AutoCompleteMode AutoCompleteMode
public override AutoCompleteMode AutoCompleteMode
{
get => base.AutoCompleteMode;
set => base.AutoCompleteMode = value;
Expand All @@ -177,21 +179,11 @@ protected override void OnSelectedIndexChanged(EventArgs e)
/// <summary>Gets or sets the autocomplete source, which can be one of the values from AutoCompleteSource enumeration.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new AutoCompleteSource AutoCompleteSource
public override AutoCompleteSource AutoCompleteSource
{
get => base.AutoCompleteSource;
set => base.AutoCompleteSource = value;
}

/// <summary>Gets and sets the selected index.</summary>
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public new int SelectedIndex
{
get => base.SelectedIndex;
set => base.SelectedIndex = value;
}

#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ private class InternalListView : ListView
/// <param name="kryptonListView">Reference to owning control.</param>
public InternalListView(KryptonListView kryptonListView)
{
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.ResizeRedraw
| ControlStyles.AllPaintingInWmPaint
| ControlStyles.OptimizedDoubleBuffer, true);

_kryptonListView = kryptonListView;

Expand Down
Loading

0 comments on commit 275539d

Please sign in to comment.