© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•11mo ago•
3 replies
Zoli

Why deletion of last character in Entry not triggers observableProperty? (MVVM, Maui)

I have an input field where the user can enter numbers. When any number is typed, the model updates successfully, which I can confirm using a breakpoint. However, when there is only one character left and it is deleted, the update does not occur, and the model retains the previous number instead of updating.
Why is this happening, and how can I ensure the model updates correctly when the last character is deleted?

ViewModel
[ObservableProperty]
private int _value;

// TODO when delete the last value, it should trigger to set the model value
partial void OnValueChanged(int value)
{
    _model.Value = value;
}
[ObservableProperty]
private int _value;

// TODO when delete the last value, it should trigger to set the model value
partial void OnValueChanged(int value)
{
    _model.Value = value;
}


Xaml
<Entry Keyboard= "Numeric" Text= "{Binding Value}" />
<Entry Keyboard= "Numeric" Text= "{Binding Value}" />
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

CommunityToolkit.MVVM ObservableProperty and JsonIgnore
C#CC# / help
15mo ago
MAUI Entry Point - MauiProgram.cs [Answered]
C#CC# / help
4y ago
MVVM .net MAUI delete button not working
C#CC# / help
2y ago