summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WinRT.Tablet
diff options
context:
space:
mode:
authorPaul DiPietro <pauldipietro@users.noreply.github.com>2017-03-03 06:31:46 -0600
committerRui Marinho <me@ruimarinho.net>2017-03-03 12:31:46 +0000
commit8871077f115e7ef4d15efaa418fd718089db42c7 (patch)
tree91faf77329b6c1be984f36665ea80d6ae6a57589 /Xamarin.Forms.Platform.WinRT.Tablet
parent38c0b34e91e2148e78704432afec6b086c9fc0c9 (diff)
downloadxamarin-forms-8871077f115e7ef4d15efaa418fd718089db42c7.tar.gz
xamarin-forms-8871077f115e7ef4d15efaa418fd718089db42c7.tar.bz2
xamarin-forms-8871077f115e7ef4d15efaa418fd718089db42c7.zip
[WinRT/UWP] Make TextBox better respect background color changes via behaviors (#749)
Diffstat (limited to 'Xamarin.Forms.Platform.WinRT.Tablet')
-rw-r--r--Xamarin.Forms.Platform.WinRT.Tablet/FormsTextBoxStyle.xaml14
1 files changed, 13 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.WinRT.Tablet/FormsTextBoxStyle.xaml b/Xamarin.Forms.Platform.WinRT.Tablet/FormsTextBoxStyle.xaml
index 3e5f5646..c385d53e 100644
--- a/Xamarin.Forms.Platform.WinRT.Tablet/FormsTextBoxStyle.xaml
+++ b/Xamarin.Forms.Platform.WinRT.Tablet/FormsTextBoxStyle.xaml
@@ -123,12 +123,22 @@
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" />
</ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
+ Storyboard.TargetProperty="Background">
+ <DiscreteObjectKeyFrame KeyTime="0"
+ Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" />
+ </ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource TextBoxDisabledBorderThemeBrush}" />
</ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
+ Storyboard.TargetProperty="Background">
+ <DiscreteObjectKeyFrame KeyTime="0"
+ Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" />
+ </ObjectAnimationUsingKeyFrames>
+ <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement"
Storyboard.TargetProperty="Foreground">
<DiscreteObjectKeyFrame KeyTime="0"
Value="{ThemeResource TextBoxDisabledForegroundThemeBrush}" />
@@ -198,6 +208,7 @@
Grid.ColumnSpan="2"
Grid.RowSpan="1" />
<Border x:Name="BorderElement"
+ Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
Grid.Row="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
@@ -212,6 +223,7 @@
ContentTemplate="{TemplateBinding HeaderTemplate}"
FontWeight="Semilight" />
<ScrollViewer x:Name="ContentElement"
+ Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
Grid.Row="1"
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"