From 295acbeada1168675e4c77118ea3774665aadd3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Krysi=C5=84ski?= Date: Wed, 19 Aug 2026 09:38:45 +0200 Subject: [PATCH 1/3] updated to pixilonia 12 --- src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj b/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj index 66cf706..53f1689 100644 --- a/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj +++ b/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj @@ -31,7 +31,7 @@ Originally developed for PixiEditor: https://github.com/PixiEditor/PixiEditor. - + From 4a976c3cb1aaab6963249c80134f72a3b9649b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Krysi=C5=84ski?= Date: Wed, 19 Aug 2026 16:45:36 +0200 Subject: [PATCH 2/3] got it to compile --- .../Behaviors/TextBoxFocusBehavior.cs | 11 +++++------ .../ColorPicker.AvaloniaUI.csproj | 16 ++-------------- .../Templates/GradientBar.axaml | 3 +-- .../Templates/HueSlider.axaml | 2 +- .../Templates/StandardColorPicker.axaml | 4 ++-- src/ColorPicker.Models/ColorPicker.Models.csproj | 2 +- 6 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/ColorPicker.AvaloniaUI/Behaviors/TextBoxFocusBehavior.cs b/src/ColorPicker.AvaloniaUI/Behaviors/TextBoxFocusBehavior.cs index ad3b3d0..639843d 100644 --- a/src/ColorPicker.AvaloniaUI/Behaviors/TextBoxFocusBehavior.cs +++ b/src/ColorPicker.AvaloniaUI/Behaviors/TextBoxFocusBehavior.cs @@ -72,18 +72,17 @@ private void AssociatedObject_KeyUp(object sender, KeyEventArgs e) private void RemoveFocus() { - var focusManager = TopLevel.GetTopLevel(AssociatedObject).FocusManager; + var focusManager = TopLevel.GetTopLevel(AssociatedObject)?.FocusManager; + if (focusManager == null) return; + var current = focusManager.GetFocusedElement(); if (current != null) { - //TODO: Find non obsolete way to do this - var next = KeyboardNavigationHandler.GetNext(AssociatedObject, NavigationDirection.Next); - next?.Focus(NavigationMethod.Tab); + focusManager.TryMoveFocus(NavigationDirection.Next); } } - private void AssociatedObjectGotKeyboardFocus( - object sender, GotFocusEventArgs e) + private void AssociatedObjectGotKeyboardFocus(object sender, FocusChangedEventArgs e) { if (SelectOnMouseClick || e.NavigationMethod == NavigationMethod.Tab) { diff --git a/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj b/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj index 53f1689..e667d50 100644 --- a/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj +++ b/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable disable true @@ -32,7 +32,7 @@ Originally developed for PixiEditor: https://github.com/PixiEditor/PixiEditor. - + @@ -44,12 +44,6 @@ Originally developed for PixiEditor: https://github.com/PixiEditor/PixiEditor. - - - ColorPickerTheme.axaml - - - True @@ -70,10 +64,4 @@ Originally developed for PixiEditor: https://github.com/PixiEditor/PixiEditor. - - - - ..\..\..\..\.nuget\packages\avalonia\11.0.5\ref\net6.0\Avalonia.Base.dll - - diff --git a/src/ColorPicker.AvaloniaUI/Templates/GradientBar.axaml b/src/ColorPicker.AvaloniaUI/Templates/GradientBar.axaml index a2faec3..e2186e8 100644 --- a/src/ColorPicker.AvaloniaUI/Templates/GradientBar.axaml +++ b/src/ColorPicker.AvaloniaUI/Templates/GradientBar.axaml @@ -2,7 +2,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:colorPicker="clr-namespace:ColorPicker" xmlns:converters="clr-namespace:ColorPicker.Converters" - xmlns:system="clr-namespace:System;assembly=System.Runtime" xmlns:models="clr-namespace:ColorPicker.Models;assembly=ColorPicker.Models"> @@ -49,7 +48,7 @@ - + diff --git a/src/ColorPicker.AvaloniaUI/Templates/HueSlider.axaml b/src/ColorPicker.AvaloniaUI/Templates/HueSlider.axaml index 65dce29..42b6736 100644 --- a/src/ColorPicker.AvaloniaUI/Templates/HueSlider.axaml +++ b/src/ColorPicker.AvaloniaUI/Templates/HueSlider.axaml @@ -10,7 +10,7 @@ - + diff --git a/src/ColorPicker.AvaloniaUI/Templates/StandardColorPicker.axaml b/src/ColorPicker.AvaloniaUI/Templates/StandardColorPicker.axaml index 71bf394..211eccf 100644 --- a/src/ColorPicker.AvaloniaUI/Templates/StandardColorPicker.axaml +++ b/src/ColorPicker.AvaloniaUI/Templates/StandardColorPicker.axaml @@ -89,7 +89,7 @@ - @@ -120,7 +120,7 @@ StartPointY="{Binding NotifyableGradient.LinearStartPointY, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" EndPointX="{Binding NotifyableGradient.LinearEndPointX, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" EndPointY="{Binding NotifyableGradient.LinearEndPointY, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" - StartGradientStop="{Binding GradientBrush.GradientStops[0], RelativeSource={RelativeSource TemplatedParent}}" + StartGradientStop="{ReflectionBinding GradientBrush.GradientStops[0], RelativeSource={RelativeSource TemplatedParent}}" EndGradientStop="{Binding GradientBrush.GradientStops, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource LastItemOfConverter}}" /> diff --git a/src/ColorPicker.Models/ColorPicker.Models.csproj b/src/ColorPicker.Models/ColorPicker.Models.csproj index 5659ffa..d4fc6c1 100644 --- a/src/ColorPicker.Models/ColorPicker.Models.csproj +++ b/src/ColorPicker.Models/ColorPicker.Models.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 ColorPicker.Models true PixiEditor.ColorPicker.Models From 655566cc8e27c3ddbcc612ef42e5582c4979ff68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Krysi=C5=84ski?= Date: Thu, 20 Aug 2026 13:28:50 +0200 Subject: [PATCH 3/3] Update ColorPicker.AvaloniaUI.csproj --- src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj b/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj index e667d50..5f05d65 100644 --- a/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj +++ b/src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj @@ -31,7 +31,7 @@ Originally developed for PixiEditor: https://github.com/PixiEditor/PixiEditor. - +