From a9747e0bd67ce574996feece816c3645faac5292 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 3 May 2018 22:40:22 +0100 Subject: [PATCH] whitespace. --- samples/ControlCatalog/Pages/TextBoxPage.xaml | 6 +++--- src/Avalonia.Controls/TextBox.cs | 14 +++++++------- src/Avalonia.Themes.Default/TextBox.xaml | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/samples/ControlCatalog/Pages/TextBoxPage.xaml b/samples/ControlCatalog/Pages/TextBoxPage.xaml index 96b534fc58..db1c9cb69d 100644 --- a/samples/ControlCatalog/Pages/TextBoxPage.xaml +++ b/samples/ControlCatalog/Pages/TextBoxPage.xaml @@ -10,8 +10,8 @@ - @@ -22,7 +22,7 @@ Text="Password" /> - + diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index a0096ef7ae..78ef532a26 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -32,7 +32,7 @@ namespace Avalonia.Controls (o, v) => o.CaretIndex = v); public static readonly StyledProperty PasswordCharProperty = - AvaloniaProperty.Register(nameof(PasswordChar)); + AvaloniaProperty.Register(nameof(PasswordChar)); public static readonly StyledProperty IsReadOnlyProperty = AvaloniaProperty.Register(nameof(IsReadOnly)); @@ -84,7 +84,7 @@ namespace Avalonia.Controls public bool Equals(UndoRedoState other) => ReferenceEquals(Text, other.Text) || Equals(Text, other.Text); } - + private string _text; private int _caretIndex; private int _selectionStart; @@ -93,7 +93,7 @@ namespace Avalonia.Controls private UndoRedoHelper _undoRedoHelper; private bool _isUndoingRedoing; private bool _ignoreTextChanges; - private static readonly string[] invalidCharacters = new String[1]{"\u007f"}; + private static readonly string[] invalidCharacters = new String[1] { "\u007f" }; static TextBox() { @@ -267,7 +267,7 @@ namespace Avalonia.Controls _presenter = e.NameScope.Get("PART_TextPresenter"); _presenter.Cursor = new Cursor(StandardCursorType.Ibeam); - if(IsFocused) + if (IsFocused) { _presenter.ShowCaret(); } @@ -608,7 +608,7 @@ namespace Avalonia.Controls DataValidationErrors.SetError(this, status.Error); } } - + private int CoerceCaretIndex(int value) => CoerceCaretIndex(value, Text?.Length ?? 0); private int CoerceCaretIndex(int value, int length) @@ -862,9 +862,9 @@ namespace Avalonia.Controls private void SetTextInternal(string value) { try - { + { _ignoreTextChanges = true; - SetAndRaise(TextProperty, ref _text, value); + SetAndRaise(TextProperty, ref _text, value); } finally { diff --git a/src/Avalonia.Themes.Default/TextBox.xaml b/src/Avalonia.Themes.Default/TextBox.xaml index 52e98b0c57..89c445eac5 100644 --- a/src/Avalonia.Themes.Default/TextBox.xaml +++ b/src/Avalonia.Themes.Default/TextBox.xaml @@ -11,7 +11,7 @@ BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"> - + - + + TextWrapping="{TemplateBinding TextWrapping}"/>