Browse Source

More stylecop fixes.

pull/10/head
Steven Kirk 12 years ago
parent
commit
55a11d8dfd
  1. 8
      Cairo/Perspex.Cairo/Properties/AssemblyInfo.cs
  2. 2
      Perspex.Base/Binding.cs
  3. 60
      Perspex.Base/PerspexList.cs
  4. 21
      Perspex.Base/PerspexListExtensions.cs
  5. 13
      Perspex.Base/PerspexObject.cs
  6. 3
      Perspex.Base/PerspexProperty.cs
  7. 2
      Perspex.Base/Platform/IPlatformHandle.cs
  8. 6
      Perspex.Base/Platform/IPlatformThreadingInterface.cs
  9. 10
      Perspex.Base/Properties/AssemblyInfo.cs
  10. 2
      Perspex.Controls/Presenters/ScrollContentPresenter.cs
  11. 2
      Perspex.Controls/Window.cs
  12. 2
      Perspex.Input/FocusManager.cs
  13. 2
      Perspex.Input/InputElement.cs
  14. 2
      Perspex.Input/KeyEventArgs.cs
  15. 4
      Perspex.Input/KeyboardDevice.cs
  16. 10
      Perspex.Input/Properties/AssemblyInfo.cs
  17. 2
      Perspex.Input/Raw/RawMouseEventArgs.cs
  18. 2
      Perspex.Input/Raw/RawMouseWheelEventArgs.cs
  19. 2
      Perspex.Input/Raw/RawSizeEventArgs.cs
  20. 10
      Perspex.Interactivity/Properties/AssemblyInfo.cs
  21. 4
      Perspex.Layout/LayoutManager.cs
  22. 39
      Perspex.Layout/Layoutable.cs
  23. 10
      Perspex.Layout/Properties/AssemblyInfo.cs
  24. 140
      Perspex.SceneGraph/Media/Brushes.cs
  25. 2
      Perspex.SceneGraph/Media/ITransform.cs
  26. 4
      Perspex.SceneGraph/Origin.cs
  27. 2
      Perspex.SceneGraph/Platform/IPlatformRenderInterface.cs
  28. 10
      Perspex.SceneGraph/Properties/AssemblyInfo.cs
  29. 8
      Perspex.SceneGraph/Rect.cs
  30. 2
      Perspex.SceneGraph/Rendering/IRenderRoot.cs
  31. 4
      Perspex.SceneGraph/Visual.cs
  32. 10
      Perspex.Styling/Properties/AssemblyInfo.cs
  33. 8
      Windows/Perspex.Direct2D1/Properties/AssemblyInfo.cs

8
Cairo/Perspex.Cairo/Properties/AssemblyInfo.cs

@ -1,4 +1,10 @@
using System.Reflection; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;

2
Perspex.Base/Binding.cs

@ -56,7 +56,7 @@ namespace Perspex
public IDisposable Subscribe(IObserver<object> observer) public IDisposable Subscribe(IObserver<object> observer)
{ {
return this.Source.GetObservable(Property).Subscribe(observer); return this.Source.GetObservable(this.Property).Subscribe(observer);
} }
public Binding WithMode(BindingMode mode) public Binding WithMode(BindingMode mode)

60
Perspex.Base/PerspexList.cs

@ -31,29 +31,6 @@ namespace Perspex
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
public T this[int index]
{
get
{
return this.inner[index];
}
set
{
T old = this.inner[index];
this.inner[index] = value;
if (this.CollectionChanged != null)
{
var e = new NotifyCollectionChangedEventArgs(
NotifyCollectionChangedAction.Replace,
value,
old);
this.CollectionChanged(this, e);
}
}
}
public int Count public int Count
{ {
get { return this.inner.Count; } get { return this.inner.Count; }
@ -74,13 +51,6 @@ namespace Perspex
get { return false; } get { return false; }
} }
object IList.this[int index]
{
get { return this[index]; }
set { this[index] = (T)value; }
}
int ICollection.Count int ICollection.Count
{ {
get { return this.inner.Count; } get { return this.inner.Count; }
@ -96,6 +66,36 @@ namespace Perspex
get { return null; } get { return null; }
} }
public T this[int index]
{
get
{
return this.inner[index];
}
set
{
T old = this.inner[index];
this.inner[index] = value;
if (this.CollectionChanged != null)
{
var e = new NotifyCollectionChangedEventArgs(
NotifyCollectionChangedAction.Replace,
value,
old);
this.CollectionChanged(this, e);
}
}
}
object IList.this[int index]
{
get { return this[index]; }
set { this[index] = (T)value; }
}
public void Add(T item) public void Add(T item)
{ {
int index = this.inner.Count; int index = this.inner.Count;

21
Perspex.Base/PerspexListExtensions.cs

@ -1,14 +1,17 @@
using System; // -----------------------------------------------------------------------
using System.Collections.Generic; // <copyright file="PerspexListExtensions.cs" company="Steven Kirk">
using System.Collections.Specialized; // Copyright 2014 MIT Licence. See licence.md for more information.
using System.ComponentModel; // </copyright>
using System.Linq; // -----------------------------------------------------------------------
using System.Reactive.Disposables;
using System.Text;
using System.Threading.Tasks;
namespace Perspex namespace Perspex
{ {
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Reactive.Disposables;
public static class PerspexListExtensions public static class PerspexListExtensions
{ {
public static IDisposable ForEachItem<T>( public static IDisposable ForEachItem<T>(
@ -25,6 +28,7 @@ namespace Perspex
{ {
added(i); added(i);
} }
break; break;
case NotifyCollectionChangedAction.Replace: case NotifyCollectionChangedAction.Replace:
@ -45,6 +49,7 @@ namespace Perspex
{ {
removed(i); removed(i);
} }
break; break;
} }
}; };

13
Perspex.Base/PerspexObject.cs

@ -77,6 +77,11 @@ namespace Perspex
private Dictionary<PerspexProperty, PriorityValue> values = private Dictionary<PerspexProperty, PriorityValue> values =
new Dictionary<PerspexProperty, PriorityValue>(); new Dictionary<PerspexProperty, PriorityValue>();
/// <summary>
/// Event handler for <see cref="INotifyPropertyChanged"/> implementation.
/// </summary>
private PropertyChangedEventHandler inpcChanged;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="PerspexObject"/> class. /// Initializes a new instance of the <see cref="PerspexObject"/> class.
/// </summary> /// </summary>
@ -94,11 +99,6 @@ namespace Perspex
} }
} }
/// <summary>
/// Event handler for <see cref="INotifyPropertyChanged"/> implementation.
/// </summary>
private PropertyChangedEventHandler inpcChanged;
/// <summary> /// <summary>
/// Raised when a <see cref="PerspexProperty"/> value changes on this object. /// Raised when a <see cref="PerspexProperty"/> value changes on this object.
/// </summary> /// </summary>
@ -161,7 +161,6 @@ namespace Perspex
} }
} }
/// <summary> /// <summary>
/// Gets or sets the value of a <see cref="PerspexProperty"/>. /// Gets or sets the value of a <see cref="PerspexProperty"/>.
/// </summary> /// </summary>
@ -465,7 +464,7 @@ namespace Perspex
/// </summary> /// </summary>
/// <param name="property">The property.</param> /// <param name="property">The property.</param>
/// <returns>True if the property is registered, otherwise false.</returns> /// <returns>True if the property is registered, otherwise false.</returns>
private bool IsRegistered(PerspexProperty property) public bool IsRegistered(PerspexProperty property)
{ {
Type type = this.GetType(); Type type = this.GetType();

3
Perspex.Base/PerspexProperty.cs

@ -187,7 +187,7 @@ namespace Perspex
/// </summary> /// </summary>
/// <param name="property">The property.</param> /// <param name="property">The property.</param>
/// <returns>A <see cref="Binding"/> describing the binding.</returns> /// <returns>A <see cref="Binding"/> describing the binding.</returns>
public static Binding operator!(PerspexProperty property) public static Binding operator !(PerspexProperty property)
{ {
return new Binding return new Binding
{ {
@ -276,7 +276,6 @@ namespace Perspex
Contract.Requires<NullReferenceException>(type != null); Contract.Requires<NullReferenceException>(type != null);
// TODO: Ensure correct type. // TODO: Ensure correct type.
if (this.defaultValues.ContainsKey(type)) if (this.defaultValues.ContainsKey(type))
{ {
throw new InvalidOperationException("Default value is already set for this property."); throw new InvalidOperationException("Default value is already set for this property.");

2
Perspex.Base/Platform/IPlatformHandle.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="Window.cs" company="Steven Kirk"> // <copyright file="IPlatformHandle.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

6
Perspex.Base/Platform/IPlatformThreadingInterface.cs

@ -11,9 +11,9 @@ namespace Perspex.Platform
using System.Threading.Tasks; using System.Threading.Tasks;
using Perspex.Threading; using Perspex.Threading;
/// <summary> /// <summary>
/// Provides platform-specific services relating to threading. /// Provides platform-specific services relating to threading.
/// </summary> /// </summary>
public interface IPlatformThreadingInterface public interface IPlatformThreadingInterface
{ {
/// <summary> /// <summary>

10
Perspex.Base/Properties/AssemblyInfo.cs

@ -1,7 +1,11 @@
using System.Resources; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information

2
Perspex.Controls/Presenters/ScrollContentPresenter.cs

@ -83,7 +83,7 @@ namespace Perspex.Controls.Presenters
{ {
var y = this.Offset.Y + (-e.Delta.Y * 50); var y = this.Offset.Y + (-e.Delta.Y * 50);
y = Math.Max(y, 0); y = Math.Max(y, 0);
y = Math.Min(y, Extent.Height - Viewport.Height); y = Math.Min(y, this.Extent.Height - this.Viewport.Height);
this.Offset = new Vector(this.Offset.X, y); this.Offset = new Vector(this.Offset.X, y);
e.Handled = true; e.Handled = true;
} }

2
Perspex.Controls/Window.cs

@ -37,7 +37,7 @@ namespace Perspex.Controls
static Window() static Window()
{ {
BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White); BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White);
AffectsMeasure(Window.ClientSizeProperty); Window.AffectsMeasure(Window.ClientSizeProperty);
} }
public Window() public Window()

2
Perspex.Input/FocusManager.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="IFocusManager.cs" company="Steven Kirk"> // <copyright file="FocusManager.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

2
Perspex.Input/InputElement.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="Control.cs" company="Steven Kirk"> // <copyright file="InputElement.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

2
Perspex.Input/KeyEventArgs.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="PointerEventArgs.cs" company="Steven Kirk"> // <copyright file="KeyEventArgs.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information. // Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

4
Perspex.Input/KeyboardDevice.cs

@ -59,9 +59,9 @@ namespace Perspex.Input
OriginalSource = element, OriginalSource = element,
}; };
element.RaiseEvent(ev); ; element.RaiseEvent(ev);
ev.RoutedEvent = InputElement.KeyDownEvent; ev.RoutedEvent = InputElement.KeyDownEvent;
element.RaiseEvent(ev); ; element.RaiseEvent(ev);
break; break;
} }
} }

10
Perspex.Input/Properties/AssemblyInfo.cs

@ -1,7 +1,11 @@
using System.Resources; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information

2
Perspex.Input/Raw/RawMouseEventArgs.cs

@ -34,7 +34,7 @@ namespace Perspex.Input.Raw
this.Type = type; this.Type = type;
} }
//TODO: This should probably be IInputRoot or something. // TODO: This should probably be IInputRoot or something.
public ILayoutRoot Root { get; private set; } public ILayoutRoot Root { get; private set; }
public Point Position { get; private set; } public Point Position { get; private set; }

2
Perspex.Input/Raw/RawMouseWheelEventArgs.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="RawMouseEventArgs.cs" company="Steven Kirk"> // <copyright file="RawMouseWheelEventArgs.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information. // Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

2
Perspex.Input/Raw/RawSizeEventArgs.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="RawInputEventArgs.cs" company="Steven Kirk"> // <copyright file="RawSizeEventArgs.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information. // Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

10
Perspex.Interactivity/Properties/AssemblyInfo.cs

@ -1,7 +1,11 @@
using System.Resources; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information

4
Perspex.Layout/LayoutManager.cs

@ -95,8 +95,6 @@ namespace Perspex.Layout
{ {
this.LayoutQueued = false; this.LayoutQueued = false;
Layoutable.DebugMeasureCount = Layoutable.DebugArrangeCount = 0;
if (this.measureNeeded) if (this.measureNeeded)
{ {
this.ExecuteMeasure(); this.ExecuteMeasure();
@ -104,8 +102,6 @@ namespace Perspex.Layout
} }
this.ExecuteArrange(); this.ExecuteArrange();
System.Diagnostics.Debug.WriteLine(Environment.TickCount + " " + Layoutable.DebugMeasureCount + " " + Layoutable.DebugArrangeCount);
} }
/// <summary> /// <summary>

39
Perspex.Layout/Layoutable.cs

