<UserControl x:Class="DeviceService.CanDeviceConfigControl"
|
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:sys="clr-namespace:System;assembly=mscorlib"
|
xmlns:dm="clr-namespace:DeviceService.Core;assembly=DeviceService.Core"
|
mc:Ignorable="d"
|
d:DesignHeight="220" d:DesignWidth="420">
|
<UserControl.Resources>
|
<ObjectDataProvider x:Key="AccessTypeValues" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
|
<ObjectDataProvider.MethodParameters>
|
<x:Type TypeName="dm:AccessType" />
|
</ObjectDataProvider.MethodParameters>
|
</ObjectDataProvider>
|
</UserControl.Resources>
|
<Grid VerticalAlignment="Top">
|
<StackPanel>
|
<Grid>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="80" />
|
<ColumnDefinition Width="*" />
|
</Grid.ColumnDefinitions>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
</Grid.RowDefinitions>
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="ID" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}" Margin="0,6" />
|
<TextBox Grid.Row="0" Grid.Column="1" Style="{StaticResource InputTextBox}"
|
Text="{Binding DeviceId, UpdateSourceTrigger=PropertyChanged}" Margin="0,4" />
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="品牌" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}" Margin="0,6" />
|
<TextBox Grid.Row="2" Grid.Column="1" Style="{StaticResource InputTextBox}"
|
Text="{Binding Brand, UpdateSourceTrigger=PropertyChanged}" Margin="0,4" />
|
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="连接端点" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}" Margin="0,6" />
|
<TextBox Grid.Row="3" Grid.Column="1" Style="{StaticResource InputTextBox}"
|
Text="{Binding ConnectStr, UpdateSourceTrigger=PropertyChanged}" Margin="0,4" />
|
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="访问类型" VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}" Margin="0,6" />
|
<ComboBox Grid.Row="4" Grid.Column="1" Margin="0,4"
|
Padding="8,6"
|
ItemsSource="{Binding Source={StaticResource AccessTypeValues}}"
|
SelectedItem="{Binding AccessType, Mode=TwoWay}" />
|
</Grid>
|
</StackPanel>
|
</Grid>
|
</UserControl>
|