From 696b016cf5e54bf249df11be7a63fbb3222d2fd8 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Mon, 27 Jul 2015 20:49:18 +0200 Subject: [PATCH] Don't explicitly set ItemsControl panel orientation. That way, can be overridden in styles and thus doesn't need to be overridden in TabStrip. --- Perspex.Controls/ItemsControl.cs | 2 +- Perspex.Controls/Primitives/TabStrip.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Perspex.Controls/ItemsControl.cs b/Perspex.Controls/ItemsControl.cs index ea73b048b0..eb5c4801a4 100644 --- a/Perspex.Controls/ItemsControl.cs +++ b/Perspex.Controls/ItemsControl.cs @@ -23,7 +23,7 @@ namespace Perspex.Controls { [SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1202:ElementsMustBeOrderedByAccess", Justification = "Needs to be before or a NullReferenceException is thrown.")] private static readonly ItemsPanelTemplate DefaultPanel = - new ItemsPanelTemplate(() => new StackPanel { Orientation = Orientation.Vertical }); + new ItemsPanelTemplate(() => new StackPanel()); public static readonly PerspexProperty ItemsProperty = PerspexProperty.Register("Items"); diff --git a/Perspex.Controls/Primitives/TabStrip.cs b/Perspex.Controls/Primitives/TabStrip.cs index 37859ab188..13dcfac641 100644 --- a/Perspex.Controls/Primitives/TabStrip.cs +++ b/Perspex.Controls/Primitives/TabStrip.cs @@ -16,13 +16,9 @@ namespace Perspex.Controls.Primitives public static readonly PerspexProperty SelectedTabProperty = TabControl.SelectedTabProperty.AddOwner(); - private static readonly ItemsPanelTemplate PanelTemplate = new ItemsPanelTemplate( - () => new StackPanel()); - static TabStrip() { FocusableProperty.OverrideDefaultValue(typeof(TabStrip), false); - ItemsPanelProperty.OverrideDefaultValue(typeof(TabStrip), PanelTemplate); } public TabStrip()