WPF中的app.xaml有什么用处,如何使用?

最好举个例子!

app.xaml就是起始页等一堆参数的配置,相当于控制台程序的Main,是整个程序的入口;比如:
<Application x:Class="ViewControl.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>

这个里面的StartupUri就是设置起始页的追问

怎么使用?

   比如说

    如何定义一个全局变量,可以在各个窗口调用?

    APP.xaml.cs又如何使用?

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答