XAML binding against Auto-Implemented properties?
问题 Is it possible to using XAML data binding to a model with Auto-Implemented properties? class ClassA { // pseudo code. int Width { get; set{ NotifyPropertyChange("Width");} } } //XAML <textBox width="{Binding Path=Width,Mode=OneWay}"/> 回答1: Auto-properties don't have a half auto mode. It needs to either be an auto-property with nothing extra: int Width { get; set; } or a fully expanded property with a backing store that can have additional code added to it, like change notification: int _width