Why use multiple properties instead of a single object?

Topics: Prism v1
Jan 27, 2009 at 12:25 AM
Is there a specific reason that Stock Trader chooses to bind each control to a property in the presentationModel? For example, instead of:



TextBox x:Name="TickerSymbolTextBox"  Text="{Binding TickerSymbol}"/>

Why not use:
<TextBox x:Name="TickerSymbolTextBox"  Text="{Binding Order.TickerSymbol}"/>

It seems simpler to have a single "Order" property defined in the presentationModel and also it saves the need to manually update the Order object in the submit command.
So am I missing something?
Thank you,







Jan 27, 2009 at 5:26 AM
I think it might be related to the validation....  http://www.codeplex.com/CompositeWPF/Thread/View.aspx?ThreadId=45228  If Order.TickerSymbol then no way to disable the Save button.. 
Jan 27, 2009 at 5:11 PM
Make sense. Thank you!