title: Set image runtime in VisualBrush with c#
body: <p>actually I set an image took from the resources at designtime into the <strong>xaml</strong> file like this:</p>
  
  <pre><code>&lt;Button Click="btnLogin_Click" Name="btnLogin"&gt;
      &lt;StackPanel Orientation="Horizontal"&gt;
          &lt;Rectangle Width="20" Height="20" Name="recLogin"&gt;
              &lt;Rectangle.Resources&gt;
                  &lt;SolidColorBrush x:Key="BlackBrush" Color="White" /&gt;
              &lt;/Rectangle.Resources&gt;
              &lt;Rectangle.Fill&gt;
                  &lt;VisualBrush Stretch="Fill" Visual="{StaticResource appbar_user}" x:Name="brushLogin" /&gt;
              &lt;/Rectangle.Fill&gt;
          &lt;/Rectangle&gt;
          &lt;TextBlock Text=" login" Name="txbLogin" /&gt;
      &lt;/StackPanel&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>and works fine. But <em>(is a login button)</em> I wish that when the user do a login, the image on the button <em>(inside a rectangle)</em> will be changed..</p>
  
  <p>How can I do?</p>