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

New Post: Dynamic View creation

$
0
0
I have a need to create a specific view dynamically - meaning I won't know which view to create until runtime. The view class to use is determined based on several criteria - I have a factory class that has this knowledge. I use MEF to bring in additional installed views.

I was looking into the ViewLocator - from the name I gathered that would be a logical place to start, but that is a static class (as well as other related classes - all static). So I see no way to override or replace that functionality.

Is it possible to inject custom view creation logic into CM? The only way out of this I see now, is to have a 'View' property on the ViewModel...

Thanx,
Marc

Viewing all articles
Browse latest Browse all 1760

Latest Images

Trending Articles



Latest Images

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