title: Direct to another xaml user control page when button clicked C# WPF
body: <p>How do I direct to another <code>xaml</code> user control page from my main window when i click the button from my main window.</p>
  
  <pre><code>    private void button1_Click(object sender, RoutedEventArgs e)
      {
          \\what am i suppose to write here;
      }
  </code></pre>
  
  <p>Thanks any help appreciated</p>
  
  <p>my code on my catergory xaml</p>
  
  <pre><code>    &lt;UserControl x:Class="KinectButton.view.Catergory"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           d:DesignHeight="373" d:DesignWidth="480" HorizontalAlignment="Stretch" Loaded="UserControl_Loaded"&gt;
  
  &lt;Grid Loaded="Grid_Loaded" Name="grid1"&gt;
      &lt;StackPanel Name="myStackPanel" Margin="1,0,120,54"&gt;
          &lt;Image Height="319" Name="myImg" Stretch="Fill" Width="357" /&gt;
      &lt;/StackPanel&gt;
      &lt;Grid x:Name="ContentPanel" Margin="0,0,121,54"&gt;&lt;/Grid&gt;
  
  
      &lt;Label Content="Label" Name="message" Margin="2,317,121,0" /&gt;
          &lt;Button x:Name="Button1" Content="" Margin="357,77,0,222" Click="Button1_Click"&gt;
              &lt;Button.Background&gt;
                  &lt;ImageBrush ImageSource="C:\Users\103159T\Desktop\KinectButton1\KinectButton\Images\AERO.png"&gt;&lt;/ImageBrush&gt;
              &lt;/Button.Background&gt;
          &lt;/Button&gt;
      &lt;Button x:Name="Button3" Content="" Margin="357,147,0,148" Click="Button3_Click"&gt;
          &lt;Button.Background&gt;
              &lt;ImageBrush ImageSource="C:\Users\103159T\Desktop\KinectButton1\KinectButton\Images\MIT.png"&gt;&lt;/ImageBrush&gt;
          &lt;/Button.Background&gt;
      &lt;/Button&gt;
      &lt;Button x:Name="Button4" Content="" Margin="357,224,0,0" Height="73" VerticalAlignment="Top" Click="Button4_Click"&gt;
          &lt;Button.Background&gt;
              &lt;ImageBrush ImageSource="C:\Users\103159T\Desktop\KinectButton1\KinectButton\Images\MECHATRONIC.png"&gt;&lt;/ImageBrush&gt;
          &lt;/Button.Background&gt;
      &lt;/Button&gt;
      &lt;Button x:Name="Button5" Content="" Margin="357,298,0,0" Click="Button5_Click"&gt;
          &lt;Button.Background&gt;
              &lt;ImageBrush ImageSource="C:\Users\103159T\Desktop\KinectButton1\KinectButton\Images\TMT.png"&gt;&lt;/ImageBrush&gt;
          &lt;/Button.Background&gt;
      &lt;/Button&gt;
      &lt;Button x:Name="Button2" Content="" Margin="357,0,0,294" Click="Button2_Click"&gt;
          &lt;Button.Background&gt;
              &lt;ImageBrush ImageSource="C:\Users\103159T\Desktop\KinectButton1\KinectButton\Images\ECC.png"&gt;&lt;/ImageBrush&gt;
          &lt;/Button.Background&gt;
      &lt;/Button&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>i have a few buttons and some image on it..</p>