ViewModel using an Interface does not allow binding to PropertyStatus

ViewModel using an Interface does not allow binding to PropertyStatus

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


hayrob posted on Tuesday, September 21, 2010

I'm very new to Csla4.0 and struggling.

When I create a ViewModel:

public class CustomerViewModel : ViewModel<ICustomer>

{

}

I can not bind ICustomer Properties (eg Name) to the Property property of PropertyStatus. 

When I change to:

public class CustomerViewModel : ViewModel<Customer>

{

}

everything works fine.

ICustomer is defined:

pubic interface ICustomer : IEditableBusinessObject, ITrackStatus, ISavable, INotifyPropertyChanged

{

string Name{get;set;}

}

Am I missing something? Why does it not work?

Thanks

RockfordLhotka replied on Tuesday, September 21, 2010

PropertyStatus isn't designed to work against an interface. Data binding doesn't work against interfaces, and PropertyStatus follows the same pattern as data binding.

Copyright (c) Marimer LLC