[Windows] Fix crash when toggling IsPassword on multiple Entry controls (#405)

* [Windows] Fix crash when toggling IsPassword on multiple Entry controls
This commit is contained in:
Jimmy Garrido 2016-10-11 11:59:41 -07:00 коммит произвёл Stephane Delcroix
Родитель 44397cb57d
Коммит caa3816b0c
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -37,7 +37,7 @@ namespace Xamarin.Forms.Platform.WinRT
public new static readonly DependencyProperty TextProperty = DependencyProperty.Register(nameof(Text), typeof(string), typeof(FormsTextBox), new PropertyMetadata("", TextPropertyChanged));
static InputScope s_passwordInputScope;
InputScope passwordInputScope;
Border _borderElement;
InputScope _cachedInputScope;
bool _cachedPredictionsSetting;
@ -87,20 +87,20 @@ namespace Xamarin.Forms.Platform.WinRT
set { SetValue(TextProperty, value); }
}
static InputScope PasswordInputScope
InputScope PasswordInputScope
{
get
{
if (s_passwordInputScope != null)
if (passwordInputScope != null)
{
return s_passwordInputScope;
return passwordInputScope;
}
s_passwordInputScope = new InputScope();
passwordInputScope = new InputScope();
var name = new InputScopeName { NameValue = InputScopeNameValue.Default };
s_passwordInputScope.Names.Add(name);
passwordInputScope.Names.Add(name);
return s_passwordInputScope;
return passwordInputScope;
}
}