зеркало из https://github.com/DeGsoft/maui-linux.git
[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:
Родитель
44397cb57d
Коммит
caa3816b0c
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче