ad38e4d3e1
This reverts commit 00a338c202.
93 lines
6.1 KiB
XML
93 lines
6.1 KiB
XML
<UserControl x:Class="EgtTextBox"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<Grid>
|
|
<Border x:Name="Brd"
|
|
BorderThickness="1"
|
|
Padding="1"
|
|
AllowDrop="true"
|
|
FocusVisualStyle="{x:Null}"
|
|
ScrollViewer.PanningMode="VerticalFirst"
|
|
Stylus.IsFlicksEnabled="False">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="True">
|
|
<Setter Property="Background" Value="{Binding BackgroundBrdEnable,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" Value="{Binding BackgroundBrdDisable,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="BorderBrush" Value="{Binding BorderBrushIsMouseOver,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Setter Property="Cursor" Value="IBeam"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="False">
|
|
<Setter Property="BorderBrush" Value="{Binding GeneralBorderBrush,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Setter Property="Cursor" Value="Arrow"/>
|
|
</Trigger>
|
|
<Trigger Property="IsKeyboardFocused" Value="True">
|
|
<Setter Property="BorderBrush" Value="{Binding BorderBrushBrdIsFocused,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock Name="TxBl"
|
|
Visibility="Visible"
|
|
Padding="2,0,2,0">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Background" Value="{Binding BackgroundTxBlDisable,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Setter Property="Foreground" Value="{Binding ForegroundTxBlDisable,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="True">
|
|
<Setter Property="Background" Value="{Binding GeneralBackground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Setter Property="Foreground" Value="{Binding ForegroundTxBlEnable,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Border>
|
|
|
|
<TextBox Name="TxBx"
|
|
Visibility="Hidden"
|
|
Padding="1,1,1,0"
|
|
Foreground="{Binding GeneralForeground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
|
Background="{Binding GeneralBackground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
|
CharacterCasing="{Binding MyCharacterCasing,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Grid>
|
|
</UserControl>
|