Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the NumberBox.Value Default UpdateSourceTrigger to LostFocus #767

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Wpf.Ui/Controls/NumberBox/NumberBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

// This Source Code is partially based on the source code provided by the .NET Foundation.

using System.Windows.Data;
using System.Windows.Input;

// ReSharper disable once CheckNamespace
Expand All @@ -13,7 +14,6 @@ namespace Wpf.Ui.Controls;
// TODO: Mask (with placeholder); Clipboard paste;
// TODO: Constant decimals when formatting. Although this can actually be done with NumberFormatter.
// TODO: Disable expression by default
// TODO: Fix when exiting with TAB, try to organize the OnTextChanged
// TODO: Lock to digit characters only by property

/// <summary>
Expand All @@ -34,7 +34,7 @@ public class NumberBox : Wpf.Ui.Controls.TextBox
nameof(Value),
typeof(double?),
typeof(NumberBox),
new FrameworkPropertyMetadata((double?)null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValuePropertyChanged)
new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnValuePropertyChanged, null, false, UpdateSourceTrigger.LostFocus)
);

/// <summary>
Expand Down