From 669989ecdb061149291bc44bb97b61968fe7e528 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Thu, 4 Dec 2014 20:34:53 +0100 Subject: [PATCH] Stylecop fixes broke something. Think it must be a bug in Roslyn pre-release. --- Perspex.Controls/ItemsControl.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Perspex.Controls/ItemsControl.cs b/Perspex.Controls/ItemsControl.cs index 4f053ab023..1d8d92b8e4 100644 --- a/Perspex.Controls/ItemsControl.cs +++ b/Perspex.Controls/ItemsControl.cs @@ -9,21 +9,23 @@ namespace Perspex.Controls using System; using System.Collections; using System.ComponentModel; + using System.Diagnostics.CodeAnalysis; using System.Linq; using Perspex.Controls.Generators; using Perspex.Controls.Primitives; public class ItemsControl : TemplatedControl { + [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 }); + public static readonly PerspexProperty ItemsProperty = PerspexProperty.Register("Items"); public static readonly PerspexProperty ItemsPanelProperty = PerspexProperty.Register("ItemsPanel", defaultValue: DefaultPanel); - private static readonly ItemsPanelTemplate DefaultPanel = - new ItemsPanelTemplate(() => new StackPanel { Orientation = Orientation.Vertical }); - private ItemContainerGenerator itemContainerGenerator; public ItemsControl()