<Window x:Class="DeviceService.AddDeviceWindow"
|
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="添加设备"
|
Width="480" Height="440"
|
MinWidth="420" MinHeight="360"
|
WindowStartupLocation="CenterOwner"
|
ResizeMode="CanResize"
|
Background="{StaticResource PageBackgroundBrush}">
|
<Grid Margin="12">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="*" />
|
<RowDefinition Height="Auto" />
|
</Grid.RowDefinitions>
|
|
<!-- 设备类型选择 -->
|
<Border Grid.Row="0" Style="{StaticResource CardBorder}" Padding="10">
|
<StackPanel>
|
<TextBlock Text="设备类型"
|
Style="{StaticResource TitleText}"
|
Margin="2,0,0,8" />
|
<ComboBox x:Name="TypeCombo"
|
Padding="8,6"
|
SelectionChanged="TypeCombo_SelectionChanged" />
|
</StackPanel>
|
</Border>
|
|
<!-- 选型后加载的配置控件 -->
|
<Border Grid.Row="1" Style="{StaticResource CardBorder}" Margin="0,10,0,0">
|
<ContentControl x:Name="ControlHost" Margin="4" Focusable="False" />
|
</Border>
|
|
<!-- 底部按钮 -->
|
<StackPanel Grid.Row="2"
|
Orientation="Horizontal"
|
HorizontalAlignment="Right"
|
Margin="0,10,0,0">
|
<Button x:Name="OkButton"
|
Style="{StaticResource PrimaryButton}"
|
MinWidth="88"
|
Content="确定"
|
IsEnabled="False"
|
Click="OkButton_Click" />
|
<Button x:Name="CancelButton"
|
Style="{StaticResource SecondaryButton}"
|
MinWidth="88"
|
Margin="8,0,0,0"
|
Content="取消"
|
Click="CancelButton_Click" />
|
</StackPanel>
|
</Grid>
|
</Window>
|