title: Change Image object Visibility
body: <p>I have some image in my project. I want to change its property Visibility to true when the button pressed. I've created an image</p>
  <pre><code> &lt;Image Name=&quot;UserimgRock&quot; Source=&quot;Rock.png&quot; HorizontalAlignment=&quot;Left&quot; Height=&quot;100&quot; Margin=&quot;277&quot; VerticalAlignment=&quot;Top&quot; Width=&quot;100&quot; Visibility=&quot;Hidden&quot;/&gt;
  </code></pre>
  <p>and button</p>
  <pre><code>private void btnRock_Click(object sender, RoutedEventArgs e)
      {
          
          UserimgRock.Visibility = Visibility.Visible;
      }
  </code></pre>
  <p>but there is an error Error *The name 'UserimgRock' does not exist in the current context. I'm a little confused.
  Thanks for a any help!</p>