wpf - Visual Studio 2010 uses Application.xaml; Blend 4 uses App.xaml -


All application level resources were stored in App.xaml before that project I am authoring. Then I decided to migrate from VS from 2008 to 2010 and this is where the trouble started.

After migrating, I tried a little test to use a test window instead of the normal startup window. After the startup object was changed, suddenly I had many compilation errors and that (long story short) resulted in the fact that there were now two files, which were in the application level resources associated with the project: App.xaml ( Original), and Application.xaml (actually empty at the moment). I migrated all resources (as well as merged dictionaries) to the application. With respect to the visual studio with XML, and everyone, so far the world was right.

I came to know that Blend still wanted to use App.xaml. I have created many resources and application them. Have been placed in XML, and have seen that when I compiled with Blend (but they were still being used when they were compiled with VS)

Specify which xaml top level WPF resource file? It is getting out of hand ...

there are minor differences Depending on what programming language you choose, Visual Basic uses the WPF project Application.xaml in the naming, whereas C # is the name of the project App.xaml.

As you probably know all. Net app needs a main method. Additionally, windows messaging systems require a message pump for the windows to stretch. In the WPF you can use the application class to start listening to the Windows message.

Here you can clearly explain how.

VB

  Public Class Startup & lt; STAThread () & gt; Shared sub main () dim app show the new application () window as the new main window () window. Show () app .property () end sub end class  

C # STAThread () {Application app = new application (); Main window window = new main window (); Window.Show (); App.Run (); }}

After creating this type of code for WPF applications, you can write this code by defining the XAML file and class MSBuild, which is obtained from System.Windows.Application And specifies it to create a job as 'app definition'.

Enter image details here

In your situation, VbProj Instead of editing the file, you can only select the correct file in the solution explorer and change the BuildAction.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -