From f2ecce6cc28ab715c6a175c01f7ee817fef03375 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Wed, 23 Mar 2016 23:18:25 +0100 Subject: [PATCH] Remove TextBox hacks. Now that we can have attached properties in bindings. --- src/Perspex.Controls/TextBox.cs | 10 ---------- src/Perspex.Themes.Default/TextBox.xaml | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/Perspex.Controls/TextBox.cs b/src/Perspex.Controls/TextBox.cs index e8f150851a..583322f1b0 100644 --- a/src/Perspex.Controls/TextBox.cs +++ b/src/Perspex.Controls/TextBox.cs @@ -26,16 +26,6 @@ namespace Perspex.Controls public static readonly StyledProperty AcceptsTabProperty = PerspexProperty.Register("AcceptsTab"); - // TODO: Remove these when "(attached.property)" syntax is supported in bindings. They are - // bound to in the TextBox template, but ideally they should just be bound to the attached - // property. - public static readonly StyledProperty CanScrollHorizontally = - ScrollViewer.CanScrollHorizontallyProperty.AddOwner(); - public static readonly StyledProperty HorizontalScrollBarVisibilityProperty = - ScrollViewer.HorizontalScrollBarVisibilityProperty.AddOwner(); - public static readonly StyledProperty VerticalScrollBarVisibilityProperty = - ScrollViewer.VerticalScrollBarVisibilityProperty.AddOwner(); - // TODO: Should CaretIndex, SelectionStart/End and Text be direct properties? public static readonly StyledProperty CaretIndexProperty = PerspexProperty.Register("CaretIndex", validate: ValidateCaretIndex); diff --git a/src/Perspex.Themes.Default/TextBox.xaml b/src/Perspex.Themes.Default/TextBox.xaml index 94721bf659..26943f6f86 100644 --- a/src/Perspex.Themes.Default/TextBox.xaml +++ b/src/Perspex.Themes.Default/TextBox.xaml @@ -28,9 +28,9 @@ - +