2009-07-23 9 views
0

Je suis en train de mettre à jour un projet .Net 2.0 vers 3.5.Lancer une fenêtre WPF

Dans le projet en cours Le code "System.Windows.Forms.Application.Run (winForm);" crée le formulaire initial de Windows

Je me demande si de toute façon peut me dire quel est l'équivalent d'appeler une fenêtre WPF.

Toute aide ou conseil vraiment apprecaité. Steve

Répondre

1

Pourquoi ne pas simplement créer un nouveau projet WPF vide et regarder le 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> 

Voici comment mon projet actuel démarre, Regardez le StartupUri.

2

Si vous utilisez C#, essayez:

new Application().Run(new Window()); 
Questions connexes