I have text fields for which I wanted to set a property PlaceholderText. The text of each window is tied to a property of the underlying view model. Now that you set the placeholder in XAML as
<TextBox PlaceholderText="Placeholder" Text={Binding PropertyName} />
I noticed that the properties of the view model are no longer updated when the text field loses focus. While without a placeholder, binding works just fine.
Is this behavior expected and are there any workarounds, or should I stick to the classic TextBlockone that describes the intended input of each window?
Change: . The property implements INotifyPropertyChanged, and the binding is updated in the view model when no placeholder is specified.
source
share