Skip to content

A strange question #398

Closed Answered by canton7
seabluescn asked this question in Q&A
Apr 29, 2025 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

Right, you're using PropertyChanged.Fody to insert INotifyPropertyChanged events.

PropertyChanged.Fody works on classes which implement INotifyPropertyChanged, and it rewrites properties to automatically raise the PropertyChanged event whenever the property is assigned.

Your MainViewModel implements INotifyPropertyChanged (it inherits from Screen, which implements that interface). So, PropertyChanged.Fody gets to work and rewrites the Tester property so that when you assign to it, it raises the PropertyChanged event.

The Binding in your view then listens for that event, and refreshes itself when it's raised. So when you assign to Tester, the view gets a notification that the property has …

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@seabluescn
Comment options

Answer selected by canton7
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants