Tôi đã hứa trước đó cho thấy làm thế nào tôi sẽ đối phó với các đối tượng giá trị Địa chỉ trong mã XAML, vì vậy ở đây nó đi. Tôi đã cho thấy làm thế nào tôi xử lý này trong ProjectInformationViewModel, vì vậy bây giờ đó là thời gian để hiển thị nó trong XAML: | Chapter 3 Managing Projects I promised earlier to show how I was going to deal with the Address Value objects in the XAML code so here it goes. I already showed how I am handling this in the ProjectInformationViewModel so now it is time to show it in the XAML Label Margin 35 0 0 Content Project Address Style StaticResource boldLabelStyle TextBox Margin 195 0 0 Text Binding Path Style StaticResource baseTextBoxStyle Label Margin 35 0 0 Content Project City Style StaticResource boldLabelStyle TextBox Margin 195 0 0 Text Binding Path Style StaticResource baseTextBoxStyle Label Margin 35 0 0 Content Project State Style StaticResource boldLabelStyle TextBox Margin 195 0 0 Text Binding Path Style StaticResource baseTextBoxStyle Label Margin 35 0 0 Content Project Zip Style StaticResource boldLabelStyle TextBox Margin 195 0 0 Text Binding Path Style StaticResource baseTextBoxStyle The way this works is that I am not actually binding to the CurrentProject property of the ProjectInformationViewModel instead I am binding to the properties of the ProjectAddress property of the ProjectInformationViewModel. Remember the ProjectAddress property is actually an instance of the MutableAddress type so I can change the properties through data binding. The code inside of the ProjectInformationViewModel translates this into my immutable Address Value object and the data going into the Address Value object s constructor is validated inside of the constructor in order to make sure that I am entering a valid address. I love the fact that I can bind to my ViewModel and get the type of functionality that I just showed in these examples without having to write any procedural code in my View For the sake of brevity I am not going to show all of the XAML code for the ProjectInformationView there is just too much. There is nothing really special going on .