@ -64,16 +64,16 @@ namespace Perspex.Layout
static Layoutable() static Layoutable()
{ {
Layoutable.AffectsMeasure(IsVisibleProperty); Layoutable.AffectsMeasure(Visual.IsVisibleProperty);
Layoutable.AffectsMeasure(WidthProperty); Layoutable.AffectsMeasure(Layoutable.WidthProperty);
Layoutable.AffectsMeasure(HeightProperty); Layoutable.AffectsMeasure(Layoutable.HeightProperty);
Layoutable.AffectsMeasure(MinWidthProperty); Layoutable.AffectsMeasure(Layoutable.MinWidthProperty);
Layoutable.AffectsMeasure(MaxWidthProperty); Layoutable.AffectsMeasure(Layoutable.MaxWidthProperty);
Layoutable.AffectsMeasure(MinHeightProperty); Layoutable.AffectsMeasure(Layoutable.MinHeightProperty);
Layoutable.AffectsMeasure(MaxHeightProperty); Layoutable.AffectsMeasure(Layoutable.MaxHeightProperty);
Layoutable.AffectsMeasure(MarginProperty); Layoutable.AffectsMeasure(Layoutable.MarginProperty);
Layoutable.AffectsMeasure(HorizontalAlignmentProperty); Layoutable.AffectsMeasure(Layoutable.HorizontalAlignmentProperty);
Layoutable.AffectsMeasure(VerticalAlignmentProperty); Layoutable.AffectsMeasure(Layoutable.VerticalAlignmentProperty);
} }
public double Width public double Width
@ -163,9 +163,6 @@ namespace Perspex.Layout
get { return this.previousArrange; } get { return this.previousArrange; }
} }
public static int DebugMeasureCount { get; set; }
public static int DebugArrangeCount { get; set; }
public void Measure(Size availableSize, bool force = false) public void Measure(Size availableSize, bool force = false)
{ {
if (double.IsNaN(availableSize.Width) || double.IsNaN(availableSize.Height)) if (double.IsNaN(availableSize.Width) || double.IsNaN(availableSize.Height))
@ -175,8 +172,6 @@ namespace Perspex.Layout
if (force || !this.IsMeasureValid || this.previousMeasure != availableSize) if (force || !this.IsMeasureValid || this.previousMeasure != availableSize)
{ {
++DebugMeasureCount;
this.IsMeasureValid = true; this.IsMeasureValid = true;
this.DesiredSize = this.MeasureCore(availableSize).Constrain(availableSize); this.DesiredSize = this.MeasureCore(availableSize).Constrain(availableSize);
this.previousMeasure = availableSize; this.previousMeasure = availableSize;
@ -205,8 +200,6 @@ namespace Perspex.Layout
if (force || !this.IsArrangeValid || this.previousArrange != rect) if (force || !this.IsArrangeValid || this.previousArrange != rect)
{ {
++DebugArrangeCount;
this.Log().Debug( this.Log().Debug(
"Arrange of {0} (#{1:x8}) gave {2} ", "Arrange of {0} (#{1:x8}) gave {2} ",
this.GetType().Name, this.GetType().Name,
@ -376,7 +369,7 @@ namespace Perspex.Layout
{ {
child.Measure(availableSize); child.Measure(availableSize);
width = Math.Max(width, child.DesiredSize.Value.Width); width = Math.Max(width, child.DesiredSize.Value.Width);
height= Math.Max(height, child.DesiredSize.Value.Height); height = Math.Max(height, child.DesiredSize.Value.Height);
} }
return new Size(width, height); return new Size(width, height);
@ -402,6 +395,11 @@ namespace Perspex.Layout
} }
} }
private static bool IsResizable(ILayoutable control)
{
return double.IsNaN(control.Width) || double.IsNaN(control.Height);
}
private Tuple<ILayoutRoot, int> GetLayoutRoot() private Tuple<ILayoutRoot, int> GetLayoutRoot()
{ {
var control = (IVisual)this; var control = (IVisual)this;
@ -415,10 +413,5 @@ namespace Perspex.Layout
return control != null ? Tuple.Create((ILayoutRoot)control, distance) : null; return control != null ? Tuple.Create((ILayoutRoot)control, distance) : null;
} }
private static bool IsResizable(ILayoutable control)
{
return double.IsNaN(control.Width) || double.IsNaN(control.Height);
}
} }
} }

10
Perspex.Layout/Properties/AssemblyInfo.cs

@ -1,7 +1,11 @@
using System.Resources; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information

140
Perspex.SceneGraph/Media/Brushes.cs

@ -157,145 +157,285 @@ namespace Perspex.Media
} }
public static SolidColorBrush AliceBlue { get; private set; } public static SolidColorBrush AliceBlue { get; private set; }
public static SolidColorBrush AntiqueWhite { get; private set; } public static SolidColorBrush AntiqueWhite { get; private set; }
public static SolidColorBrush Aqua { get; private set; } public static SolidColorBrush Aqua { get; private set; }
public static SolidColorBrush Aquamarine { get; private set; } public static SolidColorBrush Aquamarine { get; private set; }
public static SolidColorBrush Azure { get; private set; } public static SolidColorBrush Azure { get; private set; }
public static SolidColorBrush Beige { get; private set; } public static SolidColorBrush Beige { get; private set; }
public static SolidColorBrush Bisque { get; private set; } public static SolidColorBrush Bisque { get; private set; }
public static SolidColorBrush Black { get; private set; } public static SolidColorBrush Black { get; private set; }
public static SolidColorBrush BlanchedAlmond { get; private set; } public static SolidColorBrush BlanchedAlmond { get; private set; }
public static SolidColorBrush Blue { get; private set; } public static SolidColorBrush Blue { get; private set; }
public static SolidColorBrush BlueViolet { get; private set; } public static SolidColorBrush BlueViolet { get; private set; }
public static SolidColorBrush Brown { get; private set; } public static SolidColorBrush Brown { get; private set; }
public static SolidColorBrush BurlyWood { get; private set; } public static SolidColorBrush BurlyWood { get; private set; }
public static SolidColorBrush CadetBlue { get; private set; } public static SolidColorBrush CadetBlue { get; private set; }
public static SolidColorBrush Chartreuse { get; private set; } public static SolidColorBrush Chartreuse { get; private set; }
public static SolidColorBrush Chocolate { get; private set; } public static SolidColorBrush Chocolate { get; private set; }
public static SolidColorBrush Coral { get; private set; } public static SolidColorBrush Coral { get; private set; }
public static SolidColorBrush CornflowerBlue { get; private set; } public static SolidColorBrush CornflowerBlue { get; private set; }
public static SolidColorBrush Cornsilk { get; private set; } public static SolidColorBrush Cornsilk { get; private set; }
public static SolidColorBrush Crimson { get; private set; } public static SolidColorBrush Crimson { get; private set; }
public static SolidColorBrush Cyan { get; private set; } public static SolidColorBrush Cyan { get; private set; }
public static SolidColorBrush DarkBlue { get; private set; } public static SolidColorBrush DarkBlue { get; private set; }
public static SolidColorBrush DarkCyan { get; private set; } public static SolidColorBrush DarkCyan { get; private set; }
public static SolidColorBrush DarkGoldenrod { get; private set; } public static SolidColorBrush DarkGoldenrod { get; private set; }
public static SolidColorBrush DarkGray { get; private set; } public static SolidColorBrush DarkGray { get; private set; }
public static SolidColorBrush DarkGreen { get; private set; } public static SolidColorBrush DarkGreen { get; private set; }
public static SolidColorBrush DarkKhaki { get; private set; } public static SolidColorBrush DarkKhaki { get; private set; }
public static SolidColorBrush DarkMagenta { get; private set; } public static SolidColorBrush DarkMagenta { get; private set; }
public static SolidColorBrush DarkOliveGreen { get; private set; } public static SolidColorBrush DarkOliveGreen { get; private set; }
public static SolidColorBrush DarkOrange { get; private set; } public static SolidColorBrush DarkOrange { get; private set; }
public static SolidColorBrush DarkOrchid { get; private set; } public static SolidColorBrush DarkOrchid { get; private set; }
public static SolidColorBrush DarkRed { get; private set; } public static SolidColorBrush DarkRed { get; private set; }
public static SolidColorBrush DarkSalmon { get; private set; } public static SolidColorBrush DarkSalmon { get; private set; }
public static SolidColorBrush DarkSeaGreen { get; private set; } public static SolidColorBrush DarkSeaGreen { get; private set; }
public static SolidColorBrush DarkSlateBlue { get; private set; } public static SolidColorBrush DarkSlateBlue { get; private set; }
public static SolidColorBrush DarkSlateGray { get; private set; } public static SolidColorBrush DarkSlateGray { get; private set; }
public static SolidColorBrush DarkTurquoise { get; private set; } public static SolidColorBrush DarkTurquoise { get; private set; }
public static SolidColorBrush DarkViolet { get; private set; } public static SolidColorBrush DarkViolet { get; private set; }
public static SolidColorBrush DeepPink { get; private set; } public static SolidColorBrush DeepPink { get; private set; }
public static SolidColorBrush DeepSkyBlue { get; private set; } public static SolidColorBrush DeepSkyBlue { get; private set; }
public static SolidColorBrush DimGray { get; private set; } public static SolidColorBrush DimGray { get; private set; }
public static SolidColorBrush DodgerBlue { get; private set; } public static SolidColorBrush DodgerBlue { get; private set; }
public static SolidColorBrush Firebrick { get; private set; } public static SolidColorBrush Firebrick { get; private set; }
public static SolidColorBrush FloralWhite { get; private set; } public static SolidColorBrush FloralWhite { get; private set; }
public static SolidColorBrush ForestGreen { get; private set; } public static SolidColorBrush ForestGreen { get; private set; }
public static SolidColorBrush Fuchsia { get; private set; } public static SolidColorBrush Fuchsia { get; private set; }
public static SolidColorBrush Gainsboro { get; private set; } public static SolidColorBrush Gainsboro { get; private set; }
public static SolidColorBrush GhostWhite { get; private set; } public static SolidColorBrush GhostWhite { get; private set; }
public static SolidColorBrush Gold { get; private set; } public static SolidColorBrush Gold { get; private set; }
public static SolidColorBrush Goldenrod { get; private set; } public static SolidColorBrush Goldenrod { get; private set; }
public static SolidColorBrush Gray { get; private set; } public static SolidColorBrush Gray { get; private set; }
public static SolidColorBrush Green { get; private set; } public static SolidColorBrush Green { get; private set; }
public static SolidColorBrush GreenYellow { get; private set; } public static SolidColorBrush GreenYellow { get; private set; }
public static SolidColorBrush Honeydew { get; private set; } public static SolidColorBrush Honeydew { get; private set; }
public static SolidColorBrush HotPink { get; private set; } public static SolidColorBrush HotPink { get; private set; }
public static SolidColorBrush IndianRed { get; private set; } public static SolidColorBrush IndianRed { get; private set; }
public static SolidColorBrush Indigo { get; private set; } public static SolidColorBrush Indigo { get; private set; }
public static SolidColorBrush Ivory { get; private set; } public static SolidColorBrush Ivory { get; private set; }
public static SolidColorBrush Khaki { get; private set; } public static SolidColorBrush Khaki { get; private set; }
public static SolidColorBrush Lavender { get; private set; } public static SolidColorBrush Lavender { get; private set; }
public static SolidColorBrush LavenderBlush { get; private set; } public static SolidColorBrush LavenderBlush { get; private set; }
public static SolidColorBrush LawnGreen { get; private set; } public static SolidColorBrush LawnGreen { get; private set; }
public static SolidColorBrush LemonChiffon { get; private set; } public static SolidColorBrush LemonChiffon { get; private set; }
public static SolidColorBrush LightBlue { get; private set; } public static SolidColorBrush LightBlue { get; private set; }
public static SolidColorBrush LightCoral { get; private set; } public static SolidColorBrush LightCoral { get; private set; }
public static SolidColorBrush LightCyan { get; private set; } public static SolidColorBrush LightCyan { get; private set; }
public static SolidColorBrush LightGoldenrodYellow { get; private set; } public static SolidColorBrush LightGoldenrodYellow { get; private set; }
public static SolidColorBrush LightGray { get; private set; } public static SolidColorBrush LightGray { get; private set; }
public static SolidColorBrush LightGreen { get; private set; } public static SolidColorBrush LightGreen { get; private set; }
public static SolidColorBrush LightPink { get; private set; } public static SolidColorBrush LightPink { get; private set; }
public static SolidColorBrush LightSalmon { get; private set; } public static SolidColorBrush LightSalmon { get; private set; }
public static SolidColorBrush LightSeaGreen { get; private set; } public static SolidColorBrush LightSeaGreen { get; private set; }
public static SolidColorBrush LightSkyBlue { get; private set; } public static SolidColorBrush LightSkyBlue { get; private set; }
public static SolidColorBrush LightSlateGray { get; private set; } public static SolidColorBrush LightSlateGray { get; private set; }
public static SolidColorBrush LightSteelBlue { get; private set; } public static SolidColorBrush LightSteelBlue { get; private set; }
public static SolidColorBrush LightYellow { get; private set; } public static SolidColorBrush LightYellow { get; private set; }
public static SolidColorBrush Lime { get; private set; } public static SolidColorBrush Lime { get; private set; }
public static SolidColorBrush LimeGreen { get; private set; } public static SolidColorBrush LimeGreen { get; private set; }
public static SolidColorBrush Linen { get; private set; } public static SolidColorBrush Linen { get; private set; }
public static SolidColorBrush Magenta { get; private set; } public static SolidColorBrush Magenta { get; private set; }
public static SolidColorBrush Maroon { get; private set; } public static SolidColorBrush Maroon { get; private set; }
public static SolidColorBrush MediumAquamarine { get; private set; } public static SolidColorBrush MediumAquamarine { get; private set; }
public static SolidColorBrush MediumBlue { get; private set; } public static SolidColorBrush MediumBlue { get; private set; }
public static SolidColorBrush MediumOrchid { get; private set; } public static SolidColorBrush MediumOrchid { get; private set; }
public static SolidColorBrush MediumPurple { get; private set; } public static SolidColorBrush MediumPurple { get; private set; }
public static SolidColorBrush MediumSeaGreen { get; private set; } public static SolidColorBrush MediumSeaGreen { get; private set; }
public static SolidColorBrush MediumSlateBlue { get; private set; } public static SolidColorBrush MediumSlateBlue { get; private set; }
public static SolidColorBrush MediumSpringGreen { get; private set; } public static SolidColorBrush MediumSpringGreen { get; private set; }
public static SolidColorBrush MediumTurquoise { get; private set; } public static SolidColorBrush MediumTurquoise { get; private set; }
public static SolidColorBrush MediumVioletRed { get; private set; } public static SolidColorBrush MediumVioletRed { get; private set; }
public static SolidColorBrush MidnightBlue { get; private set; } public static SolidColorBrush MidnightBlue { get; private set; }
public static SolidColorBrush MintCream { get; private set; } public static SolidColorBrush MintCream { get; private set; }
public static SolidColorBrush MistyRose { get; private set; } public static SolidColorBrush MistyRose { get; private set; }
public static SolidColorBrush Moccasin { get; private set; } public static SolidColorBrush Moccasin { get; private set; }
public static SolidColorBrush NavajoWhite { get; private set; } public static SolidColorBrush NavajoWhite { get; private set; }
public static SolidColorBrush Navy { get; private set; } public static SolidColorBrush Navy { get; private set; }
public static SolidColorBrush OldLace { get; private set; } public static SolidColorBrush OldLace { get; private set; }
public static SolidColorBrush Olive { get; private set; } public static SolidColorBrush Olive { get; private set; }
public static SolidColorBrush OliveDrab { get; private set; } public static SolidColorBrush OliveDrab { get; private set; }
public static SolidColorBrush Orange { get; private set; } public static SolidColorBrush Orange { get; private set; }
public static SolidColorBrush OrangeRed { get; private set; } public static SolidColorBrush OrangeRed { get; private set; }
public static SolidColorBrush Orchid { get; private set; } public static SolidColorBrush Orchid { get; private set; }
public static SolidColorBrush PaleGoldenrod { get; private set; } public static SolidColorBrush PaleGoldenrod { get; private set; }
public static SolidColorBrush PaleGreen { get; private set; } public static SolidColorBrush PaleGreen { get; private set; }
public static SolidColorBrush PaleTurquoise { get; private set; } public static SolidColorBrush PaleTurquoise { get; private set; }
public static SolidColorBrush PaleVioletRed { get; private set; } public static SolidColorBrush PaleVioletRed { get; private set; }
public static SolidColorBrush PapayaWhip { get; private set; } public static SolidColorBrush PapayaWhip { get; private set; }
public static SolidColorBrush PeachPuff { get; private set; } public static SolidColorBrush PeachPuff { get; private set; }
public static SolidColorBrush Peru { get; private set; } public static SolidColorBrush Peru { get; private set; }
public static SolidColorBrush Pink { get; private set; } public static SolidColorBrush Pink { get; private set; }
public static SolidColorBrush Plum { get; private set; } public static SolidColorBrush Plum { get; private set; }
public static SolidColorBrush PowderBlue { get; private set; } public static SolidColorBrush PowderBlue { get; private set; }
public static SolidColorBrush Purple { get; private set; } public static SolidColorBrush Purple { get; private set; }
public static SolidColorBrush Red { get; private set; } public static SolidColorBrush Red { get; private set; }
public static SolidColorBrush RosyBrown { get; private set; } public static SolidColorBrush RosyBrown { get; private set; }
public static SolidColorBrush RoyalBlue { get; private set; } public static SolidColorBrush RoyalBlue { get; private set; }
public static SolidColorBrush SaddleBrown { get; private set; } public static SolidColorBrush SaddleBrown { get; private set; }
public static SolidColorBrush Salmon { get; private set; } public static SolidColorBrush Salmon { get; private set; }
public static SolidColorBrush SandyBrown { get; private set; } public static SolidColorBrush SandyBrown { get; private set; }
public static SolidColorBrush SeaGreen { get; private set; } public static SolidColorBrush SeaGreen { get; private set; }
public static SolidColorBrush SeaShell { get; private set; } public static SolidColorBrush SeaShell { get; private set; }
public static SolidColorBrush Sienna { get; private set; } public static SolidColorBrush Sienna { get; private set; }
public static SolidColorBrush Silver { get; private set; } public static SolidColorBrush Silver { get; private set; }
public static SolidColorBrush SkyBlue { get; private set; } public static SolidColorBrush SkyBlue { get; private set; }
public static SolidColorBrush SlateBlue { get; private set; } public static SolidColorBrush SlateBlue { get; private set; }
public static SolidColorBrush SlateGray { get; private set; } public static SolidColorBrush SlateGray { get; private set; }
public static SolidColorBrush Snow { get; private set; } public static SolidColorBrush Snow { get; private set; }
public static SolidColorBrush SpringGreen { get; private set; } public static SolidColorBrush SpringGreen { get; private set; }
public static SolidColorBrush SteelBlue { get; private set; } public static SolidColorBrush SteelBlue { get; private set; }
public static SolidColorBrush Tan { get; private set; } public static SolidColorBrush Tan { get; private set; }
public static SolidColorBrush Teal { get; private set; } public static SolidColorBrush Teal { get; private set; }
public static SolidColorBrush Thistle { get; private set; } public static SolidColorBrush Thistle { get; private set; }
public static SolidColorBrush Tomato { get; private set; } public static SolidColorBrush Tomato { get; private set; }
public static SolidColorBrush Transparent { get; private set; } public static SolidColorBrush Transparent { get; private set; }
public static SolidColorBrush Turquoise { get; private set; } public static SolidColorBrush Turquoise { get; private set; }
public static SolidColorBrush Violet { get; private set; } public static SolidColorBrush Violet { get; private set; }
public static SolidColorBrush Wheat { get; private set; } public static SolidColorBrush Wheat { get; private set; }
public static SolidColorBrush White { get; private set; } public static SolidColorBrush White { get; private set; }
public static SolidColorBrush WhiteSmoke { get; private set; } public static SolidColorBrush WhiteSmoke { get; private set; }
public static SolidColorBrush Yellow { get; private set; } public static SolidColorBrush Yellow { get; private set; }
public static SolidColorBrush YellowGreen { get; private set; } public static SolidColorBrush YellowGreen { get; private set; }
} }
} }

2
Perspex.SceneGraph/Media/ITransform.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="Visual.cs" company="Steven Kirk"> // <copyright file="ITransform.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

4
Perspex.SceneGraph/Origin.cs

@ -47,8 +47,8 @@ namespace Perspex
public Point ToPixels(Size size) public Point ToPixels(Size size)
{ {
return this.unit == OriginUnit.Pixels ? return this.unit == OriginUnit.Pixels ?
point : this.point :
new Point(point.X * size.Width, point.Y * size.Height); new Point(this.point.X * size.Width, this.point.Y * size.Height);
} }
} }
} }

2
Perspex.SceneGraph/Platform/IPlatformRenderInterface.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="IPlatformFactory.cs" company="Steven Kirk"> // <copyright file="IPlatformRenderInterface.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

10
Perspex.SceneGraph/Properties/AssemblyInfo.cs

@ -1,7 +1,11 @@
using System.Resources; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information

8
Perspex.SceneGraph/Rect.cs

@ -215,8 +215,8 @@ namespace Perspex
public static Rect operator *(Rect rect, Vector scale) public static Rect operator *(Rect rect, Vector scale)
{ {
double centerX = rect.x + rect.width / 2; double centerX = rect.x + (rect.width / 2);
double centerY = rect.y + rect.height / 2; double centerY = rect.y + (rect.height / 2);
double width = rect.width * scale.X; double width = rect.width * scale.X;
double height = rect.height * scale.Y; double height = rect.height * scale.Y;
return new Rect( return new Rect(
@ -228,8 +228,8 @@ namespace Perspex
public static Rect operator /(Rect rect, Vector scale) public static Rect operator /(Rect rect, Vector scale)
{ {
double centerX = rect.x + rect.width / 2; double centerX = rect.x + (rect.width / 2);
double centerY = rect.y + rect.height / 2; double centerY = rect.y + (rect.height / 2);
double width = rect.width / scale.X; double width = rect.width / scale.X;
double height = rect.height / scale.Y; double height = rect.height / scale.Y;
return new Rect( return new Rect(

2
Perspex.SceneGraph/Rendering/IRenderRoot.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="IRendered.cs" company="Steven Kirk"> // <copyright file="IRenderRoot.cs" company="Steven Kirk">
// Copyright 2013 MIT Licence. See licence.md for more information. // Copyright 2013 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

4
Perspex.SceneGraph/Visual.cs

@ -42,7 +42,7 @@ namespace Perspex
public Visual() public Visual()
{ {
this.visualChildren = new PerspexList<IVisual>(); this.visualChildren = new PerspexList<IVisual>();
this.visualChildren.CollectionChanged += VisualChildrenChanged; this.visualChildren.CollectionChanged += this.VisualChildrenChanged;
} }
public bool IsVisible public bool IsVisible
@ -215,6 +215,7 @@ namespace Perspex
v.InheritanceParent = this; v.InheritanceParent = this;
v.SetVisualParent(this); v.SetVisualParent(this);
} }
break; break;
case NotifyCollectionChangedAction.Remove: case NotifyCollectionChangedAction.Remove:
@ -223,6 +224,7 @@ namespace Perspex
v.InheritanceParent = null; v.InheritanceParent = null;
v.SetVisualParent(null); v.SetVisualParent(null);
} }
break; break;
} }
} }

10
Perspex.Styling/Properties/AssemblyInfo.cs

@ -1,7 +1,11 @@
using System.Resources; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Resources;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information

8
Windows/Perspex.Direct2D1/Properties/AssemblyInfo.cs

@ -1,4 +1,10 @@
using System.Reflection; // -----------------------------------------------------------------------
// <copyright file="AssemblyInfo.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;

Loading…
Cancel
Save