From aef34f810ddf2299f8a0684115cd6df3e0d3b42e Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 5 May 2015 11:00:39 +0200 Subject: [PATCH] Stylecop fixes. --- Cairo/Perspex.Cairo/CairoExtensions.cs | 16 +++++ .../Perspex.Cairo/Media/FormattedTextImpl.cs | 1 - .../Media/Imaging/RenderTargetBitmapImpl.cs | 1 - Cairo/Perspex.Cairo/Renderer.cs | 3 +- Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs | 2 +- Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs | 2 +- .../Collections/IPerspexReadOnlyList.cs | 2 +- .../Collections/PerspexReadOnlyListView.cs | 39 ++++++----- .../Collections/PerspexSingleItemList.cs | 28 ++++---- Perspex.Base/PerspexObject.cs | 62 +++++++++-------- Perspex.Base/PriorityBindingEntry.cs | 5 +- Perspex.Base/PriorityLevel.cs | 4 +- Perspex.Base/PriorityValue.cs | 2 +- Perspex.Base/Reactive/PerspexObservable.cs | 8 +-- Perspex.Base/Threading/PerspexScheduler.cs | 19 +++--- Perspex.Controls/Control.cs | 68 +++++++++---------- Perspex.Controls/Deck.cs | 2 +- Perspex.Controls/TabControl.cs | 5 +- Perspex.Controls/TreeView.cs | 6 +- Perspex.Input/IKeyboardNavigation.cs | 2 +- Perspex.SceneGraph/Animation/CrossFade.cs | 1 - Perspex.SceneGraph/Animation/PageSlide.cs | 4 +- Perspex.SceneGraph/Media/FontStyle.cs | 7 -- .../Media/Imaging/RenderTargetBitmap.cs | 12 ++-- Perspex.SceneGraph/Media/TextAlignment.cs | 15 ++++ .../Media/TranslateTransform.cs | 4 +- Perspex.SceneGraph/Perspex.SceneGraph.csproj | 1 + .../Platform/IRenderTargetBitmapImpl.cs | 4 +- .../Input/WindowsKeyboardDevice.cs | 2 +- 29 files changed, 173 insertions(+), 154 deletions(-) create mode 100644 Perspex.SceneGraph/Media/TextAlignment.cs diff --git a/Cairo/Perspex.Cairo/CairoExtensions.cs b/Cairo/Perspex.Cairo/CairoExtensions.cs index 34099f9757..e9969ee90e 100644 --- a/Cairo/Perspex.Cairo/CairoExtensions.cs +++ b/Cairo/Perspex.Cairo/CairoExtensions.cs @@ -37,22 +37,34 @@ namespace Perspex.Cairo public static Pango.Weight ToCairo(this Perspex.Media.FontWeight weight) { if (weight == Perspex.Media.FontWeight.Light) + { return Pango.Weight.Light; + } if (weight == Perspex.Media.FontWeight.Normal || weight == Perspex.Media.FontWeight.Regular) + { return Pango.Weight.Normal; + } if (weight == Perspex.Media.FontWeight.DemiBold || weight == Perspex.Media.FontWeight.Medium) + { return Pango.Weight.Semibold; + } if (weight == Perspex.Media.FontWeight.Bold) + { return Pango.Weight.Bold; + } if (weight == Perspex.Media.FontWeight.UltraBold || weight == Perspex.Media.FontWeight.ExtraBold) + { return Pango.Weight.Ultrabold; + } if (weight == Perspex.Media.FontWeight.Black || weight == Perspex.Media.FontWeight.Heavy || weight == Perspex.Media.FontWeight.UltraBlack) + { return Pango.Weight.Heavy; + } return Pango.Weight.Ultralight; } @@ -60,10 +72,14 @@ namespace Perspex.Cairo public static Pango.Alignment ToCairo(this Perspex.Media.TextAlignment alignment) { if (alignment == Perspex.Media.TextAlignment.Left) + { return Pango.Alignment.Left; + } if (alignment == Perspex.Media.TextAlignment.Centered) + { return Pango.Alignment.Center; + } return Pango.Alignment.Right; } diff --git a/Cairo/Perspex.Cairo/Media/FormattedTextImpl.cs b/Cairo/Perspex.Cairo/Media/FormattedTextImpl.cs index 0bfe888f8f..2925b2e741 100644 --- a/Cairo/Perspex.Cairo/Media/FormattedTextImpl.cs +++ b/Cairo/Perspex.Cairo/Media/FormattedTextImpl.cs @@ -46,7 +46,6 @@ namespace Perspex.Cairo.Media set { - this.Layout.Width = Pango.Units.FromDouble(value.Width); } } diff --git a/Cairo/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs b/Cairo/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs index c0ccc372ab..68404cbf03 100644 --- a/Cairo/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs +++ b/Cairo/Perspex.Cairo/Media/Imaging/RenderTargetBitmapImpl.cs @@ -12,7 +12,6 @@ namespace Perspex.Cairo.Media.Imaging public class RenderTargetBitmapImpl : BitmapImpl, IRenderTargetBitmapImpl { - public RenderTargetBitmapImpl( Cairo.ImageSurface surface) : base(surface) diff --git a/Cairo/Perspex.Cairo/Renderer.cs b/Cairo/Perspex.Cairo/Renderer.cs index ad4b7aeee6..046be3e5b4 100644 --- a/Cairo/Perspex.Cairo/Renderer.cs +++ b/Cairo/Perspex.Cairo/Renderer.cs @@ -20,6 +20,8 @@ namespace Perspex.Cairo /// public class Renderer : RendererBase { + private ImageSurface surface; + /// /// Initializes a new instance of the class. /// @@ -30,7 +32,6 @@ namespace Perspex.Cairo { } - private ImageSurface surface; public Renderer(ImageSurface surface) { this.surface = surface; diff --git a/Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs b/Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs index c01c8b03d0..26ec49996e 100644 --- a/Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs +++ b/Gtk/Perspex.Gtk/Input/GtkKeyboardDevice.cs @@ -22,7 +22,7 @@ namespace Perspex.Gtk { } - public static GtkKeyboardDevice Instance + public static new GtkKeyboardDevice Instance { get { return instance; } } diff --git a/Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs b/Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs index 3a78a6bb03..afa6a5ba02 100644 --- a/Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs +++ b/Gtk/Perspex.Gtk/Input/GtkMouseDevice.cs @@ -22,7 +22,7 @@ namespace Perspex.Gtk { } - public static GtkMouseDevice Instance + public static new GtkMouseDevice Instance { get { return instance; } } diff --git a/Perspex.Base/Collections/IPerspexReadOnlyList.cs b/Perspex.Base/Collections/IPerspexReadOnlyList.cs index d25715c9b2..454467ce3c 100644 --- a/Perspex.Base/Collections/IPerspexReadOnlyList.cs +++ b/Perspex.Base/Collections/IPerspexReadOnlyList.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- diff --git a/Perspex.Base/Collections/PerspexReadOnlyListView.cs b/Perspex.Base/Collections/PerspexReadOnlyListView.cs index 0d767f358c..c6bae2e354 100644 --- a/Perspex.Base/Collections/PerspexReadOnlyListView.cs +++ b/Perspex.Base/Collections/PerspexReadOnlyListView.cs @@ -32,10 +32,9 @@ namespace Perspex.Collections } } - public T this[int index] - { - get { return this.source[index]; } - } + public event NotifyCollectionChangedEventHandler CollectionChanged; + + public event PropertyChangedEventHandler PropertyChanged; public int Count { @@ -83,9 +82,10 @@ namespace Perspex.Collections } } - public event NotifyCollectionChangedEventHandler CollectionChanged; - - public event PropertyChangedEventHandler PropertyChanged; + public T this[int index] + { + get { return this.source[index]; } + } public void Dispose() { @@ -163,15 +163,9 @@ namespace Perspex.Collections } } - public TOut this[int index] - { - get - { - return (this.convert != null) ? - this.convert(this.source[index]) : - (TOut)(object)this.source[index]; - } - } + public event NotifyCollectionChangedEventHandler CollectionChanged; + + public event PropertyChangedEventHandler PropertyChanged; public int Count { @@ -219,9 +213,15 @@ namespace Perspex.Collections } } - public event NotifyCollectionChangedEventHandler CollectionChanged; - - public event PropertyChangedEventHandler PropertyChanged; + public TOut this[int index] + { + get + { + return (this.convert != null) ? + this.convert(this.source[index]) : + (TOut)(object)this.source[index]; + } + } public void Dispose() { @@ -289,5 +289,4 @@ namespace Perspex.Collections } } } - } diff --git a/Perspex.Base/Collections/PerspexSingleItemList.cs b/Perspex.Base/Collections/PerspexSingleItemList.cs index 3bdc0e4e64..4497cc54a4 100644 --- a/Perspex.Base/Collections/PerspexSingleItemList.cs +++ b/Perspex.Base/Collections/PerspexSingleItemList.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- @@ -36,18 +36,9 @@ namespace Perspex.Collections this.item = item; } - public T this[int index] - { - get - { - if (index < 0 || index >= this.Count) - { - throw new ArgumentOutOfRangeException(); - } + public event NotifyCollectionChangedEventHandler CollectionChanged; - return item; - } - } + public event PropertyChangedEventHandler PropertyChanged; public int Count { @@ -96,9 +87,18 @@ namespace Perspex.Collections } } - public event NotifyCollectionChangedEventHandler CollectionChanged; + public T this[int index] + { + get + { + if (index < 0 || index >= this.Count) + { + throw new ArgumentOutOfRangeException(); + } - public event PropertyChangedEventHandler PropertyChanged; + return this.item; + } + } public IEnumerator GetEnumerator() { diff --git a/Perspex.Base/PerspexObject.cs b/Perspex.Base/PerspexObject.cs index 8d35b9ce8e..6f62a7f874 100644 --- a/Perspex.Base/PerspexObject.cs +++ b/Perspex.Base/PerspexObject.cs @@ -6,15 +6,15 @@ namespace Perspex { + using Splat; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; + using System.Reactive.Disposables; using System.Reactive.Linq; using System.Reflection; using Perspex.Diagnostics; - using Splat; - using System.Reactive.Disposables; using Perspex.Reactive; /// @@ -306,25 +306,27 @@ namespace Perspex { Contract.Requires(property != null); - return new PerspexObservable(observer => - { - EventHandler handler = (s, e) => + return new PerspexObservable( + observer => { - if (e.Property == property) + EventHandler handler = (s, e) => { - observer.OnNext(e.NewValue); - } - }; + if (e.Property == property) + { + observer.OnNext(e.NewValue); + } + }; - observer.OnNext(this.GetValue(property)); + observer.OnNext(this.GetValue(property)); - this.PropertyChanged += handler; + this.PropertyChanged += handler; - return Disposable.Create(() => - { - this.PropertyChanged -= handler; - }); - }, this.GetObservableDescription(property)); + return Disposable.Create(() => + { + this.PropertyChanged -= handler; + }); + }, + this.GetObservableDescription(property)); } /// @@ -348,23 +350,25 @@ namespace Perspex /// public IObservable> GetObservableWithHistory(PerspexProperty property) { - return new PerspexObservable>(observer => - { - EventHandler handler = (s, e) => + return new PerspexObservable>( + observer => { - if (e.Property == property) + EventHandler handler = (s, e) => { - observer.OnNext(Tuple.Create((T)e.OldValue, (T)e.NewValue)); - } - }; + if (e.Property == property) + { + observer.OnNext(Tuple.Create((T)e.OldValue, (T)e.NewValue)); + } + }; - this.PropertyChanged += handler; + this.PropertyChanged += handler; - return Disposable.Create(() => - { - this.PropertyChanged -= handler; - }); - }, this.GetObservableDescription(property)); + return Disposable.Create(() => + { + this.PropertyChanged -= handler; + }); + }, + this.GetObservableDescription(property)); } /// diff --git a/Perspex.Base/PriorityBindingEntry.cs b/Perspex.Base/PriorityBindingEntry.cs index 1463f21a63..8b6aca589a 100644 --- a/Perspex.Base/PriorityBindingEntry.cs +++ b/Perspex.Base/PriorityBindingEntry.cs @@ -1,12 +1,11 @@ // ----------------------------------------------------------------------- -// -// Copyright 2014 MIT Licence. See licence.md for more information. +// +// Copyright 2015 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex { - using Perspex.Diagnostics; using System; /// diff --git a/Perspex.Base/PriorityLevel.cs b/Perspex.Base/PriorityLevel.cs index e973af4353..f8bdf23b99 100644 --- a/Perspex.Base/PriorityLevel.cs +++ b/Perspex.Base/PriorityLevel.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// Copyright 2013 MIT Licence. See licence.md for more information. +// +// Copyright 2015 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- diff --git a/Perspex.Base/PriorityValue.cs b/Perspex.Base/PriorityValue.cs index d1c429a810..1ca7a85b83 100644 --- a/Perspex.Base/PriorityValue.cs +++ b/Perspex.Base/PriorityValue.cs @@ -6,12 +6,12 @@ namespace Perspex { - using Perspex.Diagnostics; using System; using System.Collections.Generic; using System.Linq; using System.Reactive.Subjects; using System.Reflection; + using Perspex.Diagnostics; /// /// Maintains a list of prioritised bindings together with a current value. diff --git a/Perspex.Base/Reactive/PerspexObservable.cs b/Perspex.Base/Reactive/PerspexObservable.cs index ad5b1568bb..1b11e18959 100644 --- a/Perspex.Base/Reactive/PerspexObservable.cs +++ b/Perspex.Base/Reactive/PerspexObservable.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// Copyright 2014 MIT Licence. See licence.md for more information. +// +// Copyright 2015 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- @@ -14,8 +14,6 @@ namespace Perspex.Reactive { private readonly Func, IDisposable> subscribe; - public string Description { get; } - public PerspexObservable(Func, IDisposable> subscribe, string description) { if (subscribe == null) @@ -27,6 +25,8 @@ namespace Perspex.Reactive this.Description = description; } + public string Description { get; } + protected override IDisposable SubscribeCore(IObserver observer) { return this.subscribe(observer) ?? Disposable.Empty; diff --git a/Perspex.Base/Threading/PerspexScheduler.cs b/Perspex.Base/Threading/PerspexScheduler.cs index 653c7695c4..5cbfb945ae 100644 --- a/Perspex.Base/Threading/PerspexScheduler.cs +++ b/Perspex.Base/Threading/PerspexScheduler.cs @@ -12,20 +12,17 @@ namespace Perspex.Threading public class PerspexScheduler : LocalScheduler { - private static readonly PerspexScheduler instance = new PerspexScheduler(); - - public static PerspexScheduler Instance - { - get { return instance; } - } + public static readonly PerspexScheduler Instance = new PerspexScheduler(); public override IDisposable Schedule(TState state, TimeSpan dueTime, Func action) { - return DispatcherTimer.Run(() => - { - action(this, state); - return false; - }, dueTime); + return DispatcherTimer.Run( + () => + { + action(this, state); + return false; + }, + dueTime); } } } diff --git a/Perspex.Controls/Control.cs b/Perspex.Controls/Control.cs index d92a2b8845..07dcafba62 100644 --- a/Perspex.Controls/Control.cs +++ b/Perspex.Controls/Control.cs @@ -192,6 +192,40 @@ namespace Perspex.Controls this.RaiseEvent(ev); } + protected static void PseudoClass(PerspexProperty property, string className) + { + PseudoClass(property, x => x, className); + } + + protected static void PseudoClass( + PerspexProperty property, + Func selector, + string className) + { + Contract.Requires(property != null); + Contract.Requires(selector != null); + Contract.Requires(className != null); + Contract.Requires(property != null); + + if (string.IsNullOrWhiteSpace(className)) + { + throw new ArgumentException("Cannot supply an empty className."); + } + + Observable.Merge(property.Changed, property.Initialized) + .Subscribe(e => + { + if (selector((T)e.NewValue)) + { + ((Control)e.Sender).Classes.Add(className); + } + else + { + ((Control)e.Sender).Classes.Remove(className); + } + }); + } + protected override void OnGotFocus(GotFocusEventArgs e) { base.OnGotFocus(e); @@ -233,40 +267,6 @@ namespace Perspex.Controls } } - protected static void PseudoClass(PerspexProperty property, string className) - { - PseudoClass(property, x => x, className); - } - - protected static void PseudoClass( - PerspexProperty property, - Func selector, - string className) - { - Contract.Requires(property != null); - Contract.Requires(selector != null); - Contract.Requires(className != null); - Contract.Requires(property != null); - - if (string.IsNullOrWhiteSpace(className)) - { - throw new ArgumentException("Cannot supply an empty className."); - } - - Observable.Merge(property.Changed, property.Initialized) - .Subscribe(e => - { - if (selector((T)e.NewValue)) - { - ((Control)e.Sender).Classes.Add(className); - } - else - { - ((Control)e.Sender).Classes.Remove(className); - } - }); - } - protected override void OnAttachedToVisualTree(IRenderRoot root) { base.OnAttachedToVisualTree(root); diff --git a/Perspex.Controls/Deck.cs b/Perspex.Controls/Deck.cs index 4c44d66c6a..735e04fabf 100644 --- a/Perspex.Controls/Deck.cs +++ b/Perspex.Controls/Deck.cs @@ -7,11 +7,11 @@ namespace Perspex.Controls { using System.Collections; + using Perspex.Animation; using Perspex.Controls.Generators; using Perspex.Controls.Primitives; using Perspex.Controls.Utils; using Perspex.Input; - using Perspex.Animation; /// /// A selecting items control that displays a single item that fills the control. diff --git a/Perspex.Controls/TabControl.cs b/Perspex.Controls/TabControl.cs index ee4086c508..edad4881d9 100644 --- a/Perspex.Controls/TabControl.cs +++ b/Perspex.Controls/TabControl.cs @@ -7,15 +7,12 @@ namespace Perspex.Controls { using System; - using System.Linq; using System.Reactive.Linq; + using Perspex.Animation; using Perspex.Collections; - using Perspex.Controls.Generators; - using Perspex.Controls.Presenters; using Perspex.Controls.Primitives; using Perspex.Controls.Templates; using Perspex.Input; - using Perspex.Animation; public class TabControl : SelectingItemsControl, ILogical { diff --git a/Perspex.Controls/TreeView.cs b/Perspex.Controls/TreeView.cs index e6331bc7de..cdad058371 100644 --- a/Perspex.Controls/TreeView.cs +++ b/Perspex.Controls/TreeView.cs @@ -7,12 +7,12 @@ namespace Perspex.Controls { using System; - using Perspex.Controls.Generators; - using Perspex.Input; - using Perspex.VisualTree; using System.Collections; using System.Collections.Generic; using System.Linq; + using Perspex.Controls.Generators; + using Perspex.Input; + using Perspex.VisualTree; public class TreeView : ItemsControl { diff --git a/Perspex.Input/IKeyboardNavigation.cs b/Perspex.Input/IKeyboardNavigation.cs index 914ebd4c6f..c51c1d8177 100644 --- a/Perspex.Input/IKeyboardNavigation.cs +++ b/Perspex.Input/IKeyboardNavigation.cs @@ -1,5 +1,5 @@ // ----------------------------------------------------------------------- -// +// // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- diff --git a/Perspex.SceneGraph/Animation/CrossFade.cs b/Perspex.SceneGraph/Animation/CrossFade.cs index 6d128a65f1..b2b62c0295 100644 --- a/Perspex.SceneGraph/Animation/CrossFade.cs +++ b/Perspex.SceneGraph/Animation/CrossFade.cs @@ -52,7 +52,6 @@ namespace Perspex.Animation 1, LinearEasing.For(), this.Duration).ToTask()); - } await Task.WhenAll(tasks.ToArray()); diff --git a/Perspex.SceneGraph/Animation/PageSlide.cs b/Perspex.SceneGraph/Animation/PageSlide.cs index 28aedecd50..110eb25de1 100644 --- a/Perspex.SceneGraph/Animation/PageSlide.cs +++ b/Perspex.SceneGraph/Animation/PageSlide.cs @@ -6,12 +6,12 @@ namespace Perspex.Animation { - using Perspex.Media; - using Perspex.VisualTree; using System; using System.Collections.Generic; using System.Reactive.Threading.Tasks; using System.Threading.Tasks; + using Perspex.Media; + using Perspex.VisualTree; public class PageSlide : IPageTransition { diff --git a/Perspex.SceneGraph/Media/FontStyle.cs b/Perspex.SceneGraph/Media/FontStyle.cs index dbeeb19e82..2729233ecd 100644 --- a/Perspex.SceneGraph/Media/FontStyle.cs +++ b/Perspex.SceneGraph/Media/FontStyle.cs @@ -12,11 +12,4 @@ namespace Perspex.Media Oblique, Italic, } - - public enum TextAlignment - { - Left, - Centered, - Right, - } } diff --git a/Perspex.SceneGraph/Media/Imaging/RenderTargetBitmap.cs b/Perspex.SceneGraph/Media/Imaging/RenderTargetBitmap.cs index 15d8252b3b..ac96dde0f3 100644 --- a/Perspex.SceneGraph/Media/Imaging/RenderTargetBitmap.cs +++ b/Perspex.SceneGraph/Media/Imaging/RenderTargetBitmap.cs @@ -6,9 +6,9 @@ namespace Perspex.Media.Imaging { + using System; using Perspex.Platform; using Splat; - using System; public class RenderTargetBitmap : Bitmap, IDisposable { @@ -27,15 +27,15 @@ namespace Perspex.Media.Imaging this.PlatformImpl.Render(visual); } - private static IBitmapImpl CreateImpl(int width, int height) + public void Dispose() { - IPlatformRenderInterface factory = Locator.Current.GetService(); - return factory.CreateRenderTargetBitmap(width, height); + this.PlatformImpl.Dispose(); } - public void Dispose() + private static IBitmapImpl CreateImpl(int width, int height) { - this.PlatformImpl.Dispose(); + IPlatformRenderInterface factory = Locator.Current.GetService(); + return factory.CreateRenderTargetBitmap(width, height); } } } diff --git a/Perspex.SceneGraph/Media/TextAlignment.cs b/Perspex.SceneGraph/Media/TextAlignment.cs new file mode 100644 index 0000000000..15d4dc41ff --- /dev/null +++ b/Perspex.SceneGraph/Media/TextAlignment.cs @@ -0,0 +1,15 @@ +// ----------------------------------------------------------------------- +// +// Copyright 2014 MIT Licence. See licence.md for more information. +// +// ----------------------------------------------------------------------- + +namespace Perspex.Media +{ + public enum TextAlignment + { + Left, + Centered, + Right, + } +} diff --git a/Perspex.SceneGraph/Media/TranslateTransform.cs b/Perspex.SceneGraph/Media/TranslateTransform.cs index 65c5ecf8ae..787968e814 100644 --- a/Perspex.SceneGraph/Media/TranslateTransform.cs +++ b/Perspex.SceneGraph/Media/TranslateTransform.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// Copyright 2013 MIT Licence. See licence.md for more information. +// +// Copyright 2015 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- diff --git a/Perspex.SceneGraph/Perspex.SceneGraph.csproj b/Perspex.SceneGraph/Perspex.SceneGraph.csproj index 1bd22ce7f7..f2102415d7 100644 --- a/Perspex.SceneGraph/Perspex.SceneGraph.csproj +++ b/Perspex.SceneGraph/Perspex.SceneGraph.csproj @@ -53,6 +53,7 @@ + diff --git a/Perspex.SceneGraph/Platform/IRenderTargetBitmapImpl.cs b/Perspex.SceneGraph/Platform/IRenderTargetBitmapImpl.cs index c61bd549af..7478de1e60 100644 --- a/Perspex.SceneGraph/Platform/IRenderTargetBitmapImpl.cs +++ b/Perspex.SceneGraph/Platform/IRenderTargetBitmapImpl.cs @@ -4,10 +4,10 @@ // // ----------------------------------------------------------------------- -using System; - namespace Perspex.Platform { + using System; + public interface IRenderTargetBitmapImpl : IBitmapImpl, IDisposable { void Render(IVisual visual); diff --git a/Windows/Perspex.Win32/Input/WindowsKeyboardDevice.cs b/Windows/Perspex.Win32/Input/WindowsKeyboardDevice.cs index 673e0d71c2..c2162f035a 100644 --- a/Windows/Perspex.Win32/Input/WindowsKeyboardDevice.cs +++ b/Windows/Perspex.Win32/Input/WindowsKeyboardDevice.cs @@ -17,7 +17,7 @@ namespace Perspex.Win32.Input private byte[] keyStates = new byte[256]; - public static WindowsKeyboardDevice Instance + public static new WindowsKeyboardDevice Instance { get { return instance; } }