diff --git a/Perspex.Controls/Primitives/ScrollBar.cs b/Perspex.Controls/Primitives/ScrollBar.cs index 34d240f101..6b10ef6b1c 100644 --- a/Perspex.Controls/Primitives/ScrollBar.cs +++ b/Perspex.Controls/Primitives/ScrollBar.cs @@ -34,15 +34,6 @@ namespace Perspex.Controls.Primitives public static readonly PerspexProperty OrientationProperty = PerspexProperty.Register(nameof(Orientation)); - /// - /// Initializes static members of the class. - /// - static ScrollBar() - { - Control.PseudoClass(OrientationProperty, x => x == Orientation.Horizontal, ":horizontal"); - Control.PseudoClass(OrientationProperty, x => x == Orientation.Vertical, ":vertical"); - } - /// /// Initializes a new instance of the class. /// diff --git a/Perspex.Themes.Default/ScrollBarStyle.cs b/Perspex.Themes.Default/ScrollBarStyle.cs index dab3613c94..546e1cca93 100644 --- a/Perspex.Themes.Default/ScrollBarStyle.cs +++ b/Perspex.Themes.Default/ScrollBarStyle.cs @@ -26,7 +26,7 @@ namespace Perspex.Themes.Default new Setter(ScrollBar.TemplateProperty, ControlTemplate.Create(this.Template)), }, }, - new Style(x => x.OfType().Class(":horizontal")) + new Style(x => x.OfType().PropertyEquals(ScrollBar.OrientationProperty, Orientation.Horizontal)) { Setters = new[] { @@ -34,14 +34,14 @@ namespace Perspex.Themes.Default new Setter(ScrollBar.HeightProperty, 10.0), }, }, - new Style(x => x.OfType().Class(":horizontal").Template().Name("thumb")) + new Style(x => x.OfType().PropertyEquals(ScrollBar.OrientationProperty, Orientation.Horizontal).Template().Name("thumb")) { Setters = new[] { new Setter(Thumb.MinWidthProperty, 10.0), }, }, - new Style(x => x.OfType().Class(":vertical")) + new Style(x => x.OfType().PropertyEquals(ScrollBar.OrientationProperty, Orientation.Vertical)) { Setters = new[] { @@ -49,7 +49,7 @@ namespace Perspex.Themes.Default new Setter(ScrollBar.WidthProperty, 10.0), }, }, - new Style(x => x.OfType().Class(":vertical").Template().Name("thumb")) + new Style(x => x.OfType().PropertyEquals(ScrollBar.OrientationProperty, Orientation.Vertical).Template().Name("thumb")) { Setters = new[] {