
Quanto non mi piace la sintassi delle Dependency/Attached Property…
namespace Topics.Runtime.ViewModel { using ...;
[Component( typeof( IEstimateWizardViewModel ), Lifestyle = Lifestyle.Transient )] sealed class EstimateWizardViewModel : ViewModelBase<IEstimateWizardView>, IEstimateWizardViewModel { public static readonly DependencyProperty IsBusyProperty = DependencyProperty.Register( "IsBusy", typeof( Boolean ), typeof( EstimateViewModel ), new PropertyMetadata( false ) ); public Boolean IsBusy { get { return ( Boolean )this.GetValue( IsBusyProperty ); } private set { this.SetValue( IsBusyProperty, value ); } }
} }
- Nessun errore di compilazione;
- Nessun errore a runtime;
- Nulla nella Output Window di Visual Studio a runtime;
- Nessun test che fallisce: il comportamento è quello attesto;
Scomodo decisamente scomodo, e non ditemi di scrivere un test per verificarlo perchè ci manca solo quello… ;-)
.m