Browse Source
Merge pull request #2107 from AvaloniaUI/features/textbox-ibeam-cursor
Features/textbox ibeam cursor
pull/2111/head
Nikita Tsukanov
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
src/Avalonia.Controls/TextBox.cs
-
src/Avalonia.Themes.Default/TextBox.xaml
|
|
@ -262,7 +262,6 @@ namespace Avalonia.Controls |
|
|
protected override void OnTemplateApplied(TemplateAppliedEventArgs e) |
|
|
protected override void OnTemplateApplied(TemplateAppliedEventArgs e) |
|
|
{ |
|
|
{ |
|
|
_presenter = e.NameScope.Get<TextPresenter>("PART_TextPresenter"); |
|
|
_presenter = e.NameScope.Get<TextPresenter>("PART_TextPresenter"); |
|
|
_presenter.Cursor = new Cursor(StandardCursorType.Ibeam); |
|
|
|
|
|
|
|
|
|
|
|
if (IsFocused) |
|
|
if (IsFocused) |
|
|
{ |
|
|
{ |
|
|
|
|
|
@ -62,4 +62,7 @@ |
|
|
<Style Selector="TextBox:error /template/ Border#border"> |
|
|
<Style Selector="TextBox:error /template/ Border#border"> |
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}"/> |
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}"/> |
|
|
</Style> |
|
|
</Style> |
|
|
</Styles> |
|
|
<Style Selector="TextBox"> |
|
|
|
|
|
<Setter Property="Cursor" Value="IBeam" /> |
|
|
|
|
|
</Style> |
|
|
|
|
|
</Styles> |
|
|
|