CSLA 4 PropertyStatus control changes

CSLA 4 PropertyStatus control changes

Old forum URL: forums.lhotka.net/forums/t/9157.aspx


ejames posted on Thursday, July 01, 2010

Upgrading a project to CSLA.NET 4.

In the WPF code we are using the PropertyStatus control, binding to the Source and Target properties.  After swapping to CSLA 4, the binding are no longer compiling.

What's the solution here?

ejames replied on Thursday, July 01, 2010

The code that is no longer compiling with problem properties in bold...
<csla:PropertyStatus Source="{Binding EditableCase}"
 Property="Title"
 Grid.Column="1"
 Target="{Binding ElementName=txtCaseTitle}" />

Curelom replied on Thursday, July 01, 2010

The solution is to actually bind the controls to the propertystatus.  Reverse what you are currently doing.  So you would bind the Enabled property of your textbox to the "CanWrite" property of the propertystatus.  This type of binding gives us much more control.

RockfordLhotka replied on Thursday, July 01, 2010

In fact, the TargetControl property has been removed from PropertyStatus, thereby avoiding any confusion as to how this should be handled.

Copyright (c) Marimer LLC