Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

Created Issue: Use ICustomTypeProvider if posible when binding View to ViewModel [273]

$
0
0
Allows to use dynamically generated types as ViewModels. Implemented by adding

#if SILVERLIGHT
var viewModelTypeProvide = viewModel as ICustomTypeProvider;
if (viewModelTypeProvide != null)
{
viewModelType = viewModelTypeProvide.GetCustomType();
}
#endif

after
if (!ShouldApplyConventions(element))
{
Log.Info("Skipping conventions for {0} and {1}.", element, viewModel);
return;
}

var viewModelType = viewModel.GetType();

to ViewModelBinder.cs

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>