Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WPF Application not displaying main window
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01333407
Message ID:
01334680
Vues:
9
Brian,

Thanks for posting the code--as it turns out their is a problem with the VB .NET WPF Template. If you change your code to the following, it should work just fine:
	Public Shared Sub Main(ByVal args As String())

		'' Instantiate the Application object
		App = New AppWPF()

		'' Set the ShowInTaskbar default
		mmAppWPF.WindowManager.ShowInTaskbarDefault = ShowWindowsInTaskbarDefault

		Dim Result As Nullable(Of Boolean) = True

		'''' Uncomment this code to display the login window
		''Dim LoginWindow As UserLoginWindow = New UserLoginWindow()
		''Result = LoginWindow.ShowDialog()


		If Result = True Then

			Dim App As Application = New Application()
			App.InitializeComponent()
			'' Instantiate the main application window
			mainWindow = New MainWindow()
			Dim appWrapper As mmApplicationWrapper = New mmApplicationWrapper(App, mainWindow, IsSingleInstance)

			'' Log any unhandled exceptions
			AddHandler appWrapper.Application.DispatcherUnhandledException, AddressOf UnhandledExceptionHandler

			'' If IsSingleInstance is true, activates the current instance of the 
			'' application rather than running multiple instances
			AddHandler appWrapper.StartupNextInstance, AddressOf StartupNextInstanceHandler

			appWrapper.Run(args)

		End If

	End Sub
We will include this fix in the next update.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform