Step 1: open the Visual Studio with the WPF project
Step 2: in Solution Explorer right click on the App.xaml select Properties and set the Build Action to Page (so we can define resources here, as normal)
Step3: add a new class file to the project:
public class MyApplication { [STAThread] static public void Main(string[] args) { App app = new App(); //this is the default classname and not our application's
name app.InitializeComponent(); app.Run(); } }