views:

16

answers:

0

Hi,

Normally I use the following construction to render a list of different items:

        <ItemsControl ItemsSource="{Binding DesktopVM.Content}" ItemTemplateSelector="{StaticResource EntityTemplateSelector}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>


<Window.Resources>
    <DataTemplate x:Key="MenuTemplate">
        <views:MenuView />
    </DataTemplate>

    <DataTemplate x:Key="SelectionTemplate">
        <views:SelectionView />
    </DataTemplate>


    <views:EntityTemplateSelector 
        MenuTemplate="{StaticResource MenuTemplate}"
        SelectionTemplate="{StaticResource SelectionTemplate}"
        x:Key="EntityTemplateSelector" 
     />
</Window.Resources>

So menuView and selectionView are UserControls

Now i want to do this using a scatterview but the ItemTemplateSelector does not work. Can I use usercontrols in this case?

I have tried a full day fixing this but it still does not work can someone give me the basic principles in constructing this?