title: c# How to detect if Netflix is Running
body: <p>I want to detect if Netflix is running. I am using a Windows Forms Application.</p>
  
  <p>Netflix is a Metro App which is hosted by the process WWAHost.exe. I use the follwoing code:</p>
  
  <pre><code>Process[] ps = Process.GetProcessesByName("WWAHost");
  foreach(var p in ps)
  {
    if(p.MainWindowTitle == "Netflix")
    {
      return true;
    }
  }
  </code></pre>
  
  <p>The code works for approximately 0.6 seconds after Netflix is started. After 0.6 seconds the MainWindowTitle constains an empty string. This means that it is only possible to detect Netflix right after it is started.</p>
  
  <p>Update: Actually my code only works if Netflix is minimized or starting (the 0.6s second are just from the starting).</p>
  
  <p>Is this a bug? Is there a better way to solve this?</p>
  
  <p>my system: Win10 1809,VS2015,.Net4.5.2</p>