title: WPF: How set active titlebar color to window background?
body: <p>I have a WPF window without Titlebar and border. So I want change windows background based on it is active or not.</p>
  
  <p>I writed code below but I got message <code>Cannot implicitly convert type 'System.Drawing.Brush' to 'System.Windows.Media.Brush'</code>.  </p>
  
  <p>Can you help me how to do this? Thank you!</p>
  
  <pre><code>    // This function used for both "Actived" and "Deactived" event
      private void window_Activated(object sender, EventArgs e)
      {
          Background = (IsActive)? System.Drawing.SystemBrushes.ActiveCaption :
              System.Drawing.SystemBrushes.InactiveCaption;
      }
  </code></pre>
  
  <p><strong>EDIT</strong><br>
  Current my windows title bar have Lime color if it active, and gray if inactive, but other user may be diffrent. How can I get these color by code? </p>