Different views / data template based on member variable
I have a view model called 

     ViewModelClass 

wich contains a boolean. 

I have another view model which contains 

    ObservableCollection<ViewModelClass> m_allProjects;


Then I have this in my view:

    <DataTemplate>
       <views:ProjectInfoView x:Key="ProjectInfoDetailTemplate"/>
    </DataTemplate>

    <ItemsControl Grid.Row="1" Grid.Column="0"
                  ItemsSource="{Binding AllProjects}"
                  ItemTemplate="{StaticResource ProjectInfoDetailTemplate}"
                  Margin="10,28.977,10,10">
    </ItemsControl >

Now I want, based on the boolean in the AllProjects-collection, to use a different datatemplate. What is the best way to do this? 

I know I can do this with different ViewModels and use a kind of ViewModel-base object, but I prefer just to use 1 view model.

I hope my question is clear !
Thanks !

Different views / data template based on member variable
===

I have a view model called 

     ViewModelClass 

wich contains a boolean. 

I have another view model which contains 

    ObservableCollection<ViewModelClass> m_allProjects;


Then I have this in my view:

    <DataTemplate>
       <views:ProjectInfoView x:Key="ProjectInfoDetailTemplate"/>
    </DataTemplate>

    <ItemsControl Grid.Row="1" Grid.Column="0"
                  ItemsSource="{Binding AllProjects}"
                  ItemTemplate="{StaticResource ProjectInfoDetailTemplate}"
                  Margin="10,28.977,10,10">
    </ItemsControl >

Now I want, based on the boolean in the AllProjects-collection, to use a different datatemplate. What is the best way to do this? 

I know I can do this with different ViewModels and use a kind of ViewModel-base object, but I prefer just to use 1 view model.

I hope my question is clear !
Thanks !
