95551c5049
-pulito codice
114 lines
7.8 KiB
XML
114 lines
7.8 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">
|
|
|
|
<!--<UserControl.Resources>
|
|
<LinearGradientBrush x:Key="BrushBorderIsMouseOverFText" EndPoint="0,20" MappingMode="Absolute" StartPoint="0,0">
|
|
<GradientStop Color="#ABADB3" Offset="0.05"/>
|
|
<GradientStop Color="#E2E3EA" Offset="0.07"/>
|
|
<GradientStop Color="#E3E9EF" Offset="1"/>
|
|
</LinearGradientBrush>
|
|
</UserControl.Resources>-->
|
|
|
|
<Grid>
|
|
|
|
<Border x:Name="Brd"
|
|
BorderThickness="1"
|
|
Padding="1"
|
|
AllowDrop="true"
|
|
FocusVisualStyle="{x:Null}"
|
|
ScrollViewer.PanningMode="VerticalFirst"
|
|
Stylus.IsFlicksEnabled="False">
|
|
<!--Background="{Binding CCBackground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"-->
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="True">
|
|
<!--<Setter Property="Background" Value="{DynamicResource BackgroundBorderEnableTText}"/>-->
|
|
<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="{DynamicResource BackgroundBorderEnableFText}"/>-->
|
|
<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="{DynamicResource BrushBorderIsMouseOverTText}"/>-->
|
|
<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="{DynamicResource BrushBorderIsMouseOverFText}"/>-->
|
|
<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="{DynamicResource BrushBorderIsKeyboardFocusedTText}"/>-->
|
|
<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="{DynamicResource BackgroundTextBlockIsEnableFText}"/>-->
|
|
<Setter Property="Background" Value="{Binding BackgroundTxBlDisable,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<!--<Setter Property="Foreground" Value="{DynamicResource ForegroundTextBlockIsEnableFText}"/>-->
|
|
<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="{DynamicResource BackgroundTextBlockIsEnableTText}"/>-->
|
|
<Setter Property="Background" Value="{Binding GeneralBackground,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtTextBox}},
|
|
Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
|
|
<!--<Setter Property="Foreground" Value="{DynamicResource ForegroundTextBlockIsEnableTText}"/>-->
|
|
<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>
|
|
|
|
<!--Background="{DynamicResource BackgroundTextBoxText}"-->
|
|
<!--Foreground="{DynamicResource ForegroundTextBoxText}"-->
|
|
<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>
|