Why I cannot add text after lost focus in NumericUpDown of MahApp in C# WPF
See original GitHub issueI’m using C# WPF and MahApps Controls
I set a string format for Thousands separated like : #,### in NumericUpDown it’s working when I typing number in that but when I lost focus of my NumericUpDown , I cannot add text end of it or between it ! I have to clear all of value in my NumericUpDown and that I can add text again
My XAML :
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:local="clr-namespace:WpfApp8"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Class="WpfApp8.MainWindow"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<mah:NumericUpDown Name="txtnumer" HorizontalAlignment="Left" Margin="443,256,0,0" VerticalAlignment="Top" Height="41" Width="264" ParsingNumberStyle="Number" Culture="fa-IR" SnapToMultipleOfInterval="True" Value="0" ChangeValueOnTextChanged="True" Minimum="0" Interval="1" NumericInputMode="Decimal" Speedup="False" StringFormat="#,###"/>
</Grid>
</Window>
How to Fix This ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to hold the invalid value for NumericUpDown after it ...
The trick is to get the textbox embedded within the numeric updown control, and handle its Validating event. Here is how to get...
Read more >NumericUpDown
The NumericUpDown control can be used to increase or decrease a numeric value. If you press the + button the value of the...
Read more >NumericUpDown Class (System.Windows.Forms)
Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives...
Read more >Creating a NumericUpDown control from scratch
NumericUpDown loses focus; User uses keyboard arrows or the buttons on the side to increase/decrease Value; User presses the enter (return) key.
Read more >Textbox Wpf
This is how to add a Watermark to a native WPF TextBox without using event. The TextBox control provides support for basic text...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mojtabahakimian Ok, found it.
Hi @mojtabahakimian
as this is a free-time project, it will be fixed when there is enough free time. Normally Jan is keeping an eye on the more annoying bugs 😄 .
Thank you for your patience & happy coding Tim