diff --git a/Perspex.Animation/LinearEasing.cs b/Perspex.Animation/LinearEasing.cs index 0a20429a75..a959fe9f18 100644 --- a/Perspex.Animation/LinearEasing.cs +++ b/Perspex.Animation/LinearEasing.cs @@ -22,11 +22,11 @@ namespace Perspex.Animation /// /// The type. /// An easing function. - public static IEasing For() + public static IEasing For() { if (typeof(T) == typeof(double)) { - return new LinearDoubleEasing(); + return (IEasing)new LinearDoubleEasing(); } else { diff --git a/Perspex.Animation/Properties/AssemblyInfo.cs b/Perspex.Animation/Properties/AssemblyInfo.cs index 6c99227950..0d68cde482 100644 --- a/Perspex.Animation/Properties/AssemblyInfo.cs +++ b/Perspex.Animation/Properties/AssemblyInfo.cs @@ -1,9 +1,15 @@ -using System.Resources; +// ----------------------------------------------------------------------- +// +// Copyright 2015 MIT Licence. See licence.md for more information. +// +// ----------------------------------------------------------------------- + +using System.Resources; using System.Reflection; using System.Runtime.CompilerServices; 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 // associated with an assembly. [assembly: AssemblyTitle("Perspex.Animation")] @@ -19,11 +25,11 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] diff --git a/Perspex.Application/Application.cs b/Perspex.Application/Application.cs index 2f30f604bd..2639a17455 100644 --- a/Perspex.Application/Application.cs +++ b/Perspex.Application/Application.cs @@ -16,12 +16,36 @@ namespace Perspex using Perspex.Threading; using Splat; + /// + /// Encapsulates a Perspex application. + /// + /// + /// The class encapsulates Perspex application-specific + /// functionality, including: + /// - A global set of . + /// - A global set of . + /// - A . + /// - An . + /// - Registers services needed by the rest of Perspex in the + /// method. + /// - Tracks the lifetime of the application. + /// public class Application : IGlobalDataTemplates, IGlobalStyles { + /// + /// The application-global data templates. + /// private DataTemplates dataTemplates; + /// + /// The styler that will be used to apply styles to controls. + /// private Styler styler = new Styler(); + /// + /// Initializes a new instance of the class. + /// + /// The theme to use. public Application(Styles theme) { if (Current != null) @@ -34,12 +58,24 @@ namespace Perspex this.RegisterServices(); } + /// + /// Gets the current instance of the class. + /// + /// + /// The current instance of the class. + /// public static Application Current { get; private set; } + /// + /// Gets or sets the application's global data templates. + /// + /// + /// The application's global data templates. + /// public DataTemplates DataTemplates { get @@ -58,24 +94,49 @@ namespace Perspex } } + /// + /// Gets the application's focus manager. + /// + /// + /// The application's focus manager. + /// public IFocusManager FocusManager { get; private set; } + /// + /// Gets the application's input manager. + /// + /// + /// The application's input manager. + /// public InputManager InputManager { get; private set; } + /// + /// Gets the application's global styles. + /// + /// + /// The application's global styles. + /// + /// + /// Global styles apply to all windows in the application. + /// public Styles Styles { get; private set; } + /// + /// Runs the application's main loop until the is closed. + /// + /// The closable to track public void Run(ICloseable closable) { var source = new CancellationTokenSource(); @@ -83,6 +144,9 @@ namespace Perspex Dispatcher.UIThread.MainLoop(source.Token); } + /// + /// Register's the services needed by Perspex. + /// protected virtual void RegisterServices() { var keyboardNavigation = new KeyboardNavigation(); diff --git a/Perspex.Application/Properties/AssemblyInfo.cs b/Perspex.Application/Properties/AssemblyInfo.cs index 04c5a6c9a2..070cf8d27b 100644 --- a/Perspex.Application/Properties/AssemblyInfo.cs +++ b/Perspex.Application/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ using System.Reflection; using System.Resources; -// 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 // associated with an assembly. [assembly: AssemblyTitle("Perspex.Application")] @@ -23,11 +23,11 @@ using System.Resources; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -// You can specify all the values or you can default the Build and Revision Numbers +// You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")]