aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchMultiLineTextBox.xaml
blob: 69bdcb7569de0a72a3f8e8b4a6c1ed9b78cde7d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard"
                    xmlns:local="clr-namespace:Tango.Touch.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Resources/Colors.xaml" />
    </ResourceDictionary.MergedDictionaries>


    <Style TargetType="{x:Type local:TouchMultiLineTextBox}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource TangoDividerBrush}"></Setter>
        <Setter Property="Foreground" Value="{StaticResource TangoDarkForegroundBrush}"></Setter>
        <Setter Property="AcceptsReturn" Value="True"></Setter>
        <Setter Property="TextWrapping" Value="Wrap"></Setter>
        <Setter Property="Height" Value="60"></Setter>
        <Setter Property="Padding" Value="5"></Setter>
        <Setter Property="CornerRadius" Value="3"></Setter>
        <Setter Property="BorderThickness" Value="1"></Setter>
        <Setter Property="keyboard:KeyboardView.Mode" Value="AlphaNumeric"></Setter>
        <Setter Property="keyboard:KeyboardView.Container" Value="{Binding RelativeSource={RelativeSource Self},Path=KeyboardContainer}"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:TouchMultiLineTextBox}">
                    <Border x:Name="border" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
                        <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Opacity" TargetName="border" Value="0.56"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TangoDarkForegroundBrush}"/>
                        </Trigger>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TangoDarkForegroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>