PR Add new ColorSlider & ColorPreviewer Primitives #8050 ColorPickerSlider ColorChannelSlider ColorSlider.PR Add new ColorSpectrum Primitive #7842 PR Add new DropDownButton Control #7838 DropDownButton Add DropDownButton porting over from WinUI #4960.This also simplified control, but in another way.Įach of these components will be implemented in a separate PR so there is a chance it can be reviewed sanely: It wasn't possible in UWP/WinUI, but possible in WPF/Avalonia, and I usually prefer moving UI logic to the xaml files, where it's possible. I recently removed quite a lot of code required to build checkered background and fade-in background, and replaced it with brushes/opacitymask declared in the XAML. This was not possible in UWP/WinUI so it's rather ugly how it's done there. The checkered background can be done using a TileBrush like what was possible in WPF.This would align the control quite a bit more with XAML concepts. There are other architectural/naming changes I would like to make based on this document and discussed a little with here.Everything is going to go inside a new ColorPicker directory - including the primitives.ColorPicker will host this in a drop down button flyout. ColorView : This is the 'canvas' version of the control that does not have a drop down button.ColorPresenter : A control that previews a color with optional accent colors to the side.ColorSlider : This is NOT based on the WinUI code and is a complete rewrite.Features are largely the same and perhaps only a few properties are renamed. ColorSpectrum : This will be a refactored port of the WinUI code.All other pickers are already drop downs so ColorPicker was originally named incorrectly in WinUI (this was discussed in that repo). ColorPicker : This is the main control to use for color selection and appears as a drop down button.Note that adding so many individual controls greatly increases composability and the ability to customize for specific app needs. Deviations from all previous implementations will be made so that this control fully integrates with Avalonia and fixes past mistakes. I would also encourage everyone to try out the Windows Community Toolkit 7.0 or later to get an understanding of the ColorPicker changes I'm talking about What I want to get a feel for is how people would accept larger deviations from WinUI such as the control names themselves and the property name updates (ThirdDimension -> ThirdChannel) etc. There are other architectural/naming changes I would like to make based on this document and discussed a little with here. The WPF toolkit had better names for these controls though (WinUI's ColorPicker is really a ColorCanvas and the ColorPickerButton is really what the ColorPicker should be). I go back and forth between doing a clean reimplementation fixing all the wrongs with WinUI or just porting over directly from the WCT and using port as-is. I still have not figured out exactly what the implementation will look like. With DropDownButton I think this ColorPicker concept itself becomes unblocked. With Flyout almost added that unblocks DropDownButton which I plan to have implemented along with the other remaining WinUI button types.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |