diff --git a/.nuspec/Xamarin.Forms.nuspec b/.nuspec/Xamarin.Forms.nuspec
index f57e53adda5..16520f0fd09 100644
--- a/.nuspec/Xamarin.Forms.nuspec
+++ b/.nuspec/Xamarin.Forms.nuspec
@@ -239,6 +239,7 @@
+
diff --git a/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj b/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
index a4952000455..58ad67b3eb5 100644
--- a/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
+++ b/Xamarin.Forms.ControlGallery.WindowsUniversal/Xamarin.Forms.ControlGallery.WindowsUniversal.csproj
@@ -12,7 +12,7 @@
Xamarin.Forms.ControlGallery.WindowsUniversal
en-US
UAP
- 10.0.10240.0
+ 10.0.10586.0
10.0.10240.0
14
true
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs
index 4cd6cf5f17d..f943f1586bb 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/DefaultColorToggleTest.cs
@@ -58,7 +58,7 @@ static ContentPage PasswordPage()
static ContentPage SearchBarPage()
{
- var searchbarTextColorDefaultToggle = new Entry() { Text = "Default SearchBar Text Color" };
+ var searchbarTextColorDefaultToggle = new SearchBar() { Text = "Default SearchBar Text Color" };
var searchbarTextColorToggleButton = new Button() { Text = "Toggle SearchBar Color" };
searchbarTextColorToggleButton.Clicked += (sender, args) => {
if (searchbarTextColorDefaultToggle.TextColor.IsDefault)
@@ -73,7 +73,7 @@ static ContentPage SearchBarPage()
}
};
- var searchbarPlaceholderColorDefaultToggle = new Entry() { Placeholder = "Default Placeholder Color" };
+ var searchbarPlaceholderColorDefaultToggle = new SearchBar() { Placeholder = "Default Placeholder Color" };
var searchbarPlaceholderToggleButton = new Button() { Text = "Toggle Placeholder Color" };
searchbarPlaceholderToggleButton.Clicked += (sender, args) => {
if (searchbarPlaceholderColorDefaultToggle.PlaceholderColor.IsDefault)
diff --git a/Xamarin.Forms.Platform.UAP/AutoSuggestStyle.xaml b/Xamarin.Forms.Platform.UAP/AutoSuggestStyle.xaml
new file mode 100644
index 00000000000..3c85a01f590
--- /dev/null
+++ b/Xamarin.Forms.Platform.UAP/AutoSuggestStyle.xaml
@@ -0,0 +1,389 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Visible
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml b/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml
index c573552a124..f449ad5bfb4 100644
--- a/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml
+++ b/Xamarin.Forms.Platform.UAP/FormsTextBoxStyle.xaml
@@ -8,6 +8,9 @@
+
+
+
@@ -15,7 +18,6 @@
-
@@ -123,7 +125,7 @@
-
+
@@ -137,7 +139,7 @@
-
+
diff --git a/Xamarin.Forms.Platform.UAP/Resources.xaml b/Xamarin.Forms.Platform.UAP/Resources.xaml
index 5df785f0506..5f3a49994ba 100644
--- a/Xamarin.Forms.Platform.UAP/Resources.xaml
+++ b/Xamarin.Forms.Platform.UAP/Resources.xaml
@@ -6,6 +6,7 @@
+
@@ -708,386 +709,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Visible
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs b/Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs
index 04e1058a363..9b80ade1dc4 100644
--- a/Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs
+++ b/Xamarin.Forms.Platform.UAP/SearchBarRenderer.cs
@@ -155,23 +155,11 @@ void UpdatePlaceholderColor()
Color placeholderColor = Element.PlaceholderColor;
- if (placeholderColor.IsDefault)
- {
- if (_defaultPlaceholderColorBrush == null)
- return;
-
- _queryTextBox.PlaceholderForegroundBrush = _defaultPlaceholderColorBrush;
- _queryTextBox.PlaceholderForegroundBrush = _defaultPlaceholderColorFocusBrush;
- }
-
- if (_defaultPlaceholderColorBrush == null)
- {
- _defaultPlaceholderColorBrush = _queryTextBox.PlaceholderForegroundBrush;
- _defaultPlaceholderColorFocusBrush = _queryTextBox.PlaceholderForegroundFocusBrush;
- }
+ BrushHelpers.UpdateColor(placeholderColor, ref _defaultPlaceholderColorBrush,
+ () => _queryTextBox.PlaceholderForegroundBrush, brush => _queryTextBox.PlaceholderForegroundBrush = brush);
- _queryTextBox.PlaceholderForegroundBrush = placeholderColor.ToBrush();
- _queryTextBox.PlaceholderForegroundFocusBrush = placeholderColor.ToBrush();
+ BrushHelpers.UpdateColor(placeholderColor, ref _defaultPlaceholderColorFocusBrush,
+ () => _queryTextBox.PlaceholderForegroundFocusBrush, brush => _queryTextBox.PlaceholderForegroundFocusBrush = brush);
}
void UpdateText()
@@ -186,23 +174,11 @@ void UpdateTextColor()
Color textColor = Element.TextColor;
- if (textColor.IsDefault)
- {
- if (_defaultTextColorBrush == null)
- return;
-
- _queryTextBox.Foreground = _defaultTextColorBrush;
- _queryTextBox.ForegroundFocusBrush = _defaultTextColorFocusBrush;
- }
-
- if (_defaultTextColorBrush == null)
- {
- _defaultTextColorBrush = _queryTextBox.Foreground;
- _defaultTextColorFocusBrush = _queryTextBox.ForegroundFocusBrush;
- }
+ BrushHelpers.UpdateColor(textColor, ref _defaultTextColorBrush,
+ () => _queryTextBox.Foreground, brush => _queryTextBox.Foreground = brush);
- _queryTextBox.Foreground = textColor.ToBrush();
- _queryTextBox.ForegroundFocusBrush = textColor.ToBrush();
+ BrushHelpers.UpdateColor(textColor, ref _defaultTextColorFocusBrush,
+ () => _queryTextBox.ForegroundFocusBrush, brush => _queryTextBox.ForegroundFocusBrush = brush);
}
}
}
\ No newline at end of file
diff --git a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
index 5ce6221e1e0..4e804819ba6 100644
--- a/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
+++ b/Xamarin.Forms.Platform.UAP/Xamarin.Forms.Platform.UAP.csproj
@@ -131,6 +131,9 @@
AlignmentExtensions.cs
+
+ BrushHelpers.cs
+
FormsTextBox.cs
@@ -421,6 +424,10 @@
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/Xamarin.Forms.Platform.WP8/BrushHelpers.cs b/Xamarin.Forms.Platform.WP8/BrushHelpers.cs
new file mode 100644
index 00000000000..993b23f4963
--- /dev/null
+++ b/Xamarin.Forms.Platform.WP8/BrushHelpers.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Windows.Media;
+
+namespace Xamarin.Forms.Platform.WinPhone
+{
+ internal static class BrushHelpers
+ {
+ ///
+ /// Handles the logic for setting a Xamarin.Forms Color for a Brush
+ /// while caching the original default brush
+ ///
+ /// The target Xamarin.Forms.Color
+ /// The renderer's cache for the default brush
+ /// Delegate for retrieving the Control's current Brush
+ /// Delegate for setting the Control's Brush
+ public static void UpdateColor(Color color, ref Brush defaultbrush, Func getter, Action setter)
+ {
+ if (color.IsDefault)
+ {
+ if (defaultbrush == null)
+ {
+ return;
+ }
+
+ setter(defaultbrush);
+ return;
+ }
+
+ if (defaultbrush == null)
+ {
+ defaultbrush = getter();
+ }
+
+ setter(color.ToBrush());
+ }
+ }
+}
diff --git a/Xamarin.Forms.Platform.WP8/EntryRenderer.cs b/Xamarin.Forms.Platform.WP8/EntryRenderer.cs
index b2749c05c45..00fdbb4a265 100644
--- a/Xamarin.Forms.Platform.WP8/EntryRenderer.cs
+++ b/Xamarin.Forms.Platform.WP8/EntryRenderer.cs
@@ -77,6 +77,7 @@ public class EntryRenderer : ViewRenderer
bool _fontApplied;
bool _ignoreTextChange;
Brush _placeholderDefaultBrush;
+ Brush _textDefaultBrush;
public override SizeRequest GetDesiredSize(double widthConstraint, double heightConstraint)
{
@@ -216,23 +217,12 @@ void UpdateColor()
if (Control == null)
return;
- Entry entry = Element;
- if (entry != null)
- {
- if (!IsNullOrEmpty(entry.Text))
- {
- if (!entry.TextColor.IsDefault)
- Control.Foreground = entry.TextColor.ToBrush();
- else
- Control.Foreground = (Brush)WControl.ForegroundProperty.GetMetadata(typeof(FormsPhoneTextBox)).DefaultValue;
-
- // Force the PhoneTextBox control to do some internal bookkeeping
- // so the colors change immediately and remain changed when the control gets focus
- Control.OnApplyTemplate();
- }
- }
- else
- Control.Foreground = (Brush)WControl.ForegroundProperty.GetMetadata(typeof(FormsPhoneTextBox)).DefaultValue;
+ BrushHelpers.UpdateColor(Element.TextColor, ref _textDefaultBrush,
+ () => Control.Foreground, brush => Control.Foreground = brush);
+
+ // Force the PhoneTextBox control to do some internal bookkeeping
+ // so the colors change immediately and remain changed when the control gets focus
+ Control.OnApplyTemplate();
}
void UpdateFont()
@@ -286,25 +276,8 @@ void UpdatePlaceholder()
void UpdatePlaceholderColor()
{
- Color placeholderColor = Element.PlaceholderColor;
-
- if (placeholderColor.IsDefault)
- {
- if (_placeholderDefaultBrush == null)
- return;
-
- // Use the cached default brush
- Control.PlaceholderForegroundBrush = _placeholderDefaultBrush;
- return;
- }
-
- if (_placeholderDefaultBrush == null)
- {
- // Cache the default brush in case we need to set the color back to default
- _placeholderDefaultBrush = Control.PlaceholderForegroundBrush;
- }
-
- Control.PlaceholderForegroundBrush = placeholderColor.ToBrush();
+ BrushHelpers.UpdateColor(Element.PlaceholderColor, ref _placeholderDefaultBrush,
+ () => Control.PlaceholderForegroundBrush, brush => Control.PlaceholderForegroundBrush = brush);
}
void UpdateText()
diff --git a/Xamarin.Forms.Platform.WP8/SearchBarRenderer.cs b/Xamarin.Forms.Platform.WP8/SearchBarRenderer.cs
index a71041da5f6..b37978d0c35 100644
--- a/Xamarin.Forms.Platform.WP8/SearchBarRenderer.cs
+++ b/Xamarin.Forms.Platform.WP8/SearchBarRenderer.cs
@@ -117,20 +117,8 @@ void UpdatePlaceholder()
void UpdatePlaceholderColor()
{
- Color placeholderColor = Element.PlaceholderColor;
-
- if (placeholderColor.IsDefault)
- {
- if (_defaultPlaceholderColorBrush == null)
- return;
-
- Control.PlaceholderForegroundBrush = _defaultPlaceholderColorBrush;
- }
-
- if (_defaultPlaceholderColorBrush == null)
- _defaultPlaceholderColorBrush = Control.PlaceholderForegroundBrush;
-
- Control.PlaceholderForegroundBrush = placeholderColor.ToBrush();
+ BrushHelpers.UpdateColor(Element.PlaceholderColor, ref _defaultPlaceholderColorBrush,
+ () => Control.PlaceholderForegroundBrush, brush => Control.PlaceholderForegroundBrush = brush);
}
void UpdateText()
@@ -140,20 +128,12 @@ void UpdateText()
void UpdateTextColor()
{
- Color textColor = Element.TextColor;
-
- if (textColor.IsDefault)
- {
- if (_defaultTextColorBrush == null)
- return;
-
- Control.Foreground = _defaultTextColorBrush;
- }
-
- if (_defaultTextColorBrush == null)
- _defaultTextColorBrush = Control.Foreground;
-
- Control.Foreground = textColor.ToBrush();
+ BrushHelpers.UpdateColor(Element.TextColor, ref _defaultTextColorBrush,
+ () => Control.Foreground, brush => Control.Foreground = brush);
+
+ // Force the PhoneTextBox control to do some internal bookkeeping
+ // so the colors change immediately and remain changed when the control gets focus
+ Control.OnApplyTemplate();
}
}
}
\ No newline at end of file
diff --git a/Xamarin.Forms.Platform.WP8/Xamarin.Forms.Platform.WP8.csproj b/Xamarin.Forms.Platform.WP8/Xamarin.Forms.Platform.WP8.csproj
index eda2cdceb02..e78234f5711 100644
--- a/Xamarin.Forms.Platform.WP8/Xamarin.Forms.Platform.WP8.csproj
+++ b/Xamarin.Forms.Platform.WP8/Xamarin.Forms.Platform.WP8.csproj
@@ -142,6 +142,7 @@
+
diff --git a/Xamarin.Forms.Platform.WinRT/BrushHelpers.cs b/Xamarin.Forms.Platform.WinRT/BrushHelpers.cs
new file mode 100644
index 00000000000..ae158b8ffbe
--- /dev/null
+++ b/Xamarin.Forms.Platform.WinRT/BrushHelpers.cs
@@ -0,0 +1,43 @@
+using System;
+using Windows.UI.Xaml.Media;
+
+#if WINDOWS_UWP
+
+namespace Xamarin.Forms.Platform.UWP
+#else
+
+namespace Xamarin.Forms.Platform.WinRT
+#endif
+{
+ internal static class BrushHelpers
+ {
+ ///
+ /// Handles the logic for setting a Xamarin.Forms Color for a Brush
+ /// while caching the original default brush
+ ///
+ /// The target Xamarin.Forms.Color
+ /// The renderer's cache for the default brush
+ /// Delegate for retrieving the Control's current Brush
+ /// Delegate for setting the Control's Brush
+ public static void UpdateColor(Color color, ref Brush defaultbrush, Func getter, Action setter)
+ {
+ if (color.IsDefault)
+ {
+ if (defaultbrush == null)
+ {
+ return;
+ }
+
+ setter(defaultbrush);
+ return;
+ }
+
+ if (defaultbrush == null)
+ {
+ defaultbrush = getter();
+ }
+
+ setter(color.ToBrush());
+ }
+ }
+}
\ No newline at end of file
diff --git a/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs b/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs
index f9f0b3a2329..c6e439ea90a 100644
--- a/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs
+++ b/Xamarin.Forms.Platform.WinRT/EntryRenderer.cs
@@ -1,4 +1,7 @@
-using System.ComponentModel;
+using System;
+using System.ComponentModel;
+using System.Reflection;
+using Windows.Foundation.Metadata;
using Windows.System;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
@@ -13,10 +16,12 @@ namespace Xamarin.Forms.Platform.WinRT
{
public class EntryRenderer : ViewRenderer
{
- Brush _backgroundColorFocusedDefaultBrush;
-
bool _fontApplied;
+ Brush _backgroundColorFocusedDefaultBrush;
Brush _placeholderDefaultBrush;
+ Brush _textDefaultBrush;
+ Brush _defaultTextColorFocusBrush;
+ Brush _defaultPlaceholderColorFocusBrush;
protected override void OnElementChanged(ElementChangedEventArgs e)
{
@@ -27,7 +32,6 @@ protected override void OnElementChanged(ElementChangedEventArgs e)
if (Control == null)
{
var textBox = new FormsTextBox { Style = Windows.UI.Xaml.Application.Current.Resources["FormsTextBoxStyle"] as Windows.UI.Xaml.Style };
-
SetNativeControl(textBox);
textBox.TextChanged += OnNativeTextChanged;
@@ -92,24 +96,8 @@ protected override void UpdateBackgroundColor()
}
// By default some platforms have alternate default background colors when focused
- Color backgroundColor = Element.BackgroundColor;
- if (backgroundColor.IsDefault)
- {
- if (_backgroundColorFocusedDefaultBrush == null)
- {
- return;
- }
-
- Control.BackgroundFocusBrush = _backgroundColorFocusedDefaultBrush;
- return;
- }
-
- if (_backgroundColorFocusedDefaultBrush == null)
- {
- _backgroundColorFocusedDefaultBrush = Control.BackgroundFocusBrush;
- }
-
- Control.BackgroundFocusBrush = backgroundColor.ToBrush();
+ BrushHelpers.UpdateColor(Element.BackgroundColor, ref _backgroundColorFocusedDefaultBrush,
+ () => Control.BackgroundFocusBrush, brush => Control.BackgroundFocusBrush = brush);
}
void OnNativeTextChanged(object sender, Windows.UI.Xaml.Controls.TextChangedEventArgs args)
@@ -190,25 +178,11 @@ void UpdatePlaceholderColor()
{
Color placeholderColor = Element.PlaceholderColor;
- if (placeholderColor.IsDefault)
- {
- if (_placeholderDefaultBrush == null)
- {
- return;
- }
-
- // Use the cached default brush
- Control.PlaceholderForegroundBrush = _placeholderDefaultBrush;
- return;
- }
-
- if (_placeholderDefaultBrush == null)
- {
- // Cache the default brush in case we need to set the color back to default
- _placeholderDefaultBrush = Control.PlaceholderForegroundBrush;
- }
+ BrushHelpers.UpdateColor(placeholderColor, ref _placeholderDefaultBrush,
+ () => Control.PlaceholderForegroundBrush, brush => Control.PlaceholderForegroundBrush = brush);
- Control.PlaceholderForegroundBrush = placeholderColor.ToBrush();
+ BrushHelpers.UpdateColor(placeholderColor, ref _defaultPlaceholderColorFocusBrush,
+ () => Control.PlaceholderForegroundFocusBrush, brush => Control.PlaceholderForegroundFocusBrush = brush);
}
void UpdateText()
@@ -218,7 +192,13 @@ void UpdateText()
void UpdateTextColor()
{
- Control.Foreground = Element.TextColor.ToBrush();
+ Color textColor = Element.TextColor;
+
+ BrushHelpers.UpdateColor(textColor, ref _textDefaultBrush,
+ () => Control.Foreground, brush => Control.Foreground = brush);
+
+ BrushHelpers.UpdateColor(textColor, ref _defaultTextColorFocusBrush,
+ () => Control.ForegroundFocusBrush, brush => Control.ForegroundFocusBrush = brush);
}
}
}
\ No newline at end of file
diff --git a/Xamarin.Forms.Platform.WinRT/FormsTextBox.cs b/Xamarin.Forms.Platform.WinRT/FormsTextBox.cs
index 03725cd8e76..4cb74ec7248 100644
--- a/Xamarin.Forms.Platform.WinRT/FormsTextBox.cs
+++ b/Xamarin.Forms.Platform.WinRT/FormsTextBox.cs
@@ -23,19 +23,19 @@ public class FormsTextBox : TextBox
{
const char ObfuscationCharacter = '●';
- public static readonly DependencyProperty PlaceholderForegroundBrushProperty = DependencyProperty.Register("PlaceholderForegroundBrush", typeof(Brush), typeof(FormsTextBox),
+ public static readonly DependencyProperty PlaceholderForegroundBrushProperty = DependencyProperty.Register(nameof(PlaceholderForegroundBrush), typeof(Brush), typeof(FormsTextBox),
new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty PlaceholderForegroundFocusBrushProperty = DependencyProperty.Register("PlaceholderForegroundFocusBrush", typeof(Brush), typeof(FormsTextBox),
+ public static readonly DependencyProperty PlaceholderForegroundFocusBrushProperty = DependencyProperty.Register(nameof(PlaceholderForegroundFocusBrush), typeof(Brush), typeof(FormsTextBox),
new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty ForegroundFocusBrushProperty = DependencyProperty.Register("ForegroundFocusBrush", typeof(Brush), typeof(FormsTextBox), new PropertyMetadata(default(Brush)));
+ public static readonly DependencyProperty ForegroundFocusBrushProperty = DependencyProperty.Register(nameof(ForegroundFocusBrush), typeof(Brush), typeof(FormsTextBox), new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty BackgroundFocusBrushProperty = DependencyProperty.Register("BackgroundFocusBrush", typeof(Brush), typeof(FormsTextBox), new PropertyMetadata(default(Brush)));
+ public static readonly DependencyProperty BackgroundFocusBrushProperty = DependencyProperty.Register(nameof(BackgroundFocusBrush), typeof(Brush), typeof(FormsTextBox), new PropertyMetadata(default(Brush)));
- public static readonly DependencyProperty IsPasswordProperty = DependencyProperty.Register("IsPassword", typeof(bool), typeof(FormsTextBox), new PropertyMetadata(default(bool), OnIsPasswordChanged));
+ public static readonly DependencyProperty IsPasswordProperty = DependencyProperty.Register(nameof(IsPassword), typeof(bool), typeof(FormsTextBox), new PropertyMetadata(default(bool), OnIsPasswordChanged));
- public new static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(FormsTextBox), new PropertyMetadata("", TextPropertyChanged));
+ public new static readonly DependencyProperty TextProperty = DependencyProperty.Register(nameof(Text), typeof(string), typeof(FormsTextBox), new PropertyMetadata("", TextPropertyChanged));
static InputScope s_passwordInputScope;
Border _borderElement;
@@ -120,13 +120,15 @@ protected override void OnGotFocus(RoutedEventArgs e)
{
base.OnGotFocus(e);
- // If we're on the phone, the Visual State Manager crashes if we try to
+#if !WINDOWS_UWP
+ // If we're on Windows 8.1 phone, the Visual State Manager crashes if we try to
// handle alternate background colors in the focus state; we have to do
// it manually here
if (Device.Idiom == TargetIdiom.Phone && _borderElement != null)
{
_borderElement.Background = BackgroundFocusBrush;
}
+#endif
}
void DelayObfuscation()
diff --git a/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj b/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj
index f6b3566a079..400737d0114 100644
--- a/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj
+++ b/Xamarin.Forms.Platform.WinRT/Xamarin.Forms.Platform.WinRT.csproj
@@ -68,6 +68,7 @@
+