title: Access a UserControl from code in WPF app
body: <p>I have a created a usercontrol in my wpf application. I have used it like so:</p>
  
  <pre><code>&lt;Page x:Class="InstallerToolkit.Pages.PageVideosNvr"
    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" 
    xmlns:my="clr-namespace:MyProject.UserControls"
    mc:Ignorable="d" 
    d:DesignHeight="525" d:DesignWidth="1050"
  Title="PageVideos"&gt;
    &lt;Grid&gt;
          &lt;my:UserControlVideoPlayer Name="VideoPlayer" Margin="559,74,35,155"&gt;
  
      &lt;/my:UserControlVideoPlayer&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now in my C# page I want to access it but the VideoPlayer object doesnt appear when I type its name in the code behind c# page.</p>
  
  <p>What doo I do to access it as I want to set one of its properties.</p>