Well, here we are! Turns out one of the changes I made for 1.9.7 caused the FontSelectDialog to cause program crashes. Soooo that's not great.
I figured that while I was taking the time to make changes to the FontSelectDialog for this, I would also add in a few more things that I could backport from 2.0. This did end up creating some breaking changes, but I think the net positive makes it all worth it.
After this, my focus is back to working on version 2.0. I'm still aiming to release it in the first half of 2024, but it probably won't be before April, let's be realistic. But I am still making progress! I did have to take a short break to avoid burnout though (and also to care for a medical issue our pet dog was dealing with lol). But hopefully now I'll be good to focus more time on programming now!
Consume the library
🍔🍦
One of three ways:
- Get the library from NuGet
- Download the binaries below!
- Versions for .NET Framework 4.7.1 and 4.8, .NET 6, and .NET 7!
- Build it yourself from code!
Breaking Changes
FlatButton
'sIsSelectedChanged
event is changed to use SolidShineUi'sItemSelectionChangedEventHandler
(rather thanDependencyPropertyChangedEventHandler
). The only change you'll need to do will be updating the actual method definitions as follows:- Change
myButton_IsSelectionChanged(object sender, DependencyPropertyChangedEventArgs e)
tomyButton_IsSelectionChanged(object sender, ItemSelectionChangedEventArgs e)
- Change
SelectableUserControl
'sIsSelectedChanged
event is changed to useSolidShineUi.ItemSelectionChangedEventHandler
, rather thanSolidShineUi.SelectableUserControl.ItemSelectionChangedEventHandler
- no functional difference, just easier to type!- The obsolete SelectionChanged event is still using the old event handler delegate
SelectableUserControl
's Click event and RightClick event have been changed to routed events - if you listen to these events, make sure to update your listeners to useRoutedEventArgs
andRoutedEventHandler
- The Items and ItemsSource properties in SelectPanel are changed to an enumerable/collection of
IClickSelectableControl
, rather thanSelectableUserControl
- If you refer to these properties' types, you'll have to change them to
IEnumerable<IClickSelectableControl>
orSelectableCollection<IClickSelectableControl>
- This also affects the type of
SelectPanel.Items.SelectedItems
- this is also nowReadOnlyCollection<IClickSelectableControl>
IClickSelectableControl
has a notably smaller set of methods/properties than a UserControl (such as SelectableUserControl); if you need to access a method or property not inIClickSelectableControl
, you'll need to cast to aSelectableUserControl
or whatever type is relevant for you
- If you refer to these properties' types, you'll have to change them to
- Most
IValueConverter
objects in SolidShineUi now returnDependencyProperty.UnsetValue
when an invalid value is passed in, rather than returning null or throwing an exception- This seems to be more in line with what's expected from IValueConverters in WPF
Reminders for version 2.0
For version 2.0, here's some info to keep in mind. I'm trying to avoid too drastic of breaking changes, but there's no better time to introduce such changes than in a major version number increase like this.
So that in mind, keep this handy for when version 2.0 ends up dropping:
- Support for .NET Core 3.1 will be dropped in version 2.0. I suggest upgrading to .NET 6 or .NET 8, the new LTS releases.
ExperimentalPropertyList
will be renamed to justPropertyList
ISelectableCollectionSource
is being renamed to justISelectableCollection
- The obsolete methods in SelectPanel and MessageDialog will be removed - please adjust to the suggested replacements
The breaking changes in this version are all stuff backported from 2.0, so if you adjust to these changes here, it'll be less to transition when you upgrade to 2.0!
Changelog
- Rewrote how
FontSelectDialog
handles font weight- Font weight is now displayed and stored as an integer, rather than just being a list of items to select from
- This way, more fine weight control is possible - for the few fonts that actually support this
- With this, the crashes and issues present in 1.9.7 are no longer present
- Added more buttons!
- Backported from 2.0
- FlatRepeatButton
- Like a regular FlatButton, but its Execute event continues to activate while you're holding the button down
- Also has PressBegan and PressEnded events too
- And it also supports commands for all of these!
- SplitButton
- Basically a FlatButton and MenuButton smashed into one! Click the main button on the left for the primary action, or click on the menu to display additional options.
- A staple for more advanced UI designs, in my eyes, but it is surprisingly not present in WPF
- Feels like it covers everything needed of a split button, but if I have ideas of what more to do with it later, I'll add it after 2.0
- Added
IClickSelectableCollection
interface- Backported from 2.0
FlatButton
,MenuButton
,SplitButton
, andSelectableUserControl
all follow this interface- If you build a control or UserControl that implements this interface, it can be used with SelectPanel! - you no longer need to build from
SelectableUserControl
- Changes to SelectPanel, SelectableUserControl
- SelectPanel's Items property is now a collection of
IClickSelectableControl
, rather thanSelectableUserControl
- This provides more flexibility for other developers to build controls that can be used with SelectPanel
- SelectableUserControl's Click and RightClick events are now routed events
- SelectPanel's Items property is now a collection of
- Other changes
FlatButton
'sIsSelectedChanged
event args has changed - see the breaking changes section- Most WPF converters (
IValueConverter
objects) now returnDependencyProperty.UnsetValue
when an invalid value is passed on- Rather than returning null or throwing an exception
- This seems to be more in line with what's expected with WPF, although I don't think WPF itself always adheres to this
- Hidden tabs in TabControl will now also be hidden in the tab list menu
- Minor change to
AutoCompleteBehavior
to quick-exit if we already have a suggested string - New WPF value converters:
PartialThicknessConverter
andPartialCornerRadiusConverter
- Use this to select which edges or corners of an element to apply a uniform Thickness or CornerRadius value onto
- Pass in the Thickness or CornerRadius as the value, and pass a filter value as the converter parameter (which can be a string of a comma-separated list of edges/corners)
- Use
PartialValueHelper
if you need assistance on getting the filter values - Used with SplitButton, but may have other uses in more controls
- Font weight is now displayed and stored as an integer, rather than just being a list of items to select from