question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why I cannot add text after lost focus in NumericUpDown of MahApp in C# WPF

See original GitHub issue

I’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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
punker76commented, Aug 31, 2021

@mojtabahakimian Ok, found it.

0reactions
timuniecommented, Aug 31, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found