I don't have so much information regard this, I just know that exposing property through Radical DesignTimeHost<T>
does not work anymore, or better, the property can used in binding, and the designer render it just fine, but the vs designer tools (like property selector) shows only CultureUI property and all the other viewmodel properties are not shown.
using this ViewModel:
public class MainViewModel : AbstractViewModel
{
public int UserId
{
get { return this.GetPropertyValue(() => this.UserId); }
set { this.SetPropertyValue(() => this.UserId, value); }
}
public string FirstName
{
get { return this.GetPropertyValue(() => this.FirstName); }
set { this.SetPropertyValue(() => this.FirstName, value); }
}
public string LastName
{
get { return this.GetPropertyValue(() => this.LastName); }
set { this.SetPropertyValue(() => this.LastName, value); }
}
}
and this DesignViewModel:
public class DesignMainViewModel : DesignTimeHost<MainViewModel>
{
public DesignMainViewModel()
{
Expose(vm => vm.UserId)
.WithStaticValue(10);
Expose(vm => vm.FirstName)
.WithStaticValue("Michael");
Expose(vm => vm.LastName)
.WithStaticValue("Denny");
}
}
if you simply add the binding, the render is done properly:
also the binding expression intellisense in xaml does not work:
[intellisense workaround] if you have resharper you can hit CTRL+space
as it does another deep search and it finds the property: