我想禁用懸停和鼠標移動密碼框的效果。因爲我將passwordbox Style屬性設置爲我的自定義屬性,並且它們重疊。我如何禁用密碼箱的默認效果?如何禁用密碼框懸停,聚焦,鼠標效果
這裏是passwordBox的XAML和它的風格
<PasswordBox x:Name="PassBox" MaxLength="40" PasswordChar="*" MinWidth="250" Style="{StaticResource PasswordBoxWithValidation}" Margin="10" />
這裏是passwordbox
<Style x:Key="PasswordBoxWithValidation" TargetType="PasswordBox">
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="BorderBrush" Value="Red" />
<Setter Property="ToolTipService.ShowDuration" Value="20000" />
<Setter Property="ToolTip">
<Setter.Value>
<ToolTip DataContext="{Binding Path=PlacementTarget, RelativeSource={RelativeSource Self}}">
<ItemsControl ItemsSource="{Binding Path=(Validation.Errors)}" DisplayMemberPath="ErrorContent" />
</ToolTip>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>