tags:

views:

181

answers:

2

Hi, Im uprading a .Net 2.0 project to 3.5.

In the current project The code "System.Windows.Forms.Application.Run(winForm);" creates the initial windows form

I am wondering if anyhow can tell me whats the equivalent to call a WPF window.

Any help or advice really apprecaited. Steve

+1  A: 

Why don't just just create an empty new WPF Project and look at the code?

<Application x:Class="CRS_GUI.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="MainWin.xaml">
    <Application.Resources>

    </Application.Resources>
</Application>

This is how my current project starts, Look at the StartupUri.

Holli
+1  A: 

If you're using C#, try:

new Application().Run(new Window());
Daniel Earwicker