Caliburn Micro and RadTileView

3 posts, 0 answers
  1. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 08 Sep 2011 Link to this post


    I tried to rewrite the SimpleMDI caliburn micro sample to use a RadTileView with Conductor<...>.Collection.AllActive. (Unfortunately I am not allowed to upload a sample project). As I understood from several resources on the web, I need to add custom conventions to get this working. I tried a lot of stuff and finally ended with
    static void AddCustomConventions()
        ConventionManager.AddElementConvention<RadTileView>(RadTileView.ContentTemplateProperty, "DataContext", "Loaded");

    but unfortunately with no luck! My XAML looks like this and I think it should find the View for the ContentTemplate from the ViewModel - but id doesn't:
    <UserControl x:Class="Caliburn.Micro.HelloMef.ShellView"
                 xmlns:x="" >
        <Grid x:Name="LayoutRoot">
            <telerik:RadTileView ItemsSource="{Binding Items}">
                        <TextBlock Text="{Binding DisplayName}" />

    Has anyone experience with Caliburn Micro combined with Telerik?
    Thanks A LOT for any kind of information and help!
    All the best,
  2. S
    S avatar
    8 posts
    Member since:
    Jul 2011

    Posted 13 Sep 2011 Link to this post

    Hello Tim,

       Let me prefix this comment/answer with two things:
    1. I'm new to Telerik controls
    2. I'm definitely new to the whole MVVM thing and Caliburn Micro is my first attempt at using it :)

    So please keep that in mind... I had a similar goal to yours with a grid of MEF facilitated Views loaded into child controls in a RadTileView. They may take my MVVM license away for doing it this way, but the ONLY way I could get the views to connect with the right Model in the TileView / FluidContentControl was to explicitly make the binding in the XAML of each of the user controls that were to be placed in the Tiles. That is - I had to use some of the "view first" features of Caliburn Micro :

    • I had to add the appropriate MEF decoration to the ViewModel class... In my case it was: 
          [Export ("AverageScoreChartViewModel", typeof(AverageScoreChartViewModel))]
          public class AverageScoreChartViewModel : PropertyChangedBase, IDashboardItem
             // where IDashboardItem is simply used to connect to my chart dashboard to tile items (i.e. name, minimized icon, header items, etc

    • Then in the UserControl View (for this snippet - AverageScoreChartView ) that is to be placed within the TileViewItem, I had to make the binding to the right model explicit by using this syntax in the UserControl attributes (where cal is the caliburn namespace). This let's MEF and CM wire up everything
        d:DesignHeight="300" d:DesignWidth="400" >
    <!-- All my controls and junk go here within a RadFluidContentControl that is set to ContentChangedMode="Manual" -->

    I'm pretty sure I'm not specifically answering your question, but I hope this helps - and as I say it's probably the "wrong" way, but I just needed it to work ;)

  3. Tim
    Tim avatar
    114 posts
    Member since:
    Aug 2011

    Posted 10 Nov 2011 Link to this post

    Hi Wilks, thanks a lot for answering and sorry for my late reply!

    After reading a thousand of times, I realized that there is no problem in using Telerik. The only problem is the DataTemplate and one has to use something like cal:View.Model="{Binding}" or even cal:View.Model="{Binding ActiveItem}". I was a little bit confused due to the ConventionManager stuff and now I am happy that I don't even have to use it! :)

    Thanks again Wilks for your help!
    All the best,
Back to Top