window1.xaml

来自「C#高级编程第6版随书源代码 值得下载」· XAML 代码 · 共 32 行

XAML
32
字号
<Window x:Class="RoomReservationClient.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Room Reservation" Height="300" Width="365">
   <Grid >
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="Auto" />
         <ColumnDefinition />
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
         <RowDefinition />
         <RowDefinition />
         <RowDefinition />
         <RowDefinition />
         <RowDefinition />      
         <RowDefinition />
      </Grid.RowDefinitions>
      <Label HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" Margin="5">Room:</Label>
      <Label Grid.Column="0" Grid.Row="1" Margin="5">Begin time:</Label>
      <Label Grid.Column="0" Grid.Row="2" Margin="5">End time:</Label>
      <Label Grid.Column="0" Grid.Row="3" Margin="5">Contact:</Label>
      <Label Grid.Column="0" Grid.Row="4" Margin="5">Event:</Label>
      <TextBox Grid.Column="1" Grid.Row="0" Margin="10" x:Name="textRoom" />
      <TextBox Grid.Column="1" Grid.Row="1" Margin="10" x:Name="textStartTime" />
      <TextBox Grid.Column="1" Grid.Row="2" Margin="10" x:Name="textEndTime" />
      <TextBox Grid.Column="1" Grid.Row="3" Margin="10" x:Name="textContact" />
      <TextBox Grid.Column="1" Grid.Row="4" Margin="10" x:Name="textEvent" />
      <Button Grid.Column="1" Grid.Row="5" Margin="10" Click="OnReserveRoom">Reserve Room</Button>
      
   </Grid>
</Window>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?