Category 1996世界杯

案例一:基本窗口创建

1.1 创建新项目

首先,打开Visual Studio,创建一个新的WPF应用程序项目。

using System.Windows;

namespace BasicWindowExample

{

public partial class MainWindow : Window

{

public MainWindow()

{

InitializeComponent();

}

}

}

1.2 设计窗口

在XAML中设计基本窗口。

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="基本窗口" Height="350" Width="525">

1.3 运行程序

编译并运行程序,你将看到一个简单的窗口。

案例二:添加按钮

2.1 添加按钮控件

在XAML中添加一个按钮控件。

top
Copyright © 2088 足球世界杯预选赛_荷兰世界杯 - twllb.com All Rights Reserved.
友情链接