title: Metro Style App: How to call a C# method from javascript code running in a webview control
body: <p>I want to implement the UI of my metro app using a Web View. Then, HTML/JS/CSS code will run inside it. The idea is to isolate that pure JS code from WinRT and Metro SDK. Aditionally I want to code in the same Metro app a C# API layer which will be consumed by the JS inside Web View. When the UI needs to use native code ( e.g. call to WinRT components ),   UI code running inside webview should call my C# methods. </p>
  
  <p>Could someone give me an example about How call a C# method from javascript which is in a web view for a Metro app.
  Thanks,
  Hugo.</p>
  
  <p>The walkthrough  you told me use a JavaScript project as a client and It has a reference to Windows Runtime Component developed in C#. (WinMD file) 
  Instead of having a metro Javascript project,   I want to develop a Metro Style App using  a  C# project as client. It will contains a Web View which is the container of my UI .  This project will have a reference to Windows Runtime Component developed in C#. (WinMD file)
  The idea is that the javascript running inside web view invokes methods from WinMD file, but unfortunately I could not call a method from WinMD from javascript running inside a Web View.</p>