views:

32

answers:

1

Hey guys.

Im new to Expression and by accident I deleted the App.xaml file. I think this is an important file and I cannot workout how to create an equivalent.

Please help,

Andy

+2  A: 

Create a new project and copy that one.

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

    </Application.Resources>
</Application>

Unless you had Application Resources defined, then you may be in trouble.

Might be a good argument for Source Control.

benPearce
Yeah - going to use scm soon! So i tried that - and im getting : Partial Declarations of 'app' must not specify different base classes....
RenegadeAndy
I would recommend git and a website like http://github.com (if you need offline backup)
Callum Rogers
Are you also bringing the App.xaml.cs file into the project
benPearce
Yea - currently I have the App.xaml which looks like what you pasted but I changed x:Class to "MyApp.App" and the startup URI to be "MainWindow.xaml" and then in the code for the App.xaml.cs file I have [code]public partial class App : Window { public App() { this.InitializeComponent(); // Insert code required on object creation below this point. } }[/code] and it is complaining about the public partial class line
RenegadeAndy
You need to give public partial class App : Application instead of partial class App : WindowThe Application class is defined in System.Windows namespace so if you wish you can fully qualify it as belowpublic partial class App : System.Windows.Application
Mamta Dalal
ok done that thanks, now it says Program "<path to exe"> does not have a static main method suitable for an entry point. What is it looking for!?
RenegadeAndy