title: WPFMediaKit:VideoCaptureElement is streaming the video in alternate windows in WPF
body: <p>XAML:</p>
  
  <pre><code>&lt;WPFMediaKit:VideoCaptureElement 
        LoadedBehavior="Play" 
        StretchDirection="Both" 
        FPS="30" 
        Stretch="Uniform" 
        VideoCaptureSource="{Binding Path=CaptureDeviceName}"
        UnloadedBehavior="Stop" 
        EnableSampleGrabbing="true"
        DesiredPixelWidth="1280" 
        DesiredPixelHeight="1024"
        Width="Auto" 
        Height="Auto" 
        x:Name="videoCapElement" 
        HorizontalAlignment="Stretch" 
        VerticalAlignment="Stretch" /&gt;
  </code></pre>
  
  <p>UserControl.xaml.cs:</p>
  
  <pre><code>public partial class UserControl1 : UserControl
  {
      DsDevice dev1 = MultimediaUtil.VideoInputDevices.FirstOrDefault();
      DsDevice dev2 = MultimediaUtil.VideoInputDevices.Skip(1).FirstOrDefault();
  
      public UserControl1()
      {
          InitializeComponent();
  
          try
          {
              if (dev1 != null)
              {
                  videoCapElement.VideoCaptureDevice = dev1;
                  videoCapElement.VideoCaptureSource = dev1.Name;
              }  
          }
          catch (Exception ex)
          {
              System.Windows.MessageBox.Show(ex.Message);
          }
      }
  }
  </code></pre>
  
  <p>With the above code in place , when I am referring the user control in Multiple Window.xaml files and Navigating from one window to the other window, I am getting the video streaming in alternate windows.</p>