You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.
, where ViewModel is a C#-implementation of INotifyPropertyChanged.
Now when I open this window, the three TextBoxes have the following Content:
(TextBox1)
A getter call 1
B getter call 1
C getter call 1
A getter call 2
(TextBox2)
A getter call 1
B getter call 1
C getter call 1
A getter call 2
A getter call 3
B getter call 2
C getter call 2
B getter call 3
(TextBox3)
A getter call 1
B getter call 1
C getter call 1
A getter call 2
A getter call 3
B getter call 2
C getter call 2
B getter call 3
A getter call 4
B getter call 4
C getter call 3
C getter call 4
There is one major thing bugging me here: Why is each getter called when only one of them should be called to get the content for a single binding? And why is the getter of each the bound property called twice? That means, why does every getter get called for each property access, and then the actual getter of the wanted property get called again?
What's evene worse: If you delete the second (and even third) TextBox from the xaml, the text in the remaining TextBoxes does not change, meaning getters of properties that are not shown get called!
Can anyone explain what's going here on and how to prevent this behaviour?
The text was updated successfully, but these errors were encountered:
(copy of my StackOverFlowQuestion)
I have simple wpf window:
with viewmodel (IronPython, is set as DataContext of the window in CodeBehind):
, where ViewModel is a C#-implementation of
INotifyPropertyChanged
.Now when I open this window, the three
TextBox
es have the following Content:There is one major thing bugging me here: Why is each getter called when only one of them should be called to get the content for a single binding? And why is the getter of each the bound property called twice? That means, why does every getter get called for each property access, and then the actual getter of the wanted property get called again?
What's evene worse: If you delete the second (and even third)
TextBox
from the xaml, the text in the remainingTextBox
es does not change, meaning getters of properties that are not shown get called!Can anyone explain what's going here on and how to prevent this behaviour?
The text was updated successfully, but these errors were encountered: