33 lines
1.7 KiB
XML
33 lines
1.7 KiB
XML
<Window x:Class="WPF基础_6_Grid7跨行和列的对话框.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"
|
|
mc:Ignorable="d"
|
|
Title="MainWindow" Height="450" Width="800">
|
|
<Grid ShowGridLines="True" UseLayoutRounding="True">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBox Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Margin="10" Padding="5" BorderBrush="Red"
|
|
BorderThickness="8" FontSize="26" Foreground="SeaGreen" SelectionBrush="Coral">
|
|
这是个对话框
|
|
</TextBox>
|
|
<!-- <StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" Margin="10"> -->
|
|
<!-- <Button Margin="0 0 2 0" Padding="5 2">确认</Button> -->
|
|
<!-- <Button Margin="2 0 0 0" Padding="5 2">取消</Button> -->
|
|
<!-- </StackPanel> -->
|
|
<Button Grid.Row="1" Grid.Column="1" Background="DeepSkyBlue" Foreground="White" Margin="10 10 2 10"
|
|
Padding="10 5">
|
|
确认
|
|
</Button>
|
|
<Button Grid.Row="1" Grid.Column="2" Background="Orange" Foreground="White" Margin="2 10 10 10" Padding="10 5">取消</Button>
|
|
</Grid>
|
|
</Window> |