The following example shows how a standard application is defined using only markup:
|
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" />
|
The following example shows how a standard application is defined using only code:
|
using System; // STAThread
using System.Windows; // Application
namespace SDKSample
{
public class AppCode : Application
{
// Entry point method
[STAThread]
public static void Main()
{
AppCode app = new AppCode();
app.Run();
}
}
}
|
The following example shows how a standard application is defined using a combination of markup and code-behind.
|
<Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="SDKSample.App" />
|
|
using System.Windows; // Application
namespace SDKSample
{
public partial class App : Application { }
}
|