title: How to create and show views on command request?
body: <p>I've started using mvvm-light toolkit , and new to WPF.</p>
  
  <p>My question is:
  I want to create an pplication where the main window includes a grid with 2 columns 1 col command and col2 will display views when each command will be pressed.
  i want the views to be created on command and colsed from it's own view.</p>
  
  <p>I've tried to figure out how to do it but with no success.</p>
  
  <p>I don't know how to write this kind of funconality using the mvvm light.</p>
  
  <p>I just know how to create main window with mainview and another view creted already on load.</p>
  
  <p>Please help me out..</p>
  
  <p>I'm using 2008 WPF3.5</p>
  
  <p>Shirly.
  Make me happy today.. i've just started the week!!!</p>
  
  <p>ThankU. I have done it and get as a result the Tostring() of the current ViewModel "LU.ViewModel.AllChannelsViewModel" and not the real view.</p>
  
  <p>the View i want to load is :
  I'm using the mvvm-light</p>
  
  <p></p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="30" /&gt;
          &lt;RowDefinition Height="30" /&gt;
          &lt;RowDefinition Height="*" /&gt;
      &lt;/Grid.RowDefinitions&gt;
  
      &lt;Button Grid.Row="0" Height="22" HorizontalAlignment="Right" Margin="8,4,0,0" Name="closebutton" VerticalAlignment="Top" Width="100" Command="{Binding CloseCommand}"&gt;Close&lt;/Button&gt;
      &lt;Button Grid.Row="1" Height="22" HorizontalAlignment="Left" Margin="8,4,0,0" Name="button1" VerticalAlignment="Top" Width="100" Command="{Binding GetChannelsCommand}"&gt;Load Channels&lt;/Button&gt;
      &lt;Button Grid.Row="1" Height="22" HorizontalAlignment="Right" Margin="8,4,0,0" Name="button2" VerticalAlignment="Top" Width="100" Command="{Binding NewChannelCommand}"&gt;New Channel&lt;/Button&gt;
      &lt;dg:DataGrid   Grid.Row="2"  ItemsSource="{Binding AllChannelsData}" Margin="0,30,0,0" /&gt;
  
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>What do i miss here? How can i show the real view i want and not the name of the viewmodel?</p>
  
  <p>Shirly</p>