<Window x:Class="DeskRedis.WinAddKey" 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:DeskRedis" xmlns:cc="clr-namespace:DeskRedis.MyControl.CustomControl" mc:Ignorable="d" WindowStartupLocation="CenterScreen" Title="添加新建" Height="600" Width="500" Background="#FFFFFF" Icon="redis.ico"> <Grid Margin="5"> <Grid.RowDefinitions> <RowDefinition Height="36"/> <RowDefinition Height="40"/> <RowDefinition Height="Auto"/> <RowDefinition Height="32"/> <RowDefinition Height="*"/> <RowDefinition Height="40"/> </Grid.RowDefinitions> <TextBlock Text="键名:" Grid.Row="0" VerticalAlignment="Center"/> <TextBox x:Name="tbKey" Margin="50 0 10 0" Grid.Row="0" Height="30" VerticalContentAlignment="Center" VerticalAlignment="Center"/> <TextBlock Grid.Row="1" Text="类型:" Margin="0 0 10 0" VerticalAlignment="Center"/> <ComboBox x:Name="cbbType" Grid.Row="1" Height="30" Margin="50 0 10 0" IsReadOnly="True" VerticalContentAlignment="Center" SelectionChanged="CbbType_SelectionChanged"/> <Grid x:Name="gridScore" Grid.Row="2" Visibility="Collapsed"> <Grid.RowDefinitions> <RowDefinition Height="26"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <TextBlock Text="排序号:" VerticalAlignment="Bottom"/> <TextBox x:Name="tbScore" Grid.Row="1" Margin="0 5 0 0" Height="28" Text="0.0" VerticalContentAlignment="Center" VerticalScrollBarVisibility="Auto"/> </Grid> <Grid x:Name="gridHashKey" Grid.Row="2" Visibility="Visible"> <Grid.RowDefinitions> <RowDefinition Height="26"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <TextBlock Text="HashKey:" VerticalAlignment="Bottom" Margin="0 0 0 3"/> <TextBox x:Name="tbHashKey" Grid.Row="1" TextWrapping="Wrap" Height="100" VerticalScrollBarVisibility="Auto"/> </Grid> <TextBlock Grid.Row="3" Margin="0 0 0 3" VerticalAlignment="Bottom" Text="值:"/> <TextBox x:Name="tbValue" Grid.Row="4"/> <StackPanel Grid.Row="5" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right"> <cc:PathButton x:Name="btnSave" Width="70" Height="23" Content="保 存" Margin="0 0 15 0" CornerRadius="0" PathData="{StaticResource ResourceKey=Save}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="BtnSave_Click"/> <cc:PathButton x:Name="btnCancel" Width="70" Height="23" Content="取 消" CornerRadius="0" PathData="{StaticResource ResourceKey=Cancel}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="BtnCancel_Click"/> </StackPanel> </Grid> </Window>