代码拉取完成,页面将自动刷新
<ContentControl
x:Class="StaffRandomSelect.Input"
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:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
xmlns:local="clr-namespace:StaffRandomSelect"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="450"
d:DesignWidth="800"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{materialDesign:MaterialDesignFont}"
TextElement.FontSize="14"
TextElement.FontWeight="Medium"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
mc:Ignorable="d">
<ContentControl.Resources>
<Style TargetType="StackPanel">
<Setter Property="Margin" Value="0,20,0,20" />
</Style>
<Style TargetType="DockPanel">
<Setter Property="Margin" Value="0,20,0,20" />
</Style>
<Style TargetType="Slider">
<Setter Property="Margin" Value="0,20,0,20" />
</Style>
<Style TargetType="Button">
<Setter Property="Margin" Value="0,20,0,20" />
</Style>
</ContentControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="0,10,10,10"
VerticalAlignment="Center"
FontFamily="Microsoft YaHei"
FontWeight="Bold"
Text="干员名称:"
TextAlignment="Right" />
<TextBox
x:Name="NameTextBox"
Grid.Row="0"
Grid.Column="1"
MinWidth="100"
Margin="0,10,10,10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
materialDesign:HintAssist.Hint="名称"
Cursor="IBeam"
FontFamily="Microsoft YaHei"
TextAlignment="Left"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="0,10,10,10"
VerticalAlignment="Center"
FontFamily="Microsoft YaHei"
FontWeight="Bold"
Text="稀有度:"
TextAlignment="Right" />
<materialDesign:RatingBar
x:Name="StarBar"
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Max="6"
Min="1"
ValueChanged="BasicRatingBar_ValueChanged"
Value="1" />
<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="0,10,10,10"
VerticalAlignment="Center"
FontFamily="Microsoft YaHei"
FontWeight="Bold"
Text="等级:"
TextAlignment="Right" />
<DockPanel
Grid.Row="2"
Grid.Column="1"
Margin="0,10,10,10"
HorizontalAlignment="Left"
VerticalAlignment="Center">
<TextBlock
VerticalAlignment="Center"
DockPanel.Dock="Left"
FontFamily="Microsoft YaHei"
Foreground="#673ab7"
Text="精英" />
<TextBox
x:Name="EliteTextBox"
MinWidth="15"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
input:InputMethod.IsInputMethodEnabled="False"
Cursor="IBeam"
DockPanel.Dock="Left"
FontFamily="Microsoft YaHei"
LostFocus="EliteTextBox_LostFocus"
PreviewKeyDown="EliteTextBox_KeyDown"
Text="2"
TextAlignment="Center"
TextWrapping="Wrap" />
<TextBlock
VerticalAlignment="Center"
DockPanel.Dock="Left"
FontFamily="Microsoft YaHei"
Foreground="#673ab7"
Text="等级" />
<TextBox
x:Name="RankTextBox"
MinWidth="30"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
input:InputMethod.IsInputMethodEnabled="False"
Cursor="IBeam"
DockPanel.Dock="Left"
FontFamily="Microsoft YaHei"
LostFocus="RankTextBox_LostFocus"
PreviewKeyDown="RankTextBox_PreviewKeyDown"
Text="1"
TextAlignment="Center"
TextWrapping="Wrap" />
</DockPanel>
<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="0,10,10,10"
VerticalAlignment="Center"
FontFamily="Microsoft YaHei"
FontWeight="Bold"
Text="职业:"
TextAlignment="Right" />
<ComboBox
x:Name="ComboBox"
Grid.Row="3"
Grid.Column="1"
Margin="0,10,10,10"
HorizontalAlignment="Left"
VerticalAlignment="Center"
materialDesign:HintAssist.Hint="选择"
FontFamily="Microsoft YaHei"
IsEnabled="{Binding Path=IsChecked, ElementName=FilledComboBoxEnabledCheckBox}"
Style="{StaticResource MaterialDesignFilledComboBox}">
<ComboBoxItem Content="先锋" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="近卫" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="狙击" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="重装" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="医疗" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="辅助" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="术师" FontFamily="Microsoft YaHei" />
<ComboBoxItem Content="特种" FontFamily="Microsoft YaHei" />
</ComboBox>
<Button
Grid.Row="4"
Grid.ColumnSpan="2"
Width="100"
Margin="0,20,0,20"
materialDesign:ButtonAssist.CornerRadius="10"
Click="Input_Click"
Cursor="Hand"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
Style="{StaticResource MaterialDesignRaisedButton}">
<TextBlock
Width="auto"
FontWeight="Bold"
Text="录入" />
</Button>
<materialDesign:Snackbar
x:Name="SnackbarOne"
Grid.Row="5"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="LightGray"
Foreground="MediumPurple"
IsActive="False"
Message="列表中已有该干员" />
<materialDesign:Snackbar
x:Name="SnackbarTwo"
Grid.Row="5"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="LightGray"
Foreground="MediumPurple"
IsActive="False"
Message="请选择职阶" />
<materialDesign:Snackbar
x:Name="SnackbarThree"
Grid.Row="5"
Grid.ColumnSpan="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="MediumPurple"
Foreground="White"
IsActive="False"
Message="添加成功" />
</Grid>
</ContentControl>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。