diff --git a/Perspex.sln b/Perspex.sln index 8e836d8e35..ce49a336e6 100644 --- a/Perspex.sln +++ b/Perspex.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.24720.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.Base", "src\Perspex.Base\Perspex.Base.csproj", "{B09B78D8-9B26-48B0-9149-D64A2F120F3F}" EndProject @@ -138,6 +138,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.iOSTestApplication" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Perspex.LeakTests", "tests\Perspex.LeakTests\Perspex.LeakTests.csproj", "{E1AA3DBF-9056-4530-9376-18119A7A3FFE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog", "samples\ControlCatalog\ControlCatalog.csproj", "{61BEC86C-F307-4295-B5B8-9428610D7D55}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Shared\RenderHelpers\RenderHelpers.projitems*{fb05ac90-89ba-4f2f-a924-f37875fb547c}*SharedItemsImports = 4 @@ -146,18 +148,18 @@ Global src\Shared\PlatformSupport\PlatformSupport.projitems*{e4d9629c-f168-4224-3f51-a5e482ffbc42}*SharedItemsImports = 13 src\Skia\Perspex.Skia\Perspex.Skia.projitems*{2f59f3d0-748d-4652-b01e-e0d954756308}*SharedItemsImports = 13 src\Shared\PlatformSupport\PlatformSupport.projitems*{db070a10-bf39-4752-8456-86e9d5928478}*SharedItemsImports = 4 - src\Shared\RenderHelpers\RenderHelpers.projitems*{925dd807-b651-475f-9f7c-cbeb974ce43d}*SharedItemsImports = 4 src\Skia\Perspex.Skia\Perspex.Skia.projitems*{925dd807-b651-475f-9f7c-cbeb974ce43d}*SharedItemsImports = 4 + src\Shared\RenderHelpers\RenderHelpers.projitems*{925dd807-b651-475f-9f7c-cbeb974ce43d}*SharedItemsImports = 4 samples\TestApplicationShared\TestApplicationShared.projitems*{78345174-5b52-4a14-b9fd-d5f2428137f0}*SharedItemsImports = 13 src\Shared\PlatformSupport\PlatformSupport.projitems*{54f237d5-a70a-4752-9656-0c70b1a7b047}*SharedItemsImports = 4 src\Shared\RenderHelpers\RenderHelpers.projitems*{3c4c0cb4-0c0f-4450-a37b-148c84ff905f}*SharedItemsImports = 13 src\Shared\PlatformSupport\PlatformSupport.projitems*{811a76cf-1cf6-440f-963b-bbe31bd72a82}*SharedItemsImports = 4 - src\Shared\RenderHelpers\RenderHelpers.projitems*{47be08a7-5985-410b-9ffc-2264b8ea595f}*SharedItemsImports = 4 src\Skia\Perspex.Skia\Perspex.Skia.projitems*{47be08a7-5985-410b-9ffc-2264b8ea595f}*SharedItemsImports = 4 + src\Shared\RenderHelpers\RenderHelpers.projitems*{47be08a7-5985-410b-9ffc-2264b8ea595f}*SharedItemsImports = 4 samples\TestApplicationShared\TestApplicationShared.projitems*{8c923867-8a8f-4f6b-8b80-47d9e8436166}*SharedItemsImports = 4 samples\TestApplicationShared\TestApplicationShared.projitems*{e3a1060b-50d0-44e8-88b6-f44ef2e5bd72}*SharedItemsImports = 4 - src\Shared\RenderHelpers\RenderHelpers.projitems*{bd43f7c0-396b-4aa1-bad9-dfde54d51298}*SharedItemsImports = 4 src\Skia\Perspex.Skia\Perspex.Skia.projitems*{bd43f7c0-396b-4aa1-bad9-dfde54d51298}*SharedItemsImports = 4 + src\Shared\RenderHelpers\RenderHelpers.projitems*{bd43f7c0-396b-4aa1-bad9-dfde54d51298}*SharedItemsImports = 4 src\Shared\RenderHelpers\RenderHelpers.projitems*{3e908f67-5543-4879-a1dc-08eace79b3cd}*SharedItemsImports = 4 src\Shared\PlatformSupport\PlatformSupport.projitems*{e1aa3dbf-9056-4530-9376-18119a7a3ffe}*SharedItemsImports = 4 EndGlobalSection @@ -1267,6 +1269,30 @@ Global {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Release|iPhone.Build.0 = Release|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.AppStore|Any CPU.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.AppStore|iPhone.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Debug|iPhone.Build.0 = Debug|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Release|Any CPU.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Release|iPhone.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Release|iPhone.Build.0 = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {61BEC86C-F307-4295-B5B8-9428610D7D55}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1310,5 +1336,6 @@ Global {4488AD85-1495-4809-9AA4-DDFE0A48527E} = {0CB0B92E-6CFF-4240-80A5-CCAFE75D91E1} {8C923867-8A8F-4F6B-8B80-47D9E8436166} = {0CB0B92E-6CFF-4240-80A5-CCAFE75D91E1} {E1AA3DBF-9056-4530-9376-18119A7A3FFE} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B} + {61BEC86C-F307-4295-B5B8-9428610D7D55} = {9B9E3891-2366-4253-A952-D08BCEB71098} EndGlobalSection EndGlobal diff --git a/samples/ControlCatalog/App.config b/samples/ControlCatalog/App.config new file mode 100644 index 0000000000..8324aa6ff1 --- /dev/null +++ b/samples/ControlCatalog/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/App.paml b/samples/ControlCatalog/App.paml new file mode 100644 index 0000000000..ba8bc0ca0c --- /dev/null +++ b/samples/ControlCatalog/App.paml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/App.paml.cs b/samples/ControlCatalog/App.paml.cs new file mode 100644 index 0000000000..b1aa671215 --- /dev/null +++ b/samples/ControlCatalog/App.paml.cs @@ -0,0 +1,55 @@ +using System; +using System.Linq; +using Perspex; +using Perspex.Controls; +using Perspex.Diagnostics; +using Perspex.Markup.Xaml; +using Perspex.Themes.Default; + +namespace ControlCatalog +{ + class App : Application + { + public App() + { + RegisterServices(); + InitializeSubsystems(GetPlatformId()); + Styles = new DefaultTheme(); + InitializeComponent(); + } + + public static void AttachDevTools(Window window) + { +#if DEBUG + DevTools.Attach(window); +#endif + } + + static void Main(string[] args) + { + var app = new App(); + var window = new MainWindow(); + window.Show(); + app.Run(window); + } + + private void InitializeComponent() + { + PerspexXamlLoader.Load(this); + } + + private int GetPlatformId() + { + var args = Environment.GetCommandLineArgs(); + + if (args.Contains("--gtk")) + { + return (int)PlatformID.Unix; + } + else + { + return (int)Environment.OSVersion.Platform; + } + } + } +} diff --git a/samples/ControlCatalog/Assets/delicate-arch-896885_640.jpg b/samples/ControlCatalog/Assets/delicate-arch-896885_640.jpg new file mode 100644 index 0000000000..90894abe97 Binary files /dev/null and b/samples/ControlCatalog/Assets/delicate-arch-896885_640.jpg differ diff --git a/samples/ControlCatalog/Assets/hirsch-899118_640.jpg b/samples/ControlCatalog/Assets/hirsch-899118_640.jpg new file mode 100644 index 0000000000..af0eff6b47 Binary files /dev/null and b/samples/ControlCatalog/Assets/hirsch-899118_640.jpg differ diff --git a/samples/ControlCatalog/Assets/maple-leaf-888807_640.jpg b/samples/ControlCatalog/Assets/maple-leaf-888807_640.jpg new file mode 100644 index 0000000000..72bf0a61ae Binary files /dev/null and b/samples/ControlCatalog/Assets/maple-leaf-888807_640.jpg differ diff --git a/samples/ControlCatalog/ControlCatalog.csproj b/samples/ControlCatalog/ControlCatalog.csproj new file mode 100644 index 0000000000..189660101e --- /dev/null +++ b/samples/ControlCatalog/ControlCatalog.csproj @@ -0,0 +1,186 @@ + + + + + Debug + AnyCPU + {61BEC86C-F307-4295-B5B8-9428610D7D55} + WinExe + Properties + ControlCatalog + ControlCatalog + v4.6 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + App.paml + + + MainWindow.paml + + + BorderPage.paml + + + CarouselPage.paml + + + CanvasPage.paml + + + ButtonPage.paml + + + + + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + + + {fb05ac90-89ba-4f2f-a924-f37875fb547c} + Perspex.Cairo + + + {54f237d5-a70a-4752-9656-0c70b1a7b047} + Perspex.Gtk + + + {3e53a01a-b331-47f3-b828-4a5717e77a24} + Perspex.Markup.Xaml + + + {6417e941-21bc-467b-a771-0de389353ce6} + Perspex.Markup + + + {d211e587-d8bc-45b9-95a4-f297c8fa5200} + Perspex.Animation + + + {799a7bb5-3c2c-48b6-85a7-406a12c420da} + Perspex.Application + + + {b09b78d8-9b26-48b0-9149-d64a2f120f3f} + Perspex.Base + + + {d2221c82-4a25-4583-9b43-d791e3f6820c} + Perspex.Controls + + + {7062ae20-5dcc-4442-9645-8195bdece63e} + Perspex.Diagnostics + + + {5fb2b005-0a7f-4dad-add4-3ed01444e63d} + Perspex.HtmlRenderer + + + {62024b2d-53eb-4638-b26b-85eeaa54866e} + Perspex.Input + + + {6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b} + Perspex.Interactivity + + + {42472427-4774-4c81-8aff-9f27b8e31721} + Perspex.Layout + + + {6417b24e-49c2-4985-8db2-3ab9d898ec91} + Perspex.ReactiveUI + + + {eb582467-6abb-43a1-b052-e981ba910e3a} + Perspex.SceneGraph + + + {f1baa01a-f176-4c6a-b39d-5b40bb1b148f} + Perspex.Styling + + + {3e10a5fa-e8da-48b1-ad44-6a5b6cb7750f} + Perspex.Themes.Default + + + {3e908f67-5543-4879-a1dc-08eace79b3cd} + Perspex.Direct2D1 + + + {811a76cf-1cf6-440f-963b-bbe31bd72a82} + Perspex.Win32 + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/MainWindow.paml b/samples/ControlCatalog/MainWindow.paml new file mode 100644 index 0000000000..b83321dd4d --- /dev/null +++ b/samples/ControlCatalog/MainWindow.paml @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/MainWindow.paml.cs b/samples/ControlCatalog/MainWindow.paml.cs new file mode 100644 index 0000000000..5a5b7d4303 --- /dev/null +++ b/samples/ControlCatalog/MainWindow.paml.cs @@ -0,0 +1,19 @@ +using Perspex.Controls; +using Perspex.Markup.Xaml; + +namespace ControlCatalog +{ + public class MainWindow : Window + { + public MainWindow() + { + this.InitializeComponent(); + App.AttachDevTools(this); + } + + private void InitializeComponent() + { + PerspexXamlLoader.Load(this); + } + } +} diff --git a/samples/ControlCatalog/Pages/BorderPage.paml b/samples/ControlCatalog/Pages/BorderPage.paml new file mode 100644 index 0000000000..5ce9eb80f1 --- /dev/null +++ b/samples/ControlCatalog/Pages/BorderPage.paml @@ -0,0 +1,29 @@ + + + Border + A control which decorates a child with a border and background + + + + Border + + + Border and Background + + + Rounded Corners + + + Rounded Corners + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/Pages/BorderPage.paml.cs b/samples/ControlCatalog/Pages/BorderPage.paml.cs new file mode 100644 index 0000000000..9cc6629599 --- /dev/null +++ b/samples/ControlCatalog/Pages/BorderPage.paml.cs @@ -0,0 +1,18 @@ +using Perspex.Controls; +using Perspex.Markup.Xaml; + +namespace ControlCatalog.Pages +{ + public class BorderPage : UserControl + { + public BorderPage() + { + this.InitializeComponent(); + } + + private void InitializeComponent() + { + PerspexXamlLoader.Load(this); + } + } +} diff --git a/samples/ControlCatalog/Pages/ButtonPage.paml b/samples/ControlCatalog/Pages/ButtonPage.paml new file mode 100644 index 0000000000..a5f99634aa --- /dev/null +++ b/samples/ControlCatalog/Pages/ButtonPage.paml @@ -0,0 +1,26 @@ + + + Button + A button control + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/Pages/ButtonPage.paml.cs b/samples/ControlCatalog/Pages/ButtonPage.paml.cs new file mode 100644 index 0000000000..a0c424570b --- /dev/null +++ b/samples/ControlCatalog/Pages/ButtonPage.paml.cs @@ -0,0 +1,18 @@ +using Perspex.Controls; +using Perspex.Markup.Xaml; + +namespace ControlCatalog.Pages +{ + public class ButtonPage : UserControl + { + public ButtonPage() + { + this.InitializeComponent(); + } + + private void InitializeComponent() + { + PerspexXamlLoader.Load(this); + } + } +} diff --git a/samples/ControlCatalog/Pages/CanvasPage.paml b/samples/ControlCatalog/Pages/CanvasPage.paml new file mode 100644 index 0000000000..4a3f682d17 --- /dev/null +++ b/samples/ControlCatalog/Pages/CanvasPage.paml @@ -0,0 +1,13 @@ + + + Canvas + A panel which lays out its children by explicit coordinates + + + + + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/Pages/CanvasPage.paml.cs b/samples/ControlCatalog/Pages/CanvasPage.paml.cs new file mode 100644 index 0000000000..4264b11071 --- /dev/null +++ b/samples/ControlCatalog/Pages/CanvasPage.paml.cs @@ -0,0 +1,18 @@ +using Perspex.Controls; +using Perspex.Markup.Xaml; + +namespace ControlCatalog.Pages +{ + public class CanvasPage : UserControl + { + public CanvasPage() + { + this.InitializeComponent(); + } + + private void InitializeComponent() + { + PerspexXamlLoader.Load(this); + } + } +} diff --git a/samples/ControlCatalog/Pages/CarouselPage.paml b/samples/ControlCatalog/Pages/CarouselPage.paml new file mode 100644 index 0000000000..6f1243a005 --- /dev/null +++ b/samples/ControlCatalog/Pages/CarouselPage.paml @@ -0,0 +1,33 @@ + + + Carousel + An items control that displays its items as pages that fill the control. + + + + + + + + + + + + + + + + Transition + + None + Slide + Crossfade + + + + + \ No newline at end of file diff --git a/samples/ControlCatalog/Pages/CarouselPage.paml.cs b/samples/ControlCatalog/Pages/CarouselPage.paml.cs new file mode 100644 index 0000000000..540cb5cc87 --- /dev/null +++ b/samples/ControlCatalog/Pages/CarouselPage.paml.cs @@ -0,0 +1,22 @@ +using Perspex.Controls; +using Perspex.Markup.Xaml; + +namespace ControlCatalog.Pages +{ + public class CarouselPage : UserControl + { + private Carousel carousel; + private Button left; + private Button right; + + public CarouselPage() + { + this.InitializeComponent(); + } + + private void InitializeComponent() + { + PerspexXamlLoader.Load(this); + } + } +} diff --git a/samples/ControlCatalog/Properties/AssemblyInfo.cs b/samples/ControlCatalog/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..31f8a6272b --- /dev/null +++ b/samples/ControlCatalog/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("ControlCatalog")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ControlCatalog")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("61bec86c-f307-4295-b5b8-9428610d7d55")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/samples/ControlCatalog/SideBar.paml b/samples/ControlCatalog/SideBar.paml new file mode 100644 index 0000000000..d9636cc36a --- /dev/null +++ b/samples/ControlCatalog/SideBar.paml @@ -0,0 +1,39 @@ + + + + + + +