Object Status Without Provider

Object Status Without Provider

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


Brette.Net posted on Thursday, March 05, 2009

Is it possible to set the DataContext of the ObjectStatus object to a Business object without using the CslaDataProvider?  See below... This is not working.

 

<Wpf:ObjectStatus x:Key="BusinessObjectStatus" DataContext="{Binding Path=BusinessObject}" />

RockfordLhotka replied on Saturday, March 07, 2009

If you don't use CslaDataProvider you are obviously already using code-behind to set the data context of one or more other controls on your form. You'll just need to set the DataContext of the ObjectStatus control in the code-behind as well.

Or put the ObjectStatus control inside whatever container you have that does get its DataContext set, and then ObjectStatus should inherit that DataContext (though then it wouldn't be a resource, and you'll need to use relative binding to connect to it).

Copyright (c) Marimer LLC