title: How to know when user doesn't click anymore on a button WPF
body: <p>I'm doing some password eye text box.
  <br>I want, that when the user would press on the eye button, the password would be visible and when he leaves the mouse button it would be unvisible again.</p>
  
  <p>My question: How to know when the user stopped clicking the mouse button?</p>
  
  <p>Image of how it looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/NYqux.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NYqux.png" alt="enter image description here"></a></p>
  
  <p>My code is roughly as follows:</p>
  
  <pre><code>private void eye_click(object sender , RoutedEventArgs e)
  {         
      //here I making the password visible
  }
  </code></pre>
  
  <p><strong>I'm looking for something like:</strong></p>
  
  <pre><code>private void user_doesnt_click_anymore_click(object sender , RoutedEventArgs e)
  {         
      //return the password to be unvisible
  }
  </code></pre>