Comments (12)
I think this might be duplicate of #21 and probably fixed by cdb406e
from colorpicker.
Yeah I was just thinking the same as I was reviewing your fix. It's almost certainly the same issue.
I had wondered if it was possibly picking up mouse values from outside it's Bounds
hence the NaN
but I think you're right.
from colorpicker.
Yeah I was just thinking the same as I was reviewing your fix. It's almost certainly the same issue.
I had wondered if it was possibly picking up mouse values from outside it's
Bounds
hence theNaN
but I think you're right.
Oh NaN that might be different issue
from colorpicker.
Added coercion for NaN values so exception can be avoided hopefully
from colorpicker.
Sounds like a good idea
from colorpicker.
Release version 0.10.17 with a fix
from colorpicker.
Yeah I tested this the other day, still seems to be crashing my app so I need to do a bit more digging on this one.
from colorpicker.
Still seeing some odd issues with 0.10.17 unfortunately.
If I remove any Binding
on Color
and run the app, viewing the page with the ColorPicker
on immediately bombs the app.
I decided to remove all of my logic and so just set the Color property to a fixed value with no binding:
<colorPicker:ColorPicker x:Name="main"
Grid.ColumnSpan="2"
Margin="10"
Color="White">
<colorPicker:ColorPicker.Styles>
<Style Selector="colorPicker|ColorPicker /template/ colorPicker|ColorPickerValuesPresenter">
<Setter Property="MinHeight" Value="200" />
<Setter Property="MinWidth" Value="200" />
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="colorPicker|ColorPicker /template/ colorPicker|ColorPickerPropertiesPresenter#PART_ColorPickerPropertiesPresenter">
<Setter Property="(DockPanel.Dock)" Value="Right" />
<Setter Property="IsVisible" Value="False" />
</Style>
</colorPicker:ColorPicker.Styles>
</colorPicker:ColorPicker>
Viewing the page works just fine. But dragging the color thumb to the bottom of the ColorPickerValuesPresenter
viewable area is still bombing the app.
System.ArgumentException: Invalid Value value.
at ThemeEditor.Controls.ColorPicker.Props.HsvProperties.ValidateValue(Nullable`1 value) in /_/src/ThemeEditor.Controls.ColorPicker/Props/HsvProperties.cs:line 86
at Avalonia.ValueStore.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/ValueStore.cs:line 98
at Avalonia.AvaloniaObject.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 367
at ThemeEditor.Controls.ColorPicker.Props.HsvProperties.set_Value(Nullable`1 value) in /_/src/ThemeEditor.Controls.ColorPicker/Props/HsvProperties.cs:line 115
at ThemeEditor.Controls.ColorPicker.Props.HsvProperties.UpdatePropertyValues() in /_/src/ThemeEditor.Controls.ColorPicker/Props/HsvProperties.cs:line 137
at ThemeEditor.Controls.ColorPicker.ColorPickerProperties.<OnColorPickerChange>b__12_2(Nullable`1 _) in /_/src/ThemeEditor.Controls.ColorPicker/ColorPickerProperties.cs:line 55
at System.Reactive.AnonymousObserver`1.OnNextCore(T value) in /_/Rx.NET/Source/src/System.Reactive/AnonymousObserver.cs:line 67
at System.Reactive.ObserverBase`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/ObserverBase.cs:line 34
at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value) in /_/src/Avalonia.Base/Reactive/LightweightObservableBase.cs:line 139
at Avalonia.Reactive.AvaloniaPropertyObservable`1.PropertyChanged(Object sender, AvaloniaPropertyChangedEventArgs e) in /_/src/Avalonia.Base/Reactive/AvaloniaPropertyObservable.cs:line 67
at Avalonia.AvaloniaObject.RaisePropertyChanged[T](AvaloniaPropertyChangedEventArgs`1 change) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 761
at Avalonia.AvaloniaObject.Avalonia.PropertyStore.IValueSink.ValueChanged[T](AvaloniaPropertyChangedEventArgs`1 change) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 531
at Avalonia.ValueStore.NotifyValueChanged[T](AvaloniaProperty`1 property, Optional`1 oldValue, BindingValue`1 newValue, BindingPriority priority) in /_/src/Avalonia.Base/ValueStore.cs:line 355
at Avalonia.ValueStore.SetExisting[T](Object slot, StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/ValueStore.cs:line 284
at Avalonia.ValueStore.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/ValueStore.cs:line 107
at Avalonia.AvaloniaObject.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 367
at ThemeEditor.Controls.ColorPicker.ColorPickerValuesPresenter.set_Value3(Nullable`1 value) in /_/src/ThemeEditor.Controls.ColorPicker/ColorPickerValuesPresenter.cs:line 55
at ThemeEditor.Controls.ColorPicker.ColorPickerValuesPresenter.UpdateValuesFromThumbs() in /_/src/ThemeEditor.Controls.ColorPicker/ColorPickerValuesPresenter.cs:line 219
at ThemeEditor.Controls.ColorPicker.ColorPickerValuesPresenter.ColorCanvas_PointerMoved(Object sender, PointerEventArgs e) in /_/src/ThemeEditor.Controls.ColorPicker/ColorPickerValuesPresenter.cs:line 310
at Avalonia.Interactivity.Interactive.<AddHandler>g__InvokeAdapter|4_0[TEventArgs](Delegate baseHandler, Object sender, RoutedEventArgs args) in /_/src/Avalonia.Interactivity/Interactive.cs:line 62
at Avalonia.Interactivity.Interactive.<>c__4`1.<AddHandler>b__4_1(Delegate baseHandler, Object sender, RoutedEventArgs args) in /_/src/Avalonia.Interactivity/Interactive.cs:line 68
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 167
at Avalonia.Interactivity.EventRoute.RaiseEvent(IInteractive source, RoutedEventArgs e) in /_/src/Avalonia.Interactivity/EventRoute.cs:line 101
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) in /_/src/Avalonia.Interactivity/Interactive.cs:line 122
at Avalonia.Input.MouseDevice.MouseMove(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties properties, KeyModifiers inputModifiers, Lazy`1 intermediatePoints) in /_/src/Avalonia.Input/MouseDevice.cs:line 292
at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 182
at Avalonia.Input.MouseDevice.ProcessRawEvent(RawInputEventArgs e) in /_/src/Avalonia.Input/MouseDevice.cs:line 90
at Avalonia.Input.InputManager.ProcessInput(RawInputEventArgs e) in /_/src/Avalonia.Input/InputManager.cs:line 35
at Avalonia.Controls.TopLevel.HandleInput(RawInputEventArgs e) in /_/src/Avalonia.Controls/TopLevel.cs:line 508
at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs:line 520
at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) in /_/src/Windows/Avalonia.Win32/WindowImpl.WndProc.cs:line 30
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) in /_/src/Windows/Avalonia.Win32/Win32Platform.cs:line 210
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
from colorpicker.
I've removed all my logic and tested again.
This control is still bombing my application.
<colorPicker:ColorPicker x:Name="main"
Grid.ColumnSpan="2"
Margin="10"
Color="White">
<colorPicker:ColorPicker.Styles>
<Style Selector="colorPicker|ColorPicker /template/ colorPicker|ColorPickerValuesPresenter">
<Setter Property="MinHeight" Value="200" />
<Setter Property="MinWidth" Value="200" />
<Setter Property="IsVisible" Value="True" />
</Style>
<Style Selector="colorPicker|ColorPicker /template/ colorPicker|ColorPickerPropertiesPresenter#PART_ColorPickerPropertiesPresenter">
<Setter Property="(DockPanel.Dock)" Value="Right" />
<Setter Property="IsVisible" Value="False" />
</Style>
</colorPicker:ColorPicker.Styles>
</colorPicker:ColorPicker>
System.ArgumentException: Invalid Value value.
at ThemeEditor.Controls.ColorPicker.Props.HsvProperties.ValidateValue(Nullable`1 value) in /_/src/ThemeEditor.Controls.ColorPicker/Props/HsvProperties.cs:line 86
at Avalonia.ValueStore.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/ValueStore.cs:line 98
at Avalonia.AvaloniaObject.SetValue[T](StyledPropertyBase`1 property, T value, BindingPriority priority) in /_/src/Avalonia.Base/AvaloniaObject.cs:line 367
at ThemeEditor.Controls.ColorPicker.Props.HsvProperties.set_Value(Nullable`1 value) in /_/src/ThemeEditor.Controls.ColorPicker/Props/HsvProperties.cs:line 115
at ThemeEditor.Controls.ColorPicker.Props.HsvProperties.UpdatePropertyValues() in /_/src/ThemeEditor.Controls.ColorPicker/Props/HsvProperties.cs:line 137
from colorpicker.
I have refactored master branch and changed how validation and coercion of values works
from colorpicker.
Ahhhh, OK. Will grab the latest and check it out. Thanks.
from colorpicker.
Interestingly, the issue has now moved to the far right of the color swatch, hitting that extreme with the thumb bombs the demo.
The issue with the alpha slider is also still there. Dragging to the extreme bombs the demo.
from colorpicker.
Related Issues (15)
- Reference against stable Avalonia packages HOT 3
- Project page Windows release is having issues with the background HOT 1
- ColorPicker doesnt show / blank HOT 2
- [ColorPicker] Third Grid column width is hardcoded and control is not responsive HOT 1
- Popup / Expandable color control
- Application exits silently HOT 3
- Double precision error when opening color picker HOT 1
- Color picker should be color-error tolerant in release mode HOT 3
- When Color Property is DataBound, when Null Crashes Application HOT 10
- HsvProps Issues HOT 5
- HSL support HOT 1
- Pictures/Screenshots for README. HOT 1
- All download link are offline HOT 2
- The binaries are non functional, also failed after compiling from source. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorpicker.