WP7 APP.XAML 删除后,再添加后无法运行

WP7 APP.XAML 删除后,再添加后无法运行


这个问题搞了一上午也没搞定 最后看到CODEPROJECT看到别人回的贴子:(地址:

http://www.codeproject.com/Questions/376431/WPF-App-Xaml-how-to-add-it )

Hi all i have a problem maybe it is not logical but it does happen with me.
I am working on a wpf application and for a reason i did remove App.Xaml and add app.cs witch contain main method.
and the application is working very well, but i need to add a resource dictionary and i did found that it will be add in App.Xaml in order to use it in all project window,
but now i don't have App.Xaml, i did Add one manualy but it was not working it is not like the generated one .
any one can help me to add one without creating the project ??



别人回答的

1)Go to add new items -> online templates and then choose 'Silverlight Application Class'.
This will add a new app.xaml for you.


2)The reason that it is not working properly is because when you removed the App.xaml file, Visual Studio loses that as the Startup object in the project properties. If you have created the App.xaml file (I add a default one here), then you go to Project Properties > Application > Startup Object and you choose your App.xaml file in the drop down. Here's the default XAML file:

<Application
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  StartupUri="[mainpage].xaml">
  <Application.Resources>
  </Application.Resources>
</Application>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值