Browse Source

Fixed ToggleSwitch dragging (#13893)

pull/13932/head
Splitwirez 3 years ago
committed by GitHub
parent
commit
1a2e586d6e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls/ToggleSwitch.cs

2
src/Avalonia.Controls/ToggleSwitch.cs

@ -228,6 +228,8 @@ namespace Avalonia.Controls
{
if (_isDragging)
{
e.Handled = true;
bool shouldBecomeChecked = Canvas.GetLeft(_knobsPanel!) >= (_switchKnob!.Bounds.Width / 2);
_knobsPanel!.ClearValue(Canvas.LeftProperty);

Loading…
Cancel
Save