Files
ShrlAlgoToolkit/WPFDark/Controls/BiaTextBox.xaml
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

31 lines
1.9 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpf="clr-namespace:WPFDark"
xmlns:controls="clr-namespace:WPFDark.Controls">
<Style TargetType="{x:Type controls:BiaTextBox}">
<Setter Property="Background" Value="{DynamicResource TextBoxBackgroundBrushKey}" />
<Setter Property="BorderColor" Value="{DynamicResource TextBoxBorderColorKey}" />
<Setter Property="Foreground" Value="{DynamicResource TextBoxForegroundBrushKey}" />
<Setter Property="WatermarkForeground" Value="{DynamicResource TextBoxSubForegroundBrushKey}" />
<Setter Property="Height" Value="{x:Static wpf:Boxes.BasicOneLineHeight}" />
<Setter Property="CornerRadius" Value="{x:Static wpf:Boxes.BasicCornerRadiusPrim}" />
<Setter Property="Focusable" Value="True" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ActiveBackgroundBrushKey}" />
</Trigger>
<Trigger Property="IsReadOnly" Value="True">
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}" />
<Setter Property="WatermarkForeground" Value="{DynamicResource InactiveForegroundBrushKey}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource InactiveBackgroundBrushKey}" />
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}" />
<Setter Property="WatermarkForeground" Value="{DynamicResource InactiveForegroundBrushKey}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>