Browse Source
Merge pull request #1850 from MihaMarkic/passwordchar_affects_render
Fixes #1847 PasswordChar change doesn't affect render
pull/1860/head
Jumar Macato
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
0 deletions
-
src/Avalonia.Controls/Presenters/TextPresenter.cs
|
|
|
@ -35,6 +35,11 @@ namespace Avalonia.Controls.Presenters |
|
|
|
private int _selectionEnd; |
|
|
|
private bool _caretBlink; |
|
|
|
private IBrush _highlightBrush; |
|
|
|
|
|
|
|
static TextPresenter() |
|
|
|
{ |
|
|
|
AffectsRender(PasswordCharProperty); |
|
|
|
} |
|
|
|
|
|
|
|
public TextPresenter() |
|
|
|
{ |
|
|
|
@ -49,6 +54,9 @@ namespace Avalonia.Controls.Presenters |
|
|
|
|
|
|
|
this.GetObservable(CaretIndexProperty) |
|
|
|
.Subscribe(CaretIndexChanged); |
|
|
|
|
|
|
|
this.GetObservable(PasswordCharProperty) |
|
|
|
.Subscribe(_ => InvalidateFormattedText()); |
|
|
|
} |
|
|
|
|
|
|
|
public int CaretIndex |
|
|
|
|