When trying to call:
CompositionInitializer.SatisfyImports(this);
I receive that message:
Cannot call SatisfyImports on a object of type 'x' because it is marked with one or more ExportAttributes.
In my ShellViewModel class, i have the following:
public const string IsBusyPropertyName = "IsBusy"; private bool _isBusy = false; [Export] public bool IsBusy { get { return _isBusy; } set { if (_isBusy == value) { return; } _isBusy = value; RaisePropertyChanged(IsBusyPropertyName); } } [Import(typeof(IDataService), RequiredCreationPolicy = CreationPolicy.Shared)] public IDataService _DataService { get; set; }
If i comment the [Export] tag, everything works. Why this happens?
But i comment that tag, the import will not work.
Is there a way to bypass this?
Here is the url for the a simple demo that shows demostrate that issue:
http://www.brim.com.br/silverlight/mefsatisfyimports.zip
Thanks!