xaml文件内容
<Window x:Class="Wpf_demo1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Wpf_demo1"
mc:Ignorable="d"
Title="开始学习WPF" Height="450" Width="800">
<!--x:Class="Wpf_demo1.MainWindow"这里的MainWindow名称与.xaml.cs上的public partial class 名称相同-->
<!--上述区域代表非客户区,正常来说只能修改Title的属性-->
<!--<Grid>
-->
<!--Grid区域代表客户区-->
<!--
<Button Width="122" HorizontalAlignment="Right" Margin="0,70,606,244"/>
<Button Width="122" HorizontalAlignment="Left" Margin="476,217,0,97"/>
</Grid>-->
<Grid ShowGridLines="True">
<Grid.RowDefinitions><!--行的定义-->
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions><!--列的定义-->
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Row="1" Grid.Column="1" Content="Ffgfg"/>
<Button Grid.Row="1" Grid.Column="2"/>
</Grid>
</Window>