Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to achieve that MudNumericField formats number on every keystroke#12112

Unanswered
mmaestro16 asked this question inQ&A
Discussion options

I would like that formating is done for every value changed not only when focus is lost...

Anyone has idea how to achieve that?

<MudNumericField T="decimal"                 Text="@Text"                 TextChanged="OnTextChanged"                 Immediate="true"                 DebounceInterval="0"                 Format="N2"                 Variant="Variant.Outlined"                 Margin="Margin.Dense"                  Culture="@CultureInfo.GetCultureInfo("de")" />                 private string? Text;private void OnTextChanged(string? newText){    Text = newText;     if (decimal.TryParse(Text, NumberStyles.Number, CultureInfo.GetCultureInfo("de"), out var number))         Value = number;     else         Value = 0; }
You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@mmaestro16

[8]ページ先頭

©2009-2025 Movatter.jp