Browse Source

Merge branch 'master' into pr/1125-parsing-improvements

Steven Kirk 7 years ago
parent
commit
b5e7182490
100 changed files with 1405 additions and 2181 deletions
  1. 3 0
      .gitignore
  2. 5 0
      .ncrunch/Avalonia.Designer.HostApp.v3.ncrunchproject
  3. 4 2
      .ncrunch/Avalonia.Direct2D1.RenderTests.v3.ncrunchproject
  4. 4 2
      .ncrunch/Avalonia.Skia.RenderTests.v3.ncrunchproject
  5. 5 0
      .ncrunch/RemoteTest.v3.ncrunchproject
  6. 2 3
      .travis.yml
  7. 148 144
      Avalonia.sln
  8. 1 9
      appveyor.yml
  9. 39 52
      build.cake
  10. 1 1
      build.ps1
  11. 1 1
      build/JetBrains.dotMemoryUnit.props
  12. 1 1
      build/MonoMac.props
  13. 0 2
      build/NetCore.props
  14. 0 1
      build/Rx.props
  15. 3 1
      build/Serilog.props
  16. 0 5
      build/Splat.props
  17. 1 1
      build/System.Drawing.Common.props
  18. 8 8
      build/XUnit.props
  19. 0 3
      docs/.gitignore
  20. 0 21
      docs/README.md
  21. 0 3
      docs/build.cmd
  22. 0 55
      docs/docfx.json
  23. 0 43
      docs/guidelines/build.md
  24. 0 60
      docs/guidelines/contributing.md
  25. 0 4
      docs/guidelines/toc.yml
  26. BIN
      docs/images/avalonia-video.png
  27. BIN
      docs/images/cross-platform.png
  28. BIN
      docs/images/hello-world-xaml.png
  29. BIN
      docs/images/inspection-support.png
  30. BIN
      docs/images/screen.png
  31. 0 37
      docs/index.md
  32. 0 225
      docs/intro.md
  33. 0 2
      docs/serve.cmd
  34. 0 101
      docs/spec/architecture.md
  35. 0 156
      docs/spec/binding-from-code.md
  36. 0 99
      docs/spec/binding-from-xaml.md
  37. 0 199
      docs/spec/defining-properties.md
  38. 0 54
      docs/spec/logging.md
  39. 0 111
      docs/spec/styles.md
  40. 0 14
      docs/spec/toc.yml
  41. 0 102
      docs/spec/working-with-properties.md
  42. 0 13
      docs/template/partials/footer.tmpl.partial
  43. 0 10
      docs/toc.yml
  44. 0 161
      docs/tutorial/from-wpf.md
  45. 0 10
      docs/tutorial/gettingstarted.md
  46. BIN
      docs/tutorial/images/add-dialogs.png
  47. 0 86
      docs/tutorial/nuget.md
  48. 0 6
      docs/tutorial/toc.yml
  49. 36 8
      packages.cake
  50. 3 3
      parameters.cake
  51. 52 42
      readme.md
  52. 1 1
      samples/BindingTest/App.config
  53. 1 12
      samples/BindingTest/App.xaml.cs
  54. 1 3
      samples/BindingTest/BindingTest.csproj
  55. 1 1
      samples/ControlCatalog.Desktop/App.config
  56. 1 2
      samples/ControlCatalog.Desktop/ControlCatalog.Desktop.csproj
  57. 7 15
      samples/ControlCatalog.Desktop/Program.cs
  58. 1 0
      samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj
  59. 8 11
      samples/ControlCatalog.NetCore/Program.cs
  60. 2 3
      samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj
  61. 7 175
      samples/ControlCatalog/ControlCatalog.csproj
  62. 7 1
      samples/ControlCatalog/MainView.xaml
  63. 59 0
      samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
  64. 143 0
      samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml.cs
  65. 24 0
      samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml
  66. 54 0
      samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml.cs
  67. 47 0
      samples/ControlCatalog/Pages/CalendarPage.xaml
  68. 28 0
      samples/ControlCatalog/Pages/CalendarPage.xaml.cs
  69. 9 1
      samples/ControlCatalog/Pages/CarouselPage.xaml
  70. 4 1
      samples/ControlCatalog/Pages/CarouselPage.xaml.cs
  71. 19 6
      samples/ControlCatalog/Pages/CheckBoxPage.xaml
  72. 46 0
      samples/ControlCatalog/Pages/DatePickerPage.xaml
  73. 36 0
      samples/ControlCatalog/Pages/DatePickerPage.xaml.cs
  74. 1 1
      samples/ControlCatalog/Pages/DialogsPage.xaml.cs
  75. 19 0
      samples/ControlCatalog/Pages/DragAndDropPage.xaml
  76. 71 0
      samples/ControlCatalog/Pages/DragAndDropPage.xaml.cs
  77. 80 0
      samples/ControlCatalog/Pages/NumericUpDownPage.xaml
  78. 94 0
      samples/ControlCatalog/Pages/NumericUpDownPage.xaml.cs
  79. 18 6
      samples/ControlCatalog/Pages/RadioButtonPage.xaml
  80. 0 36
      samples/ControlCatalog/Properties/AssemblyInfo.cs
  81. 3 3
      samples/ControlCatalog/SideBar.xaml
  82. 6 0
      samples/Previewer/App.xaml
  83. 14 0
      samples/Previewer/App.xaml.cs
  84. 19 0
      samples/Previewer/Center.cs
  85. 12 0
      samples/Previewer/MainWindow.xaml
  86. 86 0
      samples/Previewer/MainWindow.xaml.cs
  87. 27 0
      samples/Previewer/Previewer.csproj
  88. 13 0
      samples/Previewer/Program.cs
  89. 53 0
      samples/RemoteTest/Program.cs
  90. 25 0
      samples/RemoteTest/RemoteTest.csproj
  91. 1 1
      samples/RenderTest/App.config
  92. 1 13
      samples/RenderTest/Program.cs
  93. 1 3
      samples/RenderTest/RenderTest.csproj
  94. 3 3
      samples/RenderTest/SideBar.xaml
  95. 1 1
      samples/VirtualizationTest/App.config
  96. 10 2
      samples/VirtualizationTest/MainWindow.xaml
  97. 1 12
      samples/VirtualizationTest/Program.cs
  98. 19 1
      samples/VirtualizationTest/ViewModels/MainWindowViewModel.cs
  99. 1 3
      samples/VirtualizationTest/VirtualizationTest.csproj
  100. 3 3
      samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj

+ 3 - 0
.gitignore

@@ -175,3 +175,6 @@ artifacts/
 nuget
 Avalonia.XBuild.sln
 project.lock.json
+.idea/*
+**/obj-Skia/*
+**/obj-Direct2D1/*

+ 5 - 0
.ncrunch/Avalonia.Designer.HostApp.v3.ncrunchproject

@@ -0,0 +1,5 @@
+<ProjectConfiguration>
+  <Settings>
+    <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
+  </Settings>
+</ProjectConfiguration>

+ 4 - 2
.ncrunch/Avalonia.Direct2D1.RenderTests.v3.ncrunchproject

@@ -1,7 +1,9 @@
 <ProjectConfiguration>
   <Settings>
-    <DefaultTestTimeout>1000</DefaultTestTimeout>
-    <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
+    <AdditionalFilesToIncludeForProject>
+      <Value>..\TestFiles\Direct2D1\**.*</Value>
+    </AdditionalFilesToIncludeForProject>
+    <DefaultTestTimeout>3000</DefaultTestTimeout>
     <PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully>
   </Settings>
 </ProjectConfiguration>

+ 4 - 2
.ncrunch/Avalonia.Skia.RenderTests.v3.ncrunchproject

@@ -1,7 +1,9 @@
 <ProjectConfiguration>
   <Settings>
-    <DefaultTestTimeout>1000</DefaultTestTimeout>
-    <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
+    <AdditionalFilesToIncludeForProject>
+      <Value>..\TestFiles\Skia\**.*</Value>
+    </AdditionalFilesToIncludeForProject>
+    <DefaultTestTimeout>3000</DefaultTestTimeout>
     <PreviouslyBuiltSuccessfully>True</PreviouslyBuiltSuccessfully>
   </Settings>
 </ProjectConfiguration>

+ 5 - 0
.ncrunch/RemoteTest.v3.ncrunchproject

@@ -0,0 +1,5 @@
+<ProjectConfiguration>
+  <Settings>
+    <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
+  </Settings>
+</ProjectConfiguration>

+ 2 - 3
.travis.yml

@@ -1,7 +1,6 @@
 language: csharp
 os:
   - linux
-  - osx
 dist: trusty
 osx_image: xcode8.3
 env:
@@ -9,10 +8,10 @@ env:
     - DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
     - DOTNET_CLI_TELEMETRY_OPTOUT=1
 mono:
-  - latest
+  - 5.2.0
 dotnet: 2.0.0
 script:
-  - ./build.sh --target "Travis" --platform "Mono" --configuration "Release"
+  - ./build.sh --target "Travis" --platform "NetCoreOnly" --configuration "Release"
 notifications:
   email: false
   webhooks:

File diff suppressed because it is too large
+ 148 - 144
Avalonia.sln


+ 1 - 9
appveyor.yml

@@ -1,14 +1,10 @@
 os: Visual Studio 2017
-platform:
-- Any CPU
 skip_branch_with_pr: true
 configuration:
 - Release
 environment:
   DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
   DOTNET_CLI_TELEMETRY_OPTOUT: 1
-  NUGET_API_KEY:
-    secure: Xv89dlP2MSBZKhl1nrWSxqcDgCXB0HRhOd4SWQ+jRJ7QoLxQel5mLTipXM++J3G5
   NUGET_API_URL: https://www.nuget.org/api/v2/package
   MYGET_API_KEY:
     secure: OtVfyN3ErqQrDTnWH2HDfJDlCiu/i4/X4wFmK3ZXXP7HmCiXYPSbTjMPwwdOxRaK
@@ -22,11 +18,7 @@ install:
 before_build:
 - git submodule update --init
 build_script:
-- ps: .\build.ps1 -Target "AppVeyor" -Platform "$env:platform" -Configuration "$env:configuration"
-after_build:
-- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
-- pip install codecov
-- codecov -f "./artifacts/coverage.xml"
+- ps: .\build.ps1 -Target "AppVeyor" -Configuration "$env:configuration"
 
 test: off
 artifacts:

+ 39 - 52
build.cake

@@ -93,7 +93,7 @@ Task("Clean")
     CleanDirectory(parameters.NugetRoot);
     CleanDirectory(parameters.ZipRoot);
     CleanDirectory(parameters.BinRoot);
-    CleanDirectory(parameters.TestsRoot);
+    CleanDirectory(parameters.DesignerTestsRoot);
 });
 
 Task("Restore-NuGet-Packages")
@@ -124,13 +124,17 @@ Task("Restore-NuGet-Packages")
 
 void DotNetCoreBuild()
 {
-    DotNetCoreRestore("samples\\ControlCatalog.NetCore");
-    DotNetBuild("samples\\ControlCatalog.NetCore");
-}
+    var settings = new DotNetCoreBuildSettings 
+    {
+        Configuration = parameters.Configuration,
+        MSBuildSettings = new DotNetCoreMSBuildSettings(),
+    };
 
-Task("DotNetCoreBuild")
-    .IsDependentOn("Clean")
-    .Does(() => DotNetCoreBuild());
+    settings.MSBuildSettings.SetConfiguration(parameters.Configuration);
+    settings.MSBuildSettings.WithProperty("Platform", "\"" + parameters.Platform + "\"");
+
+    DotNetCoreBuild(parameters.MSBuildSolution, settings);
+}
 
 Task("Build")
     .IsDependentOn("Restore-NuGet-Packages")
@@ -140,11 +144,11 @@ Task("Build")
     {
         MSBuild(parameters.MSBuildSolution, settings => {
             settings.SetConfiguration(parameters.Configuration);
+            settings.SetVerbosity(Verbosity.Minimal);
             settings.WithProperty("Platform", "\"" + parameters.Platform + "\"");
             settings.WithProperty("UseRoslynPathHack", "true");
-            settings.SetVerbosity(Verbosity.Minimal);
-            settings.WithProperty("Windows", "True");
             settings.UseToolVersion(MSBuildToolVersion.VS2017);
+            settings.WithProperty("Windows", "True");
             settings.SetNodeReuse(false);
         });
     }
@@ -160,10 +164,7 @@ void RunCoreTest(string project, Parameters parameters, bool coreOnly = false)
     if(!project.EndsWith(".csproj"))
         project = System.IO.Path.Combine(project, System.IO.Path.GetFileName(project)+".csproj");
     Information("Running tests from " + project);
-    DotNetCoreRestore(project);
     var frameworks = new List<string>(){"netcoreapp2.0"};
-    if(parameters.IsRunningOnWindows)
-        frameworks.Add("net461");
     foreach(var fw in frameworks)
     {
         if(!fw.StartsWith("netcoreapp") && coreOnly)
@@ -173,13 +174,18 @@ void RunCoreTest(string project, Parameters parameters, bool coreOnly = false)
         DotNetCoreTest(project,
             new DotNetCoreTestSettings {
                 Configuration = parameters.Configuration,
-                Framework = fw
+                Framework = fw,
+                NoBuild = true,
+                NoRestore = true
             });
     }
 }
 
-Task("Run-Net-Core-Unit-Tests")
-    .IsDependentOn("Clean")
+Task("Run-Unit-Tests")
+    .IsDependentOn("Build")
+    .IsDependentOn("Run-Designer-Unit-Tests")
+    .IsDependentOn("Run-Render-Tests")
+    .WithCriteria(() => !parameters.SkipTests)
     .Does(() => {
         RunCoreTest("./tests/Avalonia.Base.UnitTests", parameters, false);
         RunCoreTest("./tests/Avalonia.Controls.UnitTests", parameters, false);
@@ -190,27 +196,25 @@ Task("Run-Net-Core-Unit-Tests")
         RunCoreTest("./tests/Avalonia.Markup.Xaml.UnitTests", parameters, false);
         RunCoreTest("./tests/Avalonia.Styling.UnitTests", parameters, false);
         RunCoreTest("./tests/Avalonia.Visuals.UnitTests", parameters, false);
-        if(parameters.IsRunningOnWindows)
-            RunCoreTest("./tests/Avalonia.RenderTests/Avalonia.Skia.RenderTests.csproj", parameters, true);
+        if (parameters.IsRunningOnWindows)
+        {
+            RunCoreTest("./tests/Avalonia.Direct2D1.UnitTests", parameters, true);
+        }
     });
 
-Task("Run-Unit-Tests")
-    .IsDependentOn("Run-Net-Core-Unit-Tests")
+Task("Run-Render-Tests")
     .IsDependentOn("Build")
-    //.IsDependentOn("Run-Leak-Tests")
-    .WithCriteria(() => !parameters.SkipTests)
+    .WithCriteria(() => !parameters.SkipTests && parameters.IsRunningOnWindows)
+    .Does(() => {
+        RunCoreTest("./tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj", parameters, true);
+        RunCoreTest("./tests/Avalonia.Direct2D1.RenderTests/Avalonia.Direct2D1.RenderTests.csproj", parameters, true);
+    });
+
+Task("Run-Designer-Unit-Tests")
+    .IsDependentOn("Build")
+    .WithCriteria(() => !parameters.SkipTests && parameters.IsRunningOnWindows)
     .Does(() =>
 {
-    if(!parameters.IsRunningOnWindows)
-       return;
-
-    var unitTests = GetDirectories("./tests/Avalonia.*.UnitTests")
-        .Select(dir => System.IO.Path.GetFileName(dir.FullPath))
-        .Where( name => !name.Contains("Skia")) // Run in the Run-Net-Core-Unit-Tests target
-        .Where(name => parameters.IsRunningOnWindows ? true : !name.Contains("Direct2D"))
-        .Select(name => MakeAbsolute(File("./tests/" + name + "/bin/" + parameters.DirSuffix + "/" + name + ".dll")))
-        .ToList();
-
     var toolPath = (parameters.IsPlatformAnyCPU || parameters.IsPlatformX86) ? 
         Context.Tools.Resolve("xunit.console.x86.exe") :
         Context.Tools.Resolve("xunit.console.exe");
@@ -219,27 +223,10 @@ Task("Run-Unit-Tests")
     { 
         ToolPath = toolPath,
         Parallelism = ParallelismOption.None,
-        ShadowCopy = false
+        ShadowCopy = false,
     };
 
-    xUnitSettings.NoAppDomain = !parameters.IsRunningOnWindows;
-
-    foreach(var test in unitTests.Where(testFile => FileExists(testFile)))
-    {
-        CopyDirectory(test.GetDirectory(), parameters.TestsRoot);
-    }
-
-    var testsInDirectoryToRun = new List<FilePath>();
-    if(parameters.IsRunningOnWindows)
-    {
-        testsInDirectoryToRun.AddRange(GetFiles("./artifacts/tests/*Tests.dll"));
-    }
-    else
-    {
-        testsInDirectoryToRun.AddRange(GetFiles("./artifacts/tests/*.UnitTests.dll"));
-    }
-
-    XUnit2(testsInDirectoryToRun, xUnitSettings);
+    XUnit2("./artifacts/designer-tests/Avalonia.DesignerSupport.Tests.dll", xUnitSettings);
 });
 
 Task("Copy-Files")
@@ -427,7 +414,7 @@ Task("Default").Does(() =>
     if(parameters.IsRunningOnWindows)
         RunTarget("Package");
     else
-        RunTarget("Run-Net-Core-Unit-Tests");
+        RunTarget("Run-Unit-Tests");
 });
 Task("AppVeyor")
   .IsDependentOn("Zip-Files")
@@ -435,7 +422,7 @@ Task("AppVeyor")
   .IsDependentOn("Publish-NuGet");
 
 Task("Travis")
-  .IsDependentOn("Run-Net-Core-Unit-Tests");
+  .IsDependentOn("Run-Unit-Tests");
 
 ///////////////////////////////////////////////////////////////////////////////
 // EXECUTE

+ 1 - 1
build.ps1

@@ -46,7 +46,7 @@ http://cakebuild.net
 Param(
     [string]$Script = "build.cake",
     [string]$Target = "Default",
-    [ValidateSet("Any CPU", "x86", "x64", "Mono", "iPhone")]
+    [ValidateSet("Any CPU", "x86", "x64", "NetCoreOnly", "iPhone")]
     [string]$Platform = "Any CPU",
     [ValidateSet("Release", "Debug")]
     [string]$Configuration = "Release",

+ 1 - 1
build/JetBrains.dotMemoryUnit.props

@@ -1,5 +1,5 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <PackageReference Include="JetBrains.dotMemoryUnit" Version="2.1.20150828.125449" />
+    <PackageReference Include="JetBrains.dotMemoryUnit" Version="3.0.20171219.105559" />
   </ItemGroup>
 </Project>

+ 1 - 1
build/MonoMac.props

@@ -1,5 +1,5 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <PackageReference Include="MonoMac.NetStandard" Version="0.0.3" />
+    <PackageReference Include="MonoMac.NetStandard" Version="0.0.4" />
   </ItemGroup>
 </Project>

+ 0 - 2
build/NetCore.props

@@ -1,6 +1,4 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <PackageReference Include="System.Threading.ThreadPool" Version="4.3.0" />
-    <PackageReference Include="Microsoft.Extensions.DependencyModel" Version="1.1.0" />
   </ItemGroup>
 </Project>

+ 0 - 1
build/Rx.props

@@ -5,6 +5,5 @@
     <PackageReference Include="System.Reactive.Interfaces" Version="3.1.1" />
     <PackageReference Include="System.Reactive.Linq" Version="3.1.1" />
     <PackageReference Include="System.Reactive.PlatformServices" Version="3.1.1" />
-    <PackageReference Condition="$(TargetFramework.StartsWith('net4'))" Include="System.Reactive.Windows.Threading" Version="3.1.1" />
   </ItemGroup>
 </Project>

+ 3 - 1
build/Serilog.props

@@ -1,5 +1,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-     <PackageReference Include="Serilog" Version="2.4.0" />
+    <PackageReference Include="Serilog" Version="2.5.0" />
+    <PackageReference Include="Serilog.Sinks.Trace" Version="2.1.0" />
+    <PackageReference Include="Serilog.Sinks.Debug" Version="1.0.0" />
   </ItemGroup>
 </Project>

+ 0 - 5
build/Splat.props

@@ -1,5 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-     <PackageReference Include="Splat" Version="2.0.0" />
-  </ItemGroup>
-</Project>

+ 1 - 1
build/Serilog.Sinks.Trace.props → build/System.Drawing.Common.props

@@ -1,5 +1,5 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-     <PackageReference Include="Serilog.Sinks.Trace" Version="2.1.0" />
+    <PackageReference Include="System.Drawing.Common" Version="4.5.0-preview1-25914-04" />
   </ItemGroup>
 </Project>

+ 8 - 8
build/XUnit.props

@@ -1,14 +1,14 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <PackageReference Include="xunit" Version="2.3.0-beta5-build3769" />
+    <PackageReference Include="xunit" Version="2.3.0" />
     <PackageReference Include="xunit.abstractions" Version="2.0.1" />
-    <PackageReference Include="xunit.assert" Version="2.3.0-beta5-build3769" />
-    <PackageReference Include="xunit.core" Version="2.3.0-beta5-build3769" />
-    <PackageReference Include="xunit.extensibility.core" Version="2.3.0-beta5-build3769" />
-    <PackageReference Include="xunit.extensibility.execution" Version="2.3.0-beta5-build3769" />
-    <PackageReference Include="xunit.runner.console" Version="2.3.0-beta5-build3769" />
-    <PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta5-build3769" />
-    <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta5-build3769" />
+    <PackageReference Include="xunit.assert" Version="2.3.0" />
+    <PackageReference Include="xunit.core" Version="2.3.0" />
+    <PackageReference Include="xunit.extensibility.core" Version="2.3.0" />
+    <PackageReference Include="xunit.extensibility.execution" Version="2.3.0" />
+    <PackageReference Include="xunit.runner.console" Version="2.3.0" />
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
+    <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
     <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />

+ 0 - 3
docs/.gitignore

@@ -1,3 +0,0 @@
-#docfx
-_site
-api

+ 0 - 21
docs/README.md

@@ -1,21 +0,0 @@
-# Avalonia Documentation
-
-* [API Reference](http://avalonia.github.io/)
-
-## Building
-
-Download and unzip `docfx.zip` into `Documentation` folder from [DocFX project site](https://github.com/dotnet/docfx/releases).
-
-**Step 1.** To create `_site` documentation folder run build script
-
-```
-build.cmd
-```
-
-**Step 2.** To browse `_site` documentation folder run serve script
-
-```
-serve.cmd
-```
-
-And you can view the generated website in your browser `http://localhost:8080`.

+ 0 - 3
docs/build.cmd

@@ -1,3 +0,0 @@
-@echo off
-docfx metadata
-docfx build

+ 0 - 55
docs/docfx.json

@@ -1,55 +0,0 @@
-{
-  "metadata": [
-    {
-      "src": [
-        {
-          "files": [
-            "/src/Gtk/Avalonia.Cairo/Avalonia.Cairo.csproj",
-            "/src/Gtk/Avalonia.Gtk/Avalonia.Gtk.csproj",
-            "/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj",
-            "/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj",
-            "/src/Avalonia.Animation/Avalonia.Animation.csproj",
-            "/src/Avalonia.Application/Avalonia.Application.csproj",
-            "/src/Avalonia.Base/Avalonia.Base.csproj",
-            "/src/Avalonia.Controls/Avalonia.Controls.csproj",
-            "/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj",
-            "/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj",
-            "/src/Avalonia.Input/Avalonia.Input.csproj",
-            "/src/Avalonia.Interactivity/Avalonia.Interactivity.csproj",
-            "/src/Avalonia.Layout/Avalonia.Layout.csproj",
-            "/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj",
-            "/src/Avalonia.Visuals/Avalonia.Visuals.csproj",
-            "/src/Avalonia.Styling/Avalonia.Styling.csproj",
-            "/src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj",
-            "/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj",
-            "/src/Windows/Avalonia.Designer/Avalonia.Designer.csproj",
-            "/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj",
-            "/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj",
-          ],
-          "exclude": [ "**/bin/**", "**/obj/**" ], 
-          "cwd": ".."
-        }
-      ],
-      "dest": "api"
-    },
-  ],
-  "build": {
-    "content":
-      [
-        {
-          "files": ["**/*.yml", "index.md", "tutorial/*.md", "guidelines/*.md", "spec/*.md"],
-        }
-      ],
-    "resource": [
-        {
-          "files": ["images/**", "tutorial/images/**", "guidelines/images/**", "spec/images/**"]
-        }
-    ],
-    "overwrite": "apidoc/*.md",
-    "globalMetadata": {
-      "_appTitle": "Avalonia Website"
-    },
-    "dest": "_site",
-    "template": [ "default", "template"]
-  }
-}

+ 0 - 43
docs/guidelines/build.md

@@ -1,43 +0,0 @@
-# Building Avalonia
-
-## Windows
-
-Avalonia requires at least Visual Studio 2017 and .NET Core SDK 2.0 to build on Windows.
-
-### Clone the Avalonia repository
-
-```
-git clone https://github.com/AvaloniaUI/Avalonia.git
-git submodule update --init
-```
-
-### Open in Visual Studio
-
-Open the `Avalonia.sln` solution in Visual Studio 2015 or newer. The free Visual Studio Community
-edition works fine. Run the `Samples\ControlCatalog.Desktop` project to see the sample application.
-
-## Linux/OSX
-
-It's *not* possible to build the *whole* project on Linux/OSX. You can only build the subset targeting .NET Standard and .NET Core (which is, however, sufficient to get UI working on Linux/OSX). If you want to something that involves changing platform-specific APIs you'll need a Windows machine.
-
-MonoDevelop, Xamarin Studio and Visual Studio for Mac aren't capable of properly opening our solution. You can use Rider (at least 2017.2 EAP) or VSCode instead. They will fail to load most of platform specific projects, but you don't need them to run on .NET Core.
-
-### Install the latest version of .NET Core
-
-Go to https://www.microsoft.com/net/core and follow instructions for your OS. You need SDK (not just "runtime") package.
-
-### Clone the Avalonia repository
-
-```
-git clone https://github.com/AvaloniaUI/Avalonia.git
-git submodule update --init --recursive
-```
-
-### Build and Run Avalonia
-
-```
-samples/ControlCatalog.NetCore
-dotnet restore
-dotnet run
-```
-

+ 0 - 60
docs/guidelines/contributing.md

@@ -1,60 +0,0 @@
-# Contributing #
-
-## Before You Start ##
-
-Drop into our [gitter chat room](https://gitter.im/Avalonia/Avalonia) and let us know what you're thinking of doing. We might be able to give you guidance or let you know if someone else is already working on the feature.
-
-## Style ##
-
-The codebase uses [.net core](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md) coding style. 
-
-Try to keep lines of code around 100 characters in length or less, though this is not a hard limit.
-If you're a few characters over then don't worry too much. 
-
-**DO NOT USE #REGIONS** full stop.
-
-## Pull requests ##
-
-A single pull request should be submitted for each change. If you're making more than one change,
-please submit separate pull requests for each change for easy review. Rebase your changes to make 
-sense, so a history that looks like:
-
-* Add class A
-* Feature A didn't set Foo when Bar was set
-* Fix spacing
-* Add class B
-* Sort using statements
-
-Should be rebased to read:
-
-* Add class A
-* Add class B
-
-Again, this makes review much easier.
-
-Please try not to submit pull requests that don't add new features (e.g. moving stuff around) 
-unless you see something that is obviously wrong or that could be written in a more terse or 
-idiomatic style. It takes time to review each pull request - time that I'd prefer to spend writing 
-new features!
-
-Prefer terseness to verbosity but don't try to be too clever.
-
-## Tests ##
-
-There are two types of tests currently in the codebase; unit tests and render tests.
-
-Unit tests should be contained in a class name that mirrors the class being tested with the suffix
--Tests, e.g.
-
-    Avalonia.Controls.UnitTests.Presenters.TextPresenterTests
-
-Where Avalonia.Controls.UnitTests is the name of the project.
-
-Unit test methods should be named in a sentence style, separated by underscores, that describes in
-English what the test is testing, e.g.
-
-    void Calling_Foo_Should_Increment_Bar()
-
-Render tests should describe what the produced image is:
-
-    void Rectangle_2px_Stroke_Filled()

+ 0 - 4
docs/guidelines/toc.yml

@@ -1,4 +0,0 @@
-- name: Building Avalonia 
-  href: build.md
-- name: Contributing
-  href: contributing.md

BIN
docs/images/avalonia-video.png


BIN
docs/images/cross-platform.png


BIN
docs/images/hello-world-xaml.png


BIN
docs/images/inspection-support.png


BIN
docs/images/screen.png


+ 0 - 37
docs/index.md

@@ -1,37 +0,0 @@
-# The Avalonia UI Framework
-
-Cross platform .NET UI Framework with bindings and XAML
-
-## Current status
-
-We're pleased to announce that Avalonia is now in alpha!
-
-What does alpha mean? Well, it means that it's now at a stage where you can have a play and hopefully create simple applications. There's now a Visual Studio Extension containing project and item templates that will help you get started, and there's an initial complement of controls. There's still a lot missing, and you will find bugs, and the API will change, but this represents the first time where we've made it somewhat easy to have a play and experiment with the framework.
-
-## How do I try it out
-
-The easiest way to try out Avalonia is to install the [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio).
-
-This will add a Avalonia project template and a Window template to the standard Visual Studo "Add" dialog (yes, icons still to come :) ):
-
-![](images/add-dialogs.png)
-
-Creating a Avalonia Project will give you a simple project with a single XAML window. We even have a simple designer:
-
-![](images/hello-world-xaml.png)
-
-You can also find the project [on GitHub](https://github.com/AvaloniaUI/Avalonia/)
-
-## News
-
-You can read news about Avalonia on [Groky's blog](http://grokys.github.io/)
-
-## Cross Platform
-
-Fow now we can run on Windows, Linux and Mac.
-
-![](images/cross-platform.png)
-
-## Inspection support
-
-![](images/inspection-support.png)

+ 0 - 225
docs/intro.md

@@ -1,225 +0,0 @@
-# Avalonia #
-
-...a next generation WPF?
-
-## Background ##
-
-As everyone who's involved in client-side .NET development knows, the past half decade have been a 
-very sad time. Where WPF started off as a game-changer, it now seems to have been all but forgotten.
-WinRT came along and took many of the lessons of WPF but it's currently not usable on the desktop.
-
-After a few months of trying to reverse-engineer WPF with the [Avalonia Project](https://github.com/grokys/Avalonia) I began to come to the same conclusion that I imagine Microsoft
-came to internally: for all its groundbreaking-ness at the time, WPF at its core is a dated mess,
-written for .NET 1 and barely updated to even bring it up-to-date with .NET 2 features such as
-generics.
-
-So I began to think: what if we were to start anew with modern C# features such as *(gasp)* 
-Generics, Observables, async, etc etc. The result of that thought is Avalonia 
-(https://github.com/grokys/Avalonia).
-
-##### DISCLAIMER
-This is really **early development pre-alpha-alpha** stuff. Everything is subject to 
-change, I'm not even sure if the performance characteristics of Rx make Observables suitable for 
-binding throughout a framework. *I'm writing this only to see if the idea of exploring these ideas 
-appeals to anyone else.*
-
-So what can it do so far? Not a whole lot right now. Here's the demo application:
-
-![](screen.png)
-
-## AvaloniaProperty ##
-
-AvaloniaProperty is the equivalent of WPF's DependencyProperty. 
-
-I'm not a big fan of DependencyProperty. My first thought was that I'd rather not have something 
-like this at all and just use basic INPC but DPs give you two important features: Inheritance and 
-Attached Properties. So the challenge became to improve it.
-
-Declaring a DependencyProperty in WPF looks something like this:
-
-```csharp
-public static readonly DependencyProperty PropertyDeclaration =
-DependencyProperty.Register(
-    "PropertyName",
-    typeof(PropertyType),
-    typeof(OwnerClass),
-    new FrameworkPropertyMetadata(
-        default(PropertyType),
-        FrameworkPropertyMetadataOptions.Inherits));
-
-public PropertyType PropertyName
-{
-    get { return (PropertyType)this.GetValue(PropertyDeclaration); }
-    set { this.SetValue(PropertyDeclaration, value); }
-}
-```
-
-Eww! All that just to declare a single property. There's **A LOT** of boilerplate there. With 
-generics and default parameters we can at least make it look a bit nicer:
-
-```csharp
-public static readonly AvaloniaProperty<PropertyType> PropertyDeclaration =
-AvaloniaProperty.Register<OwnerClass, PropertyType>("PropertyName", inherits: true);
-
-public PropertyType PropertyName
-{
-    get { return this.GetValue(PropertyDeclaration); }
-    set { this.SetValue(PropertyDeclaration, value); }
-}
-```
-
-What can we see here?
-
-- AvaloniaProperties are typed, so no more having to cast in the getter.
-- We pass the property type and owner class as a generic type to `Register()` so we don't have to 
-write `typeof()` twice.
-- We used default parameter values in `Register()` so that defaults don't have to be restated.
-
-*(ASIDE: maybe Roslyn will give us [var for fields](http://blogs.msdn.com/b/ericlippert/archive/2009/01/26/why-no-var-on-fields.aspx)...)? Lets hope...*
-
-## Binding
-
-Binding in Avalonia uses Reactive Extensions' [IObservable](http://msdn.microsoft.com/library/dd990377.aspx). To bind an IObservable to a property, use the `Bind()` method:
-
-```csharp
-control.Bind(BorderProperty, someObject.SomeObservable());
-```
-
-Note that because AvaloniaProperty is typed, we can check that the observable is of the correct type.
-
-To get the value of a property as an observable, call `GetObservable()`:
-
-```csharp
-var observable = control.GetObservable(Control.FooProperty);
-```
-
-## Attached Properties and Binding Pt 2
-
-Attached properties are set just like in WPF, using `SetValue()`. But what about the `[]` operator, also called [index initializer](https://roslyn.codeplex.com/wikipage?title=Language%20Feature%20Status&referringTitle=Home) (see *C# feature descriptions*)? The upcoming version of C# will provide a new feature that allows us to use `[]` array subscripts in object initializers. An example on how to make use of it will look like this:
-
-```csharp
-var control = new Control
-{
-    Property1 = "Foo",
-    [Attached.Property] = "Bar",
-}
-```
-
-
-Nice... Lets take this further:
-
-```csharp
-var control = new Control
-{
-    Property1 = "Foo",
-    [Attached.Property] = "Bar",
-    [!Property2] = something.SomeObservable,
-}
-```
-
-Yep, by putting a bang in front of the property name you can **bind** to a property (attached or 
-otherwise) from the object initializer.
-
-Binding to a property on another control? Easy:
-
-```csharp
-var control = new Control
-{
-    Property1 = "Foo",
-    [Attached.Property] = "Bar",
-    [!Property2] = anotherControl[!Property1],
-}
-```
-
-Two way binding? Just add two bangs:
-
-```csharp
-var control = new Control
-{
-    Property1 = "Foo",
-    [Attached.Property] = "Bar",
-    [!!Property2] = anotherControl[!!Property1],
-}
-```
-
-## Visual and Logical trees
-
-Avalonia uses the same visual/logical tree separation that is used by WPF (and to some extent HTML 
-is moving in this direction with the Shadow DOM). The manner of accessing the two trees is slightly
-different however. Rather than using Visual/LogicalTreeHelper you can cast any control to an 
-`IVisual` or `ILogical` to reveal the tree operations. There's also the VisualExtensions class which
-provides some useful extension methods such as `GetVisualAncestor<T>(this IVisual visual)` or 
-`GetVisualAt(this IVisual visual, Point p)`.
-
-Again like WPF, Controls are lookless with the visual appearance being defined by the Template 
-property, which is determined by...
-
-## Styles
-
-Styles in Avalonia diverge from styles in WPF quite a lot, and move towards a more CSS-like system.
-It's probably easiest to show in an example. Here is the default style for the CheckBox control:
-
-```csharp
-new Style(x => x.OfType<CheckBox>())
-{
-	Setters = new[]
-	{
-	    new Setter(Button.TemplateProperty, ControlTemplate.Create<CheckBox>(this.Template))
-	}
-};
-
-new Style(x => x.OfType<CheckBox>().Template().Id("checkMark"))
-{
-	Setters = new[]
-	{
-	    new Setter(Shape.IsVisibleProperty, false)
-	}
-};
-	
-new Style(x => x.OfType<CheckBox>().Class(":checked").Template().Id("checkMark"))
-{
-	Setters = new[]
-	{
-	    new Setter(Shape.IsVisibleProperty, true)
-	}
-};
-```
-
-Let's see what's happening here:
-
-```csharp
-new Style(x => x.OfType<CheckBox>())
-```
-
-The constructor for the Style class defines the selector. Here we're saying "*this style applies to 
-all controls in the the visual tree of type CheckBox*". A more complex selector:
-
-```csharp
-new Style(x => x.OfType<CheckBox>().Class(":checked").Template().Id("checkMark"))
-```
-
-This selector matches *"all controls with Id == "checkMark" in the template of a CheckBox with the
-class `:checked`"*. Each control has an Id property, and Ids in templates are considered to be in a
-separate namespace.
-
-Inside the Style class we then have a collection of setters similar to WPF. 
-
-This system means that there's no more need for WPF's Triggers - the styling works with classes 
-(which are arbitrary strings) similar to CSS. Similar to CSS, classes with a leading `:` are set
-by the control itself in response to events like `mouseover` and `click`.
-
-Similar to WPF, styles can be defined on each control, with a global application style collection
-at the root. This means that different subsections of the visual tree can have a completely 
-different look-and-feel.
-
-## XAML
-
-As you can see, all of the examples here are defined in code - but a XAML implementation is being
-worked on. The current progress can be reviewed at [https://github.com/SuperJMN/Avalonia](https://github.com/SuperJMN/Avalonia).
-
-## That's all for now
-
-There's a lot more to see, and even more to do, so if you want to have a play you can get the code 
-here: [https://github.com/grokys/Avalonia](https://github.com/grokys/Avalonia)
-
-Feedback is always welcome!

+ 0 - 2
docs/serve.cmd

@@ -1,2 +0,0 @@
-@echo off
-docfx serve _site

+ 0 - 101
docs/spec/architecture.md

@@ -1,101 +0,0 @@
-# Avalonia Architecture
-
-At the highest level, avalonia is split up into a "core" and two "subsystems".
-
-* The core is a set of Portable Class Libraries that can run anywhere.
-* The Windowing subsystem is responsible for creating windows, handling input and scheduling timers.
-* The Rendering subsystem is responsible for drawing.
-
-There are currently two Windowing and two Rendering subsystems:
-
-## Windowing Subsystems
-
-* Avalonia.Win32 uses the Win32 API (this also works on 64-bit windows).
-* Avalonia.Gtk uses the GTK2 toolkit and can be run on both Windows and *nix.
-
-## Rendering Subsystems
-
-* Avalonia.Direct2D1 uses Microsoft's Direct2D1 API.
-* Avalonia.Cairo uses Cairo for rendering and Pango for text layout.
-
-## Core
-
-The Avalonia core is split up into several assemblies. Note that they're not separated like this 
-because you will want to use them separately; they are separate to maintain separation of concerns 
-and a layered architecture. It is fully possible that they will be ILMerged into a single assembly 
-for distribution.
-
-The assemblies are as follows, from lowest to highest level:
-
-### Avalonia.Base
-
-The main classes in this assembly are `AvaloniaObject` and `AvaloniaProperty`.
-
-These are Avalonia's versions of XAML's `DependencyObject` and `DependencyProperty`. It also 
-defines a `AvaloniaDispatcher` which is - surprise - our version of XAML's `Dispatcher`.
-
-### Avalonia.Animation
-
-The main class in the assembly is `Animatable`.
-
-Allows AvaloniaProperties to be animated and provides various utilities related to animation.
-
-### Avalonia.Visuals
-
-The main class in this assembly is `Visual` and its interface `IVisual`.
-
-Defines the "Visual" layer which is a 2D scene graph, with each node being a `IVisual`/`Visual`. 
-Also defines primitives such as `Point`/`Rect`/`Matrix`, plus `Geometry`, `Bitmap`, `Brush` and 
-whatever else you might need in order to draw to the screen.
-
-### Avalonia.Styling
-
-The main interface in this assembly is `IStyleable`.
-
-Defines a CSS-like system for styling controls.
-
-### Avalonia.Layout
-
-The main class in this assembly is `Layoutable`.
-
-Defines a XAML-like layout system using `Measure` and `Arrange`. Also defines `LayoutManager` which 
-carries out the actual layout.
-
-### Avalonia.Interactivity
-
-The main class in this assembly is `Interactive`.
-
-Defines a system of routed events similar to those found in XAML.
-
-### Avalonia.Input
-
-The main class in this assembly is `InputElement`.
-
-Handles input from various devices such as `MouseDevice` and `KeyboardDevice`, together with
-`FocusManager` for tracking input focus. Input is sent from the windowing subsystem to 
-`InputManager` in the form of "Raw" events which are then translated into routed events for the 
-controls.
-
-### Avalonia.Controls
-
-There are many important classes in this assembly, but the root of them is `Control`.
-
-Finally defines the actual controls. The `Control` class is analogous to WPF's `FrameworkElement`
-whereas the `TemplatedControl` class is our version of WPF's `Control`. This is also where you'll 
-find all of the basic controls you'd expect.
-
-### Avalonia.Themes.Default
-
-Defines a default theme using a set of styles and control templates.
-
-### Avalonia.Application
-
-The main class in this assembly is `Application`.
-
-This ties everything together, setting up the service locator, defining the default theme etc.
-
-### Avalonia.Diagnostics
-
-Adds utilities for debugging avalonia applications, such as `DevTools` which provides a Snoop/WPF
-Inspector/Browser DevTools window for inspecting the state of the application.
-

+ 0 - 156
docs/spec/binding-from-code.md

@@ -1,156 +0,0 @@
-# Binding from Code
-
-Avalonia binding from code works somewhat differently to WPF/UWP. At the low level, Avalonia's
-binding system is based on Reactive Extensions' `IObservable` which is then built upon by XAML
-bindings (which can also be instantiated in code).
-
-## Binding to an observable
-
-You can bind a property to an observable using the `AvaloniaObject.Bind` method:
-
-```csharp
-// We use an Rx Subject here so we can push new values using OnNext
-var source = new Subject<string>();
-var textBlock = new TextBlock();
-
-// Bind TextBlock.Text to source
-textBlock.Bind(TextBlock.TextProperty, source);
-
-// Set textBlock.Text to "hello"
-source.OnNext("hello");
-// Set textBlock.Text to "world!"
-source.OnNext("world!");
-```
-
-## Binding priorities
-
-You can also pass a priority to a binding. *Note: Priorities only apply to styled properties: they*
-*are ignored for direct properties.*
-
-The priority is passed using the `BindingPriority` enum, which looks like this:
-
-```csharp
-/// <summary>
-/// The priority of a binding.
-/// </summary>
-public enum BindingPriority
-{
-    /// <summary>
-    /// A value that comes from an animation.
-    /// </summary>
-    Animation = -1,
-
-    /// <summary>
-    /// A local value: this is the default.
-    /// </summary>
-    LocalValue = 0,
-
-    /// <summary>
-    /// A triggered style binding.
-    /// </summary>
-    /// <remarks>
-    /// A style trigger is a selector such as .class which overrides a
-    /// <see cref="TemplatedParent"/> binding. In this way, a basic control can have
-    /// for example a Background from the templated parent which changes when the
-    /// control has the :pointerover class.
-    /// </remarks>
-    StyleTrigger,
-
-    /// <summary>
-    /// A binding to a property on the templated parent.
-    /// </summary>
-    TemplatedParent,
-
-    /// <summary>
-    /// A style binding.
-    /// </summary>
-    Style,
-
-    /// <summary>
-    /// The binding is uninitialized.
-    /// </summary>
-    Unset = int.MaxValue,
-}
-```
-
-Bindings with a priority with a smaller number take precedence over bindings with a higher value
-priority, and bindings added more recently take precedence over other bindings with the same
-priority. Whenever the binding produces `AvaloniaProperty.UnsetValue` then the next binding in the
-priority order is selected.
-
-## Setting a binding in an object initializer
-
-It is often useful to set up bindings in object initializers. You can do this using the indexer:
-
-```csharp
-var source = new Subject<string>();
-var textBlock = new TextBlock
-{
-    Foreground = Brushes.Red,
-    MaxWidth = 200,
-    [!TextBlock.TextProperty] = source.ToBinding(),
-};
-```
-
-Using this method you can also easily bind a property on one control to a property on another:
-
-```csharp
-var textBlock1 = new TextBlock();
-var textBlock2 = new TextBlock
-{
-    Foreground = Brushes.Red,
-    MaxWidth = 200,
-    [!TextBlock.TextProperty] = textBlock1[!TextBlock.TextProperty],
-};
-```
-
-Of course the indexer can be used outside object initializers too:
-
-```csharp
-textBlock2[!TextBlock.TextProperty] = textBlock1[!TextBlock.TextProperty];
-```
-
-# Transforming binding values
-
-Because we're working with observables, we can easily transform the values we're binding!
-
-```csharp
-var source = new Subject<string>();
-var textBlock = new TextBlock
-{
-    Foreground = Brushes.Red,
-    MaxWidth = 200,
-    [!TextBlock.TextProperty] = source.Select(x => "Hello " + x).ToBinding(),
-};
-```
-
-# Using XAML bindings from code
-
-Sometimes when you want the additional features that XAML bindings provide, it's easier to use XAML bindings from code. For example, using only observables you could bind to a property on `DataContext` like this:
-
-```csharp
-var textBlock = new TextBlock();
-var viewModelProperty = textBlock.GetObservable(TextBlock.DataContext)
-    .OfType<MyViewModel>()
-    .Select(x => x?.Name);
-textBlock.Bind(TextBlock, viewModelProperty);
-```
-
-However, it might be preferable to use a XAML binding in this case:
-
-```csharp
-var textBlock = new TextBlock
-{
-    [!TextBlock.TextProperty] = new Binding("Name")
-};
-```
-
-By using XAML binding objects, you get access to binding to named controls and [all the other features that XAML bindings bring](binding-from.xaml.md):
-
-```csharp
-var textBlock = new TextBlock
-{
-    [!TextBlock.TextProperty] = new Binding("Text") { ElementName = "other" }
-};
-```
-

+ 0 - 99
docs/spec/binding-from-xaml.md

@@ -1,99 +0,0 @@
-# Binding from XAML
-
-Binding from XAML works on the whole the same as in other XAML frameworks: you use the `{Binding}`
-markup extension. Avalonia does have some extra syntacic niceties however. Here's an overview of
-what you can currently do in Avalonia:
-
-## Binding to a property on the DataContext
-
-By default a binding binds to a property on the `DataContext`, e.g.:
-
-```xml
-<!-- Binds to the tb.DataContext.Name property -->
-<TextBlock Name="tb" Text="{Binding Name}"/>
-<!-- Which is the same as ('Path' is optional) -->
-<TextBlock Name="tb" Text="{Binding Path=Name}"/>
-```
-
-An empty binding binds to DataContext itself
-
-```xml
-<!-- Binds to the tb.DataContext property -->
-<TextBlock Name="tb" Text="{Binding}"/>
-<!-- Which is the same as -->
-<TextBlock Name="tb" Text="{Binding .}"/>
-```
-
-This usage is identical to WPF/UWP etc.
-
-## Two way bindings and more
-
-You can also specify a binding `Mode`:
-
-```xml
-<!-- Bind two-way to the property (although this is actually the default binding mode for
-     TextBox.Text) so strictly speaking it's unnecessary here) -->
-<TextBox Name="tb" Text="{Binding Name, Mode=TwoWay}"/>
-```
-
-This usage is identical to WPF/UWP etc.
-
-## Binding to a property on the templated parent
-
-When you're creating a control template and you want to bind to the templated parent you can use:
-
-```xml
-<TextBlock Name="tb" Text="{TemplateBinding Caption}"/>
-<!-- Which is short for -->
-<TextBlock Name="tb" Text="{Binding Caption, RelativeSource={RelativeSource TemplatedParent}}"/>
-```
-
-This usage is identical to WPF/UWP etc.
-
-## Binding to a named control
-
-If you want to bind to a property on another (named) control, you can use `ElementName` as in
-WPF/UWP:
-
-```xml
-<!-- Binds to the Tag property of a control named "other" -->
-<TextBlock Text="{Binding Tag, ElementName=other}"/>
-```
-
-However Avalonia also introduces a shorthand syntax for this:
-
-```xml
-<TextBlock Text="{Binding #other.Tag}"/>
-```
-
-## Negating bindings
-
-You can also negate the value of a binding using the `!` operator:
-
-```xml
-<TextBox IsEnabled="{Binding !HasErrors}"/>
-```
-
-Here, the `TextBox` will only be enabled when the view model signals that it has no errors. Behind
-the scenes, Avalonia tries to convert the incoming value to a boolean, and if it can be converted
-it negates the value. If the incoming value cannot be converted to a boolean then no value will be
-pushed to the binding target.
-
-This syntax is specific to Avalonia.
-
-## Binding to tasks and observables
-
-You can subscribe to the result of a task or an observable by using the `^` stream binding operator.
-
-```xml
-<!-- If DataContext.Name is an IObservable<string> then this will bind to the length of each
-     string produced by the observable as each value is produced -->
-<TextBlock Text="{Binding Name^.Length}"/>
-```
-
-This syntax is specific to Avalonia.
-
-*Note: the stream operator is actually extensible, see
-[here](https://github.com/AvaloniaUI/Avalonia/blob/master/src/Markup/Avalonia.Markup/Data/Plugins/IStreamPlugin.cs)
-for the interface to implement and [here](https://github.com/AvaloniaUI/Avalonia/blob/master/src/Markup/Avalonia.Markup/Data/ExpressionObserver.cs#L47)
-for the registration.*

+ 0 - 199
docs/spec/defining-properties.md

@@ -1,199 +0,0 @@
-# Defining Properties
-
-If you are creating a control, you will want to define properties on your
-control. The process in Avalonia is broadly similar to other XAML languages
-with a few differences - the main one being that Perpsex's equivalent of
-`DependencyProperty` is called `StyledProperty`.
-
-## Registering Styled Properties
-
-A styled property is analogous to a `DependencyProperty` in other XAML
-frameworks.
-
-You register a styled property by calling `AvaloniaProperty.Register` and
-storing the result in a `static readonly` field. You then create a standard C#
-property to access it.
-
-Here's how the `Border` control defines its `Background` property:
-
-```c#
-    public static readonly StyledProperty<Brush> BackgroundProperty =
-        AvaloniaProperty.Register<Border, Brush>(nameof(Background));
-
-    public Brush Background
-    {
-        get { return GetValue(BackgroundProperty); }
-        set { SetValue(BackgroundProperty, value); }
-    }
-```
-
-The `AvaloniaProperty.Register` method also accepts a number of other parameters:
-
-- `defaultValue`: This gives the property a default value. Be sure to only pass
-value types and immutable types here as passing a reference type will cause the
-same object to be used on all instances on which the property is registered.
-- `inherits`: Specified that the property's default value should come from
-the parent control.
-- `defaultBindingMode`: The default binding mode for the property. Can be set to
-`OneWay`, `TwoWay`, `OneTime` or `OneWayToSource`.
-- `validate`: A validation/coercion function of type
-`Func<TOwner, TValue, TValue>`. The function accepts the instance of the class
-on which the property is being set and the value and returns the coerced value
-or throws an exception for an invalid value.
-
-## Using a StyledProperty on Another Class
-
-Sometimes the property you want to add to your control already exists on another
-control, `Background` being a good example. To register a property defined on
-another control, you call `StyledProperty.AddOwner`:
-
-
-```c#
-    public static readonly StyledProperty<Brush> BackgroundProperty =
-        Border.BackgroundProperty.AddOwner<Panel>();
-
-    public Brush Background
-    {
-        get { return GetValue(BackgroundProperty); }
-        set { SetValue(BackgroundProperty, value); }
-    }
-```
-
-*Note: Unlike WPF, a property must be registered on a class otherwise it cannot
-be set on an object of that class.*
-
-## Attached Properties
-
-Attached properties are defined almost identically to styled properties except
-that they are registered using the `RegisterAttached` method and their accessors
-are defined as static methods.
-
-Here's how `Grid` defines its `Grid.Column` attached property:
-
-```c#
-    public static readonly AttachedProperty<int> ColumnProperty =
-        AvaloniaProperty.RegisterAttached<Grid, Control, int>("Column");
-
-    public static int GetColumn(Control element)
-    {
-        return element.GetValue(ColumnProperty);
-    }
-
-    public static void SetColumn(Control element, int value)
-    {
-        element.SetValue(ColumnProperty, value);
-    }
-```
-
-## Readonly AvaloniaProperties
-
-To create a readonly property you use the `AvaloniaProperty.RegisterDirect`
-method. Here is how `Visual` registers the readonly `Bounds` property:
-
-```c#
-    public static readonly DirectProperty<Visual, Rect> BoundsProperty =
-        AvaloniaProperty.RegisterDirect<Visual, Rect>(
-            nameof(Bounds),
-            o => o.Bounds);
-
-    private Rect _bounds;
-
-    public Rect Bounds
-    {
-        get { return _bounds; }
-        private set { SetAndRaise(BoundsProperty, ref _bounds, value); }
-    }
-```
-
-As can be seen, readonly properties are stored as a field on the object. When
-registering the property, a getter is passed which is used to access the
-property value through `GetValue` and then `SetAndRaise` is used to notify
-listeners to changes to the property.
-
-## Direct AvaloniaProperties
-
-As its name suggests, `RegisterDirect` isn't just used for registering readonly
-properties. You can also pass a *setter* to `RegisterDirect` to expose a
-standard C# property as a Avalonia property.
-
-A `StyledProperty` which is registered using `AvaloniaProperty.Register`
-maintains a prioritized list of values and bindings that allow styles to work.
-However, this is overkill for many properties, such as `ItemsControl.Items` -
-this will never be styled and the overhead involved with styled properties is
-unnecessary.
-
-Here is how `ItemsControl.Items` is registered:
-
-```c#
-    public static readonly DirectProperty<ItemsControl, IEnumerable> ItemsProperty =
-        AvaloniaProperty.RegisterDirect<ItemsControl, IEnumerable>(
-            nameof(Items),
-            o => o.Items,
-            (o, v) => o.Items = v);
-
-    private IEnumerable _items = new AvaloniaList<object>();
-
-    public IEnumerable Items
-    {
-        get { return _items; }
-        set { SetAndRaise(ItemsProperty, ref _items, value); }
-    }
-```
-
-
-Direct properties are a lightweight version of styled properties that support
-the following:
-
-- AvaloniaObject.GetValue
-- AvaloniaObject.SetValue for non-readonly properties
-- PropertyChanged
-- Binding (only with LocalValue priority)
-- GetObservable
-- AddOwner
-- Metadata
-
-They don't support the following:
-
-- Validation/Coercion (although this could be done in the property setter)
-- Overriding default values.
-- Inherited values
-
-## Using a DirectProperty on Another Class
-
-In the same way that you can call `AddOwner` on a styled property, you can also
-add an owner to a direct property. Because direct properties reference fields
-on the control, you must also add a field for the property:
-
-```c#
-    public static readonly DirectProperty<MyControl, IEnumerable> ItemsProperty =
-        ItemsControl.ItemsProperty.AddOwner<MyControl>(
-            o => o.Items,
-            (o, v) => o.Items = v);
-
-    private IEnumerable _items = new AvaloniaList<object>();
-
-    public IEnumerable Items
-    {
-        get { return _items; }
-        set { SetAndRaise(ItemsProperty, ref _items, value); }
-    }
-```
-
-## When to use a Direct vs a Styled Property
-
-Direct properties have advantages and disadvantages:
-
-Pros:
-- No additional object is allocated per-instance for the property
-- Property getter is a standard C# property getter
-- Property setter is is a standard C# property setter that raises an event.
-
-Cons:
-- Cannot inherit value from parent control
-- Cannot take advantage of Avalonia's styling system
-- Property value is a field and as such is allocated whether the property is
-set on the object or not
-
-So use direct properties when you have the following requirements:
-- Property will not need to be styled
-- Property will usually or always have a value

+ 0 - 54
docs/spec/logging.md

@@ -1,54 +0,0 @@
-# Avalonia Logging
-
-Avalonia uses [Serilog](https://github.com/serilog/serilog) for logging via
-the Avalonia.Logging.Serilog assembly.
-
-The following method should be present in your App.xaml.cs file:
-
-```C#
-private void InitializeLogging()
-{
-#if DEBUG
-    SerilogLogger.Initialize(new LoggerConfiguration()
-        .MinimumLevel.Warning()
-        .WriteTo.Trace(outputTemplate: "{Area}: {Message}")
-        .CreateLogger());
-#endif
-}
-```
-
-By default, this logging setup will write log messages with a severity of
-`Warning` or higher to `System.Diagnostics.Trace`. See the [Serilog
-documentation](https://github.com/serilog/serilog/wiki/Configuration-Basics)
-for more information on the options here.
-
-## Areas
-
-Each Avalonia log message has an "Area" that can be used to filter the log to
-include only the type of events that you are interested in. These are currently:
-
-- Property
-- Binding
-- Visual
-- Layout
-- Control
-
-To limit the log output to a specific area you can add a filter; for example
-to enable verbose logging but only about layout:
-
-```C#
-SerilogLogger.Initialize(new LoggerConfiguration()
-    .Filter.ByIncludingOnly(Matching.WithProperty("Area", LogArea.Layout))
-    .MinimumLevel.Verbose()
-    .WriteTo.Trace(outputTemplate: "{Area}: {Message}")
-    .CreateLogger());
-```
-
-## Removing Serilog
-
-If you don't want a dependency on Serilog in your application, simply remove
-the reference to Avalonia.Logging.Serilog and the code that initializes it. If
-you do however still want some kinda of logging, there are two steps:
-
-- Implement `Avalonia.Logging.ILogSink`
-- Assign your implementation to `Logger.Sink`

+ 0 - 111
docs/spec/styles.md

@@ -1,111 +0,0 @@
-# Styling in Avalonia
-
-The main difference between Avalonia and existing XAML toolkits such as WPF and
-UWP is in styling. Styling in Avalonia uses a CSS-like system that aims to be
-more powerful and flexible than existing XAML styling systems. For convenience
-for the rest of this document we'll refer to existing XAML toolkit's styling as
-"WPF styling" as that's where it originated.
-
-## Basics
-
-- Styles are defined on the `Control.Styles` collection (as opposed to in
-`ResourceDictionaries` in WPF).
-- Styles have a `Selector` and a collection of `Setter`s
-- Selector works like a CSS selector.
-- Setters function like WPF's setters.
-- Styles are applied to a control and all its descendants, depending on whether
-  the selector matches.
-
-## Simple example
-
-Make all `Button`s in a `StackPanel` have a blue `Background`:
-
-```xaml
-<StackPanel>
-  <StackPanel.Styles>
-    <Style Selector="Button">
-      <Setter Property="Button.Background" Value="Blue"/>
-    </Style>
-  </StackPanel.Styles>
-  <Button>I will have a blue background.</Button>
-</StackPanel>
-```
-
-This is very similar to WPF, except `TargetType` is replaced by `Selector`.
-
-_Note that currently (as of Alpha 2) you **always** need to specify the fully
-qualified property name (i.e. `Button.Background` instead of simply
-`Background`). This restriction will be lifted in future._
-
-## Style Classes
-
-As in CSS, controls can be given *style classes* which can be used in selectors:
-
-```xaml
-<StackPanel>
-  <StackPanel.Styles>
-    <Style Selector="Button.blue">
-      <Setter Property="Button.Background" Value="Blue"/>
-    </Style>
-  </StackPanel.Styles>
-  <Button Classes="blue">I will have a blue background.</Button>
-  <Button>I will not.</Button>
-</StackPanel>
-```
-
-Each control can be given 0 or more style classes. This is different to WPF
-where only a single style can be applied to a control: in Avalonia any number
-of separate styles can be applied to a control. If more than one style affects
-a particular property, the style closest to the control will take precedence.
-
-Style classes can also be manipulated in code using the `Classes` collection:
-
-```csharp
-control.Classes.Add("blue");
-control.Classes.Remove("red");
-```
-
-## Pseudoclasses
-
-Also as in CSS, controls can have pseudoclasses; these are classes that are
-defined by the control itself rather than by the user. Pseudoclasses start
-with a `:` character.
-
-One example of a pseudoclass is the `:pointerover`
-pseudoclass (`:hover` in CSS - we may change to that in future).
-
-Pseudoclasses provide the functionality of `Triggers` in WPF and
-`VisualStateManager` in UWP:
-
-```xaml
-<StackPanel>
-  <StackPanel.Styles>
-    <Style Selector="Button:pointerover">
-      <Setter Property="Button.Foreground" Value="Red"/>
-    </Style>
-  </StackPanel.Styles>
-  <Button>I will have red text when hovered.</Button>
-</StackPanel>
-```
-
-Other pseudoclasses include `:focus`, `:disabled`, `:pressed` for buttons,
-`:checked` for checkboxes etc.
-
-## Named Controls
-
-Named controls can be selected using `#` as in CSS, e.g. `Button#Name`.
-
-## Children
-
-As with CSS, you can select children and descendants:
-
-- `StackPanel > Button#Foo` selects a `Button` named `"Foo"` that is the child
-  of a `StackPanel`.
-- `StackPanel Button.foo` selects all `Button`s with the `foo` class that are
-  descendants of a `StackPanel`.
-
-## Templates
-
-You can select controls in the template of a lookless control by using the
-`/template/` selector, so `Button /template/ Border#outline` selects `Border`
-controls named `"outline"` in the template of a `Button`.

+ 0 - 14
docs/spec/toc.yml

@@ -1,14 +0,0 @@
-- name: Avalonia Architecture
-  href: architecture.md
-- name: Styling in Avalonia
-  href: styles.md
-- name: Defining Properties
-  href: defining-properties.md
-- name: Working with Properties
-  href: working-with-properties.md
-- name: Logging
-  href: logging.md
-- name: Binding from XAML
-  href: binding-from-xaml.md
-- name: Binding from Code
-  href: binding-from-code.md

+ 0 - 102
docs/spec/working-with-properties.md

@@ -1,102 +0,0 @@
-# Working with Properties
-
-Avalonia controls expose their properties as standard CLR properties, so for
-reading and writing values there's no surprises:
-
-```c#
-    // Create a TextBlock and set its Text property.
-    var textBlock = new TextBlock();
-    textBlock.Text = "Hello World!";
-```
-
-
-However there's a lot more you can do with properties such as subscribing to
-changes on the property, and binding.
-
-# Subscribing to Changes to a Property
-
-You can subscribe to changes on a property by calling the `GetObservable`
-method. This returns an `IObservable<T>` which can be used to listen for changes
-to the property:
-
-```c#
-    var textBlock = new TextBlock();
-    var text = textBlock.GetObservable(TextBlock.TextProperty);
-```
-
-Each property that can be subscribed to has a static readonly field called
-`[PropertyName]Property` which is passed to `GetObservable` in order to
-subscribe to the property's changes.
-
-`IObservable` (part of Reactive Extensions, or rx for short) is out of scope
-for this guide, but here's an example which uses the returned observable to
-print a message with the changing property values to the console:
-
-```c#
-    var textBlock = new TextBlock();
-    var text = textBlock.GetObservable(TextBlock.TextProperty);
-    text.Subscribe(value => Console.WriteLine(value + " Changed"));
-```
-
-When the returned observable is subscribed, it will return the current value
-of the property immediately and then push a new value each time the property
-changes. If you don't want the current value, you can use the rx `Skip`
-operator:
-
-```c#
-    var text = textBlock.GetObservable(TextBlock.TextProperty).Skip(1);
-```
-
-# Binding a property
-
-Observables don't just go one way! You can also use them to bind properties.
-For example here we create two `TextBlock`s and bind the second's `Text`
-property to the first:
-
-```c#
-  var textBlock1 = new TextBlock();
-  var textBlock2 = new TextBlock();
-
-  // Get an observable for the first text block's Text property.
-  var source = textBlock1.GetObservable(TextBlock.TextProperty);
-
-  // And bind it to the second.
-  textBlock2.Bind(TextBlock.TextProperty, source);
-
-  // Changes to the first TextBlock's Text property will now be propagated
-  // to the second.
-  textBlock1.Text = "Goodbye Cruel World";
-
-  // Prints "Goodbye Cruel World"
-  Console.WriteLine(textBlock2.Text);
-```
-
-To read more about creating bindings from code, see [Binding from Code](binding-from-code.md).
-
-# Subscribing to a Property on Any Object
-
-The `GetObservable` method returns an observable that tracks changes to a
-property on a single instance. However, if you're writing a control you may
-want to implement an `OnPropertyChanged` method. In WPF this is done by passing
-a static `PropertyChangedCallback` to the `DependencyProperty` registration
-method, but in Avalonia it's slightly different (and hopefully easier!)
-
-The field which defines the property is derived from `AvaloniaProperty` and this
-has a `Changed` observable which is fired every time the property changes on
-*any* object. In addition there is an `AddClassHandler` extension method which
-can automatically route the event to a method on your control.
-
-For example if you want to listen to changes to your control's `Foo` property
-you'd do it like this:
-
-```c#
-    static MyControl()
-    {
-        FooProperty.Changed.AddClassHandler<MyControl>(x => x.FooChanged);
-    }
-
-    private void FooChanged(AvaloniaPropertyChangedEventArgs e)
-    {
-        // The 'e' parameter describes what's changed.
-    }
-```

+ 0 - 13
docs/template/partials/footer.tmpl.partial

@@ -1,13 +0,0 @@
-{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}
-
-<footer>
-  <div class="grad-bottom"></div>
-  <div class="footer">
-    <div class="container">
-      <span class="pull-right">
-        <a href="#top">Back to top</a>
-      </span>
-      <span>Copyright © 2016 The Avalonia Project<br>Generated by <strong>DocFX</strong></span>
-    </div>
-  </div>
-</footer>

+ 0 - 10
docs/toc.yml

@@ -1,10 +0,0 @@
-- name: Home
-  href: index.md
-- name: Getting Started
-  href: tutorial/
-- name: Guidelines
-  href: guidelines/
-- name: Specifications
-  href: spec/
-- name: API Documentation
-  href: api/

+ 0 - 161
docs/tutorial/from-wpf.md

@@ -1,161 +0,0 @@
-# Avalonia for WPF Developers
-
-Avalonia is in general very similar to WPF, but you will find differences. Here
-are the most common:
-
-## Styling
-
-The most obvious difference from other XAML frameworks is that Avalonia uses a
-[CSS-like styling system](../spec/styles.md). Styles aren't stored in a
-`Resources` collection as in WPF, they are stored in a separate `Styles`
-collection:
-
-    <UserControl>
-        <UserControl.Styles>
-            <!-- Make TextBlocks with the h1 style class have a font size of 24 points -->
-            <Style Selector="TextBlock.h1">
-                <Setter Property="FontSize" Value="24"/>
-            </Style>
-        </UserControl.Styles>
-        <TextBlock Classes="h1">Header</TextBlock>
-    <UserControl>    
-
-## DataTemplates
-
-As styles aren't stored  in `Resources`, neither are `DataTemplates` ([in fact
-there is no `Resources` collection](#resources)). Instead, `DataTemplates` are
-placed in a `DataTemplates` collection on each control (and on `Application`):
-
-    <UserControl xmlns:viewmodels="clr-namespace:MyApp.ViewModels;assembly=MyApp">
-        <UserControl.DataTemplates>
-            <DataTemplate DataType="viewmodels:FooViewModel">
-                <Border Background="Red" CornerRadius="8">
-                    <TextBox Text="{Binding Name}"/>
-                </Border>
-            </DataTemplate>
-        </UserControl.DataTemplates>
-        <!-- Assuming that DataContext.Foo is an object of type
-             MyApp.ViewModels.FooViewModel then a red border with a corner
-             radius of 8 containing a TextBox will be displayed here -->
-        <ContentControl Content="{Binding Foo}"/>
-    <UserControl>    
-
-Data templates in Avalonia can also target interfaces and derived classes (which
-cannot be done in WPF) and so the order of `DataTemplate`s can be important:
-`DataTemplate`s  within the same collection are evaluated in declaration order
-so you need to place them from most-specific to least-specific as you would in
-code.
-
-## HierachicalDataTemplate
-
-WPF's `HierarchicalDataTemplate` is called `TreeDataTemplate` in Avalonia (as the
-former is difficult to type!). The two are almost entirely equivalent except
-that the `ItemTemplate` property is not present in Avalonia.
-
-## UIElement, FrameworkElement and Control
-
-WPF's `UIElement` and `FrameworkElement` are non-templated control base classes,
-which roughly equate to the Avalonia `Control` class. WPF's `Control` class on
-the other hand is a templated control - Avalonia's equivalent of this is
-`TemplatedControl`.
-
-So to recap:
-
-- `UIElement`: `Control`
-- `FrameworkElement`: `Control`
-- `Control`: `TemplatedControl`
-
-## DependencyProperty
-
-The Avalonia equivalent of `DependencyProperty` is `StyledProperty`, however
-Avalonia [has a richer property system than WPF](../spec/defining-properties.md),
-and includes `DirectProperty` for turning standard CLR properties into Avalonia
-properties. The common base class of `StyledProperty` and `DirectProperty`
-is `AvaloniaProperty`.
-
-## Grid
-
-Column and row definitions can be specified in Avalonia using strings, avoiding
-the clunky syntax in WPF:
-
-    <Grid ColumnDefinitions="Auto,*,32" RowDefinitions="*,Auto">
-
-A common use of `Grid` in WPF is to stack two controls on top of each other.
-For this purpose in Avalonia you can just use a `Panel` which is more lightweight
-than `Grid`.
-
-We don't yet support `SharedSizeScope` in `Grid`.
-
-## ItemsControl
-
-In WPF, `ItemsControl` and derived classes such as `ListBox` have two separate
-items properties: `Items` and `ItemsSource`. Avalonia however just has a single
-one: `Items`.
-
-## Tunnelling Events
-
-Avalonia has tunnelling events (unlike UWP!) but they're not exposed via
-separate `Preview` CLR event handlers. To subscribe to a tunnelling event you
-must call `AddHandler` with `RoutingStrategies.Tunnel`:
-
-```
-target.AddHandler(InputElement.KeyDownEvent, OnPreviewKeyDown, RoutingStrategies.Tunnel);
-
-void OnPreviewKeyDown(object sender, KeyEventArgs e)
-{
-    // Handler code
-}
-```
-
-## Class Handlers
-
-In WPF, class handlers for events can be added by calling
-[EventManager.RegisterClassHandler](https://msdn.microsoft.com/en-us/library/ms597875.aspx).
-An example of registering a class handler in WPF might be:
-
-    static MyControl()
-    {
-      EventManager.RegisterClassHandler(typeof(MyControl), MyEvent, HandleMyEvent));
-    }
-
-    private static void HandleMyEvent(object sender, RoutedEventArgs e)
-    {
-    }
-
-The equivalent of this in Avalonia would be:
-
-    static MyControl()
-    {
-        MyEvent.AddClassHandler<MyControl>(x => x.HandleMyEvent);
-    }
-
-    private void HandleMyEvent(object sender, RoutedEventArgs e)
-    {
-    }
-
-Notice that in WPF you have to add the class handler as a static method, whereas
-in Avalonia the class handler is not static: the notification is automatically
-directed to the correct instance.
-
-## PropertyChangedCallback
-
-Listening to changes on DependencyProperties in WPF can be complex. When you
-register a `DependencyProperty` you can supply a static `PropertyChangedCallback`
-but if you want to listen to changes from elsewhere [things can get complicated
-and error-prone](http://stackoverflow.com/questions/23682232).
-
-In Avalonia, there is no `PropertyChangedCallback` at the time of registration,
-instead a class listener is [added to the control's static constructor in much
-the same way that event class listeners are added](../spec/working-with-properties.md#subscribing-to-a-property-on-any-object).
-
-## RenderTransforms and RenderTransformOrigin
-
-RenderTransformOrigins are different in WPF and Avalonia: If you apply a `RenderTransform`, keep in mind that our default value for the RenderTransformOrigin is `RelativePoint.Center`. In WPF the default value is `RelativePoint.TopLeft` (0, 0). In controls like Viewbox (currently being developed) the same code will lead to a different rendering behavior:
-
-In WPF:
-![WPF](https://files.gitter.im/AvaloniaUI/Avalonia/cDrM/image.png)
-
-In Avalonia:
-![Avalonia](https://files.gitter.im/AvaloniaUI/Avalonia/KGk7/image.png)
-
-In AvaloniaUI, to get the same scale transform we should indicate that the RenderTransformOrigin is the TopLeft part of the Visual. 

+ 0 - 10
docs/tutorial/gettingstarted.md

@@ -1,10 +0,0 @@
-# Getting Started
-
-## Windows
-
-![](images/add-dialogs.png)
-
-The easiest way to try out Avalonia is to install the [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio).
-
-This will add a Avalonia project template and a Window template to the standard Visual Studo “Add”
-dialog (yes, icons still to come :) ):

BIN
docs/tutorial/images/add-dialogs.png


+ 0 - 86
docs/tutorial/nuget.md

@@ -1,86 +0,0 @@
-# Avalonia NuGet Packages
-
-Avalonia is divided into several `NuGet` packages. 
-
-* The `Avalonia` package contains core portable class libraries.
-* The `Dekstop` and `Mobile` packages contain platform specific windowing and rendering back-ends.
-* The `Avalonia.Desktop` package is intended to be used by the end users targeting multiple desktop platforms (`Windows`, `Linux` and `OSX`).
-* The `Avalonia.iOS` and `Avalonia.Android` packages are intended to be used by the end users targeting specific mobile platforms. 
-* The `Avalonia.Mobile` package is intended to be used by the end users targeting multiple mobile platforms (`Android` and `iOS`).
-
-## Core
-
-* Avalonia (.nupkg)
-  - Avalonia.Animation (.dll)
-  - Avalonia.Base (.dll)
-  - Avalonia.Controls (.dll)
-  - Avalonia.DesignerSupport (.dll)
-  - Avalonia.Diagnostics (.dll)
-  - Avalonia.Input (.dll)
-  - Avalonia.Interactivity (.dll)
-  - Avalonia.Layout (.dll)
-  - Avalonia.Logging.Serilog (.dll)
-  - Avalonia.Visuals (.dll)
-  - Avalonia.Styling (.dll)
-  - Avalonia.ReactiveUI (.dll)
-  - Avalonia.Themes.Default (.dll)
-  - Avalonia.Markup (.dll)
-  - Avalonia.Markup.Xaml (.dll)
-  - Serilog (.nupkg)
-  - Splat (.nupkg)
-  - Sprache (.nupkg)
-  - System.Reactive (.nupkg)
-
-* Avalonia.HtmlRenderer (.nupkg)
-  - Avalonia (.nupkg)
-
-## Desktop
-
-* Avalonia.Win32 (.nupkg)
-  - Avalonia.Win32 (.dll)
-  - Avalonia (.nupkg)
-
-* Avalonia.Direct2D1 (.nupkg)
-  - Avalonia.Direct2D1 (.dll)
-  - Avalonia (.nupkg)
-  - SharpDX (.nupkg)
-  - SharpDX.Direct2D1 (.nupkg)
-  - SharpDX.DXGI (.nupkg)
-
-* Avalonia.Gtk (.nupkg)
-  - Avalonia.Gtk (.dll)
-  - Avalonia (.nupkg)
-
-* Avalonia.Cairo (.nupkg)
-  - Avalonia.Cairo (.dll)
-  - Avalonia (.nupkg)
-
-* Avalonia.Skia.Desktop (.nupkg)
-  - Avalonia.Skia.Desktop (.dll)
-  - Avalonia (.nupkg)
-  - SkiaSharp (.nupkg)
-
-* Avalonia.Desktop (.nupkg)
-  - Avalonia.Win32 (.nupkg)
-  - Avalonia.Direct2D1 (.nupkg)
-  - Avalonia.Gtk (.nupkg)
-  - Avalonia.Cairo (.nupkg)
-  - Avalonia.Skia.Desktop (.nupkg)
-
-## Mobile
-
-* Avalonia.Android (.nupkg)
-  - Avalonia.Android (.dll)
-  - Avalonia.Skia.Android (.dll)
-  - Avalonia (.nupkg)
-  - SkiaSharp (.nupkg)
-
-* Avalonia.iOS (.nupkg)
-  - Avalonia.iOS (.dll)
-  - Avalonia.Skia.iOS (.dll)
-  - Avalonia (.nupkg)
-  - SkiaSharp (.nupkg)
-
-* Avalonia.Mobile (.nupkg)
-  - Avalonia.Android (.nupkg)
-  - Avalonia.iOS (.nupkg)

+ 0 - 6
docs/tutorial/toc.yml

@@ -1,6 +0,0 @@
-- name: Getting Started
-  href: gettingstarted.md
-- name: Avalonia NuGet Packages
-  href: nuget.md
-- name: Avalonia for WPF Developers
-  href: from-wpf.md

+ 36 - 8
packages.cake

@@ -107,7 +107,8 @@ public class Packages
         context.Information("Setting NuGet package dependencies versions:");
 
         var SerilogVersion = packageVersions["Serilog"].FirstOrDefault().Item1;
-        var SplatVersion = packageVersions["Splat"].FirstOrDefault().Item1;
+        var SerilogSinksDebugVersion = packageVersions["Serilog.Sinks.Debug"].FirstOrDefault().Item1;
+        var SerilogSinksTraceVersion = packageVersions["Serilog.Sinks.Trace"].FirstOrDefault().Item1;
         var SpracheVersion = packageVersions["Sprache"].FirstOrDefault().Item1;
         var SystemReactiveVersion = packageVersions["System.Reactive"].FirstOrDefault().Item1;
         var ReactiveUIVersion = packageVersions["reactiveui"].FirstOrDefault().Item1;
@@ -121,7 +122,6 @@ public class Packages
         var SharpDXDXGIVersion = packageVersions["SharpDX.DXGI"].FirstOrDefault().Item1;
 
         context.Information("Package: Serilog, version: {0}", SerilogVersion);
-        context.Information("Package: Splat, version: {0}", SplatVersion);
         context.Information("Package: Sprache, version: {0}", SpracheVersion);
         context.Information("Package: System.Reactive, version: {0}", SystemReactiveVersion);
         context.Information("Package: reactiveui, version: {0}", ReactiveUIVersion);
@@ -223,6 +223,17 @@ public class Packages
             };
         });
 
+        var toolsContent = new[] {
+            new NuSpecContent{
+                Source = ((FilePath)context.File("./src/tools/Avalonia.Designer.HostApp/bin/" + parameters.DirSuffix + "/netcoreapp2.0/Avalonia.Designer.HostApp.dll")).FullPath, 
+                Target = "tools/netcoreapp2.0/previewer"
+            },
+            new NuSpecContent{
+                Source = ((FilePath)context.File("./src/tools/Avalonia.Designer.HostApp.NetFx/bin/" + parameters.DirSuffix + "/Avalonia.Designer.HostApp.exe")).FullPath, 
+                Target = "tools/net461/previewer"
+            }
+        };
+
         var nuspecNuGetSettingsCore = new []
         {
             ///////////////////////////////////////////////////////////////////////////////
@@ -234,17 +245,21 @@ public class Packages
                 Dependencies = new DependencyBuilder(this)
                 {
                     new NuSpecDependency() { Id = "Serilog", Version = SerilogVersion },
-                    new NuSpecDependency() { Id = "Splat", Version = SplatVersion },
+                    new NuSpecDependency() { Id = "Serilog.Sinks.Debug", Version = SerilogSinksDebugVersion },
+                    new NuSpecDependency() { Id = "Serilog.Sinks.Trace", Version = SerilogSinksTraceVersion },
                     new NuSpecDependency() { Id = "Sprache", Version = SpracheVersion },
                     new NuSpecDependency() { Id = "System.Reactive", Version = SystemReactiveVersion },
+                    new NuSpecDependency() { Id = "Avalonia.Remote.Protocol", Version = parameters.Version },
                     //.NET Core
                     new NuSpecDependency() { Id = "System.Threading.ThreadPool", TargetFramework = "netcoreapp2.0", Version = "4.3.0" },
                     new NuSpecDependency() { Id = "Microsoft.Extensions.DependencyModel", TargetFramework = "netcoreapp2.0", Version = "1.1.0" },
                     new NuSpecDependency() { Id = "NETStandard.Library", TargetFramework = "netcoreapp2.0", Version = "1.6.0" },
-                    new NuSpecDependency() { Id = "Splat", TargetFramework = "netcoreapp2.0", Version = SplatVersion },
                     new NuSpecDependency() { Id = "Serilog", TargetFramework = "netcoreapp2.0", Version = SerilogVersion },
+                    new NuSpecDependency() { Id = "Serilog.Sinks.Debug", TargetFramework = "netcoreapp2.0", Version = SerilogSinksDebugVersion },
+                    new NuSpecDependency() { Id = "Serilog.Sinks.Trace", TargetFramework = "netcoreapp2.0", Version = SerilogSinksTraceVersion },
                     new NuSpecDependency() { Id = "Sprache", TargetFramework = "netcoreapp2.0", Version = SpracheVersion },
                     new NuSpecDependency() { Id = "System.Reactive", TargetFramework = "netcoreapp2.0", Version = SystemReactiveVersion },
+                    new NuSpecDependency() { Id = "Avalonia.Remote.Protocol", TargetFramework = "netcoreapp2.0", Version = parameters.Version },
                 }
                 .Deps(new string[]{null, "netcoreapp2.0"},
                     "System.ValueTuple", "System.ComponentModel.TypeConverter", "System.ComponentModel.Primitives",
@@ -253,6 +268,7 @@ public class Packages
                 Files = coreLibrariesNuSpecContent
                     .Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform)
                     .Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
+                    .Concat(toolsContent)
                     .ToList(),
                 BasePath = context.Directory("./"),
                 OutputDirectory = parameters.NugetRoot
@@ -291,6 +307,19 @@ public class Packages
                 BasePath = context.Directory("./src/Avalonia.ReactiveUI/bin/" + parameters.DirSuffix + "/netstandard2.0"),
                 OutputDirectory = parameters.NugetRoot
             },
+            ///////////////////////////////////////////////////////////////////////////////
+            // Avalonia.Remote.Protocol
+            ///////////////////////////////////////////////////////////////////////////////
+            new NuGetPackSettings()
+            {
+                Id = "Avalonia.Remote.Protocol",
+                Files = new []
+                {
+                    new NuSpecContent { Source = "Avalonia.Remote.Protocol.dll", Target = "lib/netstandard2.0" }
+                },
+                BasePath = context.Directory("./src/Avalonia.Remote.Protocol/bin/" + parameters.DirSuffix + "/netstandard2.0"),
+                OutputDirectory = parameters.NugetRoot
+            },
         };
 
         var nuspecNuGetSettingsMobile = new []
@@ -341,14 +370,13 @@ public class Packages
             new NuGetPackSettings()
             {
                 Id = "Avalonia.Win32",
-                Dependencies = new []
+                Dependencies = new DependencyBuilder(this)
                 {
                     new NuSpecDependency() { Id = "Avalonia", Version = parameters.Version }
-                },
+                }.Deps(new string[]{null}, "System.Drawing.Common"),
                 Files = new []
                 {
-                    new NuSpecContent { Source = "Avalonia.Win32/bin/" + parameters.DirSuffix + "/Avalonia.Win32.dll", Target = "lib/net45" },
-                    new NuSpecContent { Source = "Avalonia.Win32.NetStandard/bin/" + parameters.DirSuffix + "/netstandard2.0/Avalonia.Win32.dll", Target = "lib/netstandard2.0" }
+                    new NuSpecContent { Source = "Avalonia.Win32/bin/" + parameters.DirSuffix + "/netstandard2.0/Avalonia.Win32.dll", Target = "lib/netstandard2.0" }
                 },
                 BasePath = context.Directory("./src/Windows"),
                 OutputDirectory = parameters.NugetRoot

+ 3 - 3
parameters.cake

@@ -30,7 +30,7 @@ public class Parameters
     public DirectoryPath NugetRoot { get; private set; }
     public DirectoryPath ZipRoot { get; private set; }
     public DirectoryPath BinRoot { get; private set; }
-    public DirectoryPath TestsRoot { get; private set; }
+    public DirectoryPath DesignerTestsRoot { get; private set; }
     public string DirSuffix { get; private set; }
     public string DirSuffixIOS { get; private set; }
     public DirectoryPathCollection BuildDirs { get; private set; }
@@ -97,7 +97,7 @@ public class Parameters
             else
             {
                 // Use AssemblyVersion with Build as version
-                Version += "-build" + context.EnvironmentVariable("APPVEYOR_BUILD_NUMBER") + "-alpha";
+                Version += "-build" + context.EnvironmentVariable("APPVEYOR_BUILD_NUMBER") + "-beta";
             }
         }
 
@@ -106,7 +106,7 @@ public class Parameters
         NugetRoot = ArtifactsDir.Combine("nuget");
         ZipRoot = ArtifactsDir.Combine("zip");
         BinRoot = ArtifactsDir.Combine("bin");
-        TestsRoot = ArtifactsDir.Combine("tests");
+        DesignerTestsRoot = ArtifactsDir.Combine("designer-tests");
 
         BuildDirs = context.GetDirectories("**/bin") + context.GetDirectories("**/obj");
 

+ 52 - 42
readme.md

@@ -1,70 +1,80 @@
-# Avalonia
-
+<img src='https://avatars2.githubusercontent.com/u/14075148?s=200&v=4' width='100' />
 
-| Gitter Chat | Windows Build Status | Linux/Mac Build Status |
-|---|---|---|
-| [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AvaloniaUI/Avalonia?utm_campaign=pr-badge&utm_content=badge&utm_medium=badge&utm_source=badge) | [![Build status](https://ci.appveyor.com/api/projects/status/hubk3k0w9idyibfg/branch/master?svg=true)](https://ci.appveyor.com/project/AvaloniaUI/Avalonia/branch/master) | [![Build Status](https://travis-ci.org/AvaloniaUI/Avalonia.svg?branch=master)](https://travis-ci.org/AvaloniaUI/Avalonia) |
+# Avalonia
 
-A multi-platform .NET UI framework. It can run on Windows, Linux, Mac OS X, iOS and Android.
+| Gitter Chat | Windows Build Status | Linux/Mac Build Status | Open Collective |
+|---|---|---|---|
+|  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AvaloniaUI/Avalonia?utm_campaign=pr-badge&utm_content=badge&utm_medium=badge&utm_source=badge) | [![Build status](https://ci.appveyor.com/api/projects/status/hubk3k0w9idyibfg/branch/master?svg=true)](https://ci.appveyor.com/project/AvaloniaUI/Avalonia/branch/master) | [![Build Status](https://travis-ci.org/AvaloniaUI/Avalonia.svg?branch=master)](https://travis-ci.org/AvaloniaUI/Avalonia) | [![Backers on Open Collective](https://opencollective.com/Avalonia/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/Avalonia/sponsors/badge.svg)](#sponsors) |
 
-[![](docs/images/screen.png)](https://youtu.be/wHcB3sGLVYg)
+## About
 
-Desktop platforms:
+Avalonia is a WPF-inspired cross-platform XAML-based UI framework providing a flexible styling system and supporting a wide range of OSs: Windows (.NET Framework, .NET Core), Linux (GTK), MacOS, Android and iOS.
 
-<a href='https://www.youtube.com/watch?t=28&v=c_AB_XSILp0' target='_blank'>![](docs/images/avalonia-video.png)<a/>
+**Avalonia is currently in beta** which means that the framework is generally usable for writing applications, but there may be some bugs and breaking changes as we continue development.
 
-Mobile platforms:
+| Control catalog | Desktop platforms | Mobile platforms |
+|---|---|---|
+| <a href='https://youtu.be/wHcB3sGLVYg'><img width='300' src='http://avaloniaui.net/images/screen.png'></a> | <a href='https://www.youtube.com/watch?t=28&v=c_AB_XSILp0' target='_blank'><img width='300' src='http://avaloniaui.net/images/avalonia-video.png'></a> | <a href='https://www.youtube.com/watch?v=NJ9-hnmUbBM' target='_blank'><img width='300' src='https://i.ytimg.com/vi/NJ9-hnmUbBM/hqdefault.jpg'></a> |
 
-<a href='https://www.youtube.com/watch?v=NJ9-hnmUbBM' target='_blank'>![](https://i.ytimg.com/vi/NJ9-hnmUbBM/hqdefault.jpg)<a/>
+## Getting Started
 
-## NuGet
+Avalonia [Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio) contains project and control templates that will help you get started. After installing it, open "New Project" dialog in Visual Studio, choose "Avalonia" in "Visual C#" section, select "Avalonia .NET Core Application" and press OK (<a href="http://avaloniaui.net/tutorial/images/add-dialogs.png">screenshot</a>). Now you can write code and markup that will work on multiple platforms!
 
-Avalonia is delivered as a NuGet package.
-You can find the packages here: ([stable(ish)](https://www.nuget.org/packages/Avalonia/), [nightly](https://github.com/AvaloniaUI/Avalonia/wiki/Using-nightly-build-feed))
+Avalonia is delivered via <b>NuGet</b> package manager. You can find the packages here: ([stable(ish)](https://www.nuget.org/packages/Avalonia/), [nightly](https://github.com/AvaloniaUI/Avalonia/wiki/Using-nightly-build-feed))
 
-You can install the package like this:
-`Install-Package Avalonia -Pre`
+Use these commands in Package Manager console to install Avalonia manually:
+```
+Install-Package Avalonia
+Install-Package Avalonia.Desktop
+```
 
 ## Bleeding Edge Builds
 
 Try out the latest build of Avalonia available for download here:
 https://ci.appveyor.com/project/AvaloniaUI/Avalonia/branch/master/artifacts
 
-Try out the ControlCatalog to give it a quick demo.
+## Documentation
 
-## Background
+As mentioned above, Avalonia is still in alpha and as such there's not much documentation yet. You can take a look at the [getting started page](http://avaloniaui.net/docs/quickstart/) for an overview of how to get started but probably the best thing to do for now is to already know a little bit about WPF/Silverlight/UWP/XAML and ask questions in our [Gitter room](https://gitter.im/AvaloniaUI/Avalonia).
 
-Avalonia is a multi-platform windowing toolkit - somewhat like WPF - that is intended to be multi-
-platform. It supports XAML, lookless controls and a flexible styling system, and runs on Windows
-using Direct2D and other operating systems using Skia and OS-specific windowing backend (GTK, Cocoa, etc).
+There's also a high-level [architecture document](http://avaloniaui.net/architecture/project-structure) that is currently a little bit out of date, and I've also started writing blog posts on Avalonia at http://grokys.github.io/.
 
-## Current Status
+Contributions are always welcome!
 
-Avalonia is now in alpha. What does "alpha" mean? Well, it means that it's now at a stage where you
-can have a play and hopefully create simple applications. There's now a [Visual
-Studio Extension](https://marketplace.visualstudio.com/items?itemName=AvaloniaTeam.AvaloniaforVisualStudio)
-containing project and item templates that will help you get started, and
-there's an initial complement of controls. There's still a lot missing, and you
-*will* find bugs, and the API *will* change, but this represents the first time
-where we've made it somewhat easy to have a play and experiment with the
-framework.
+## Building and Using
 
-## Documentation
+See the [build instructions here](http://avaloniaui.net/contributing/build).
 
-As mentioned above, Avalonia is still in alpha and as such there's not much documentation yet. You can
-take a look at the [getting started page](docs/tutorial/gettingstarted.md) for an
-overview of how to get started but probably the best thing to do for now is to already know a little bit
-about WPF/Silverlight/UWP/XAML and ask questions in our [Gitter room](https://gitter.im/AvaloniaUI/Avalonia).
+## Contributing
 
-There's also a high-level [architecture document](docs/spec/architecture.md) that is currently a little bit
-out of date, and I've also started writing blog posts on Avalonia at http://grokys.github.io/.
+Please read the [contribution guidelines](http://avaloniaui.net/contributing/contributing) before submitting a pull request.
 
-Contributions are always welcome!
+### Contributors
 
-## Building and Using
+This project exists thanks to all the people who contribute. [[Contribute](http://avaloniaui.net/contributing/contributing)].
+<a href="graphs/contributors"><img src="https://opencollective.com/Avalonia/contributors.svg?width=890&button=false" /></a>
+
+
+### Backers
+
+Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Avalonia#backer)]
+
+<a href="https://opencollective.com/Avalonia#backers" target="_blank"><img src="https://opencollective.com/Avalonia/backers.svg?width=890"></a>
+
+
+### Sponsors
+
+Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Avalonia#sponsor)]
 
-See the [build instructions here](docs/guidelines/build.md)
+<a href="https://opencollective.com/Avalonia/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/2/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/3/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/4/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/5/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/6/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/7/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/8/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/Avalonia/sponsor/9/website" target="_blank"><img src="https://opencollective.com/Avalonia/sponsor/9/avatar.svg"></a>
 
-## Contributing ##
 
-Please read the [contribution guidelines](docs/guidelines/contributing.md) before submitting a pull request.

+ 1 - 1
samples/BindingTest/App.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
     </startup>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

+ 1 - 12
samples/BindingTest/App.xaml.cs

@@ -16,22 +16,11 @@ namespace BindingTest
 
         private static void Main()
         {
-            InitializeLogging();
-
             AppBuilder.Configure<App>()
                 .UsePlatformDetect()
                 .UseReactiveUI()
+                .LogToDebug()
                 .Start<MainWindow>();
         }
-
-        private static void InitializeLogging()
-        {
-#if DEBUG
-            SerilogLogger.Initialize(new LoggerConfiguration()
-                .MinimumLevel.Warning()
-                .WriteTo.Trace(outputTemplate: "{Area}: {Message}")
-                .CreateLogger());
-#endif
-        }
     }
 }

+ 1 - 3
samples/BindingTest/BindingTest.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>BindingTest</RootNamespace>
     <AssemblyName>BindingTest</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <TargetFrameworkProfile />
@@ -151,8 +151,6 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\..\build\Serilog.props" />
-  <Import Project="..\..\build\Serilog.Sinks.Trace.props" />
-  <Import Project="..\..\build\Splat.props" />
   <Import Project="..\..\build\Rx.props" />
   <Import Project="..\..\build\ReactiveUI.props" />
 </Project>

+ 1 - 1
samples/ControlCatalog.Desktop/App.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
     </startup>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

+ 1 - 2
samples/ControlCatalog.Desktop/ControlCatalog.Desktop.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>ControlCatalog.Desktop</RootNamespace>
     <AssemblyName>ControlCatalog.Desktop</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <TargetFrameworkProfile />
@@ -135,5 +135,4 @@
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\..\build\Serilog.props" />
   <Import Project="..\..\build\SkiaSharp.props" />
-  <Import Project="..\..\build\Serilog.Sinks.Trace.props" />
 </Project>

+ 7 - 15
samples/ControlCatalog.Desktop/Program.cs

@@ -10,27 +10,19 @@ namespace ControlCatalog
 {
     internal class Program
     {
+        [STAThread]
         static void Main(string[] args)
         {
-            InitializeLogging();
-
             // TODO: Make this work with GTK/Skia/Cairo depending on command-line args
             // again.
-            AppBuilder.Configure<App>()
-                .UsePlatformDetect()
-                .Start<MainWindow>();
+            BuildAvaloniaApp().Start<MainWindow>();
         }
 
-        // This will be made into a runtime configuration extension soon!
-        private static void InitializeLogging()
-        {
-#if DEBUG
-            SerilogLogger.Initialize(new LoggerConfiguration()
-                .MinimumLevel.Warning()
-                .WriteTo.Trace(outputTemplate: "{Area}: {Message}")
-                .CreateLogger());
-#endif
-        }
+        /// <summary>
+        /// This method is needed for IDE previewer infrastructure
+        /// </summary>
+        public static AppBuilder BuildAvaloniaApp()
+            => AppBuilder.Configure<App>().LogToDebug().UsePlatformDetect();
 
         private static void ConfigureAssetAssembly(AppBuilder builder)
         {

+ 1 - 0
samples/ControlCatalog.NetCore/ControlCatalog.NetCore.csproj

@@ -6,6 +6,7 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <ProjectReference Include="..\..\src\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.DotNetCoreRuntime\Avalonia.DotNetCoreRuntime.csproj" />
     <ProjectReference Include="..\..\src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj" />
     <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj" />

+ 8 - 11
samples/ControlCatalog.NetCore/Program.cs

@@ -9,8 +9,10 @@ namespace ControlCatalog.NetCore
 {
     static class Program
     {
+        
         static void Main(string[] args)
         {
+            Thread.CurrentThread.TrySetApartmentState(ApartmentState.STA);
             if (args.Contains("--wait-for-attach"))
             {
                 Console.WriteLine("Attach debugger and use 'Set next statement'");
@@ -28,19 +30,14 @@ namespace ControlCatalog.NetCore
                     System.Threading.ThreadPool.QueueUserWorkItem(_ => ConsoleSilencer());
                 });
             else
-                AppBuilder.Configure<App>()
-                    .CustomPlatformDetect()
-                    .UseReactiveUI()
-                    .Start<MainWindow>();
+                BuildAvaloniaApp().Start<MainWindow>();
         }
 
-        static AppBuilder CustomPlatformDetect(this AppBuilder builder)
-        {
-            //This is needed because we still aren't ready to have MonoMac backend as default one
-            if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
-                return builder.UseSkia().UseMonoMac();
-            return builder.UsePlatformDetect();
-        }
+        /// <summary>
+        /// This method is needed for IDE previewer infrastructure
+        /// </summary>
+        public static AppBuilder BuildAvaloniaApp()
+            => AppBuilder.Configure<App>().UsePlatformDetect().UseReactiveUI();
 
         static void ConsoleSilencer()
         {

+ 2 - 3
samples/ControlCatalog.iOS/ControlCatalog.iOS.csproj

@@ -170,15 +170,14 @@
       <Name>Avalonia.Themes.Default</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\src\Skia\Avalonia.Skia\Avalonia.Skia.csproj">
-      <Project>{D2D3083-71DD-4CC9-8907-39A0D86FB322}</Project>
+      <Project>{7d2d3083-71dd-4cc9-8907-39a0d86fb322}</Project>
       <Name>Avalonia.Skia</Name>
-      <IsAppExtension>false</IsAppExtension>
-      <IsWatchApp>false</IsWatchApp>
     </ProjectReference>
     <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj">
       <Project>{d0a739b9-3c68-4ba6-a328-41606954b6bd}</Project>
       <Name>ControlCatalog</Name>
     </ProjectReference>
   </ItemGroup>
+  <Import Project="..\..\build\Sprache.props" />
   <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
 </Project>

+ 7 - 175
samples/ControlCatalog/ControlCatalog.csproj

@@ -1,171 +1,17 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFramework>netstandard2.0</TargetFramework>
-    <EnableDefaultCompileItems>False</EnableDefaultCompileItems>
-    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+    <TargetFramework>netstandard2.0</TargetFramework>    
   </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <None Remove="Pages\ContextMenuPage.xaml" />
-  </ItemGroup>
-  <ItemGroup>
-    <!-- A reference to the entire .NET Framework is automatically included -->
-    <EmbeddedResource Include="App.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="MainView.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="DecoratedWindow.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\DialogsPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\BorderPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\ButtonPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\CanvasPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\CarouselPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\CheckBoxPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\ContextMenuPage.xaml" />
-    <EmbeddedResource Include="Pages\DropDownPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\ExpanderPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\ImagePage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\LayoutTransformControlPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\MenuPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\ProgressBarPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\RadioButtonPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\SliderPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\TextBoxPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="Pages\ToolTipPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-  </ItemGroup>
   <ItemGroup>
-    <Compile Include="App.xaml.cs">
-      <DependentUpon>App.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="MainView.xaml.cs">
-      <DependentUpon>MainView.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="DecoratedWindow.xaml.cs">
-      <DependentUpon>DecoratedWindow.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="MainWindow.xaml.cs">
-      <DependentUpon>MainWindow.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\DialogsPage.xaml.cs">
-      <DependentUpon>DialogsPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\BorderPage.xaml.cs">
-      <DependentUpon>BorderPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\ButtonPage.xaml.cs">
-      <DependentUpon>ButtonPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\CanvasPage.xaml.cs">
-      <DependentUpon>CanvasPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\CarouselPage.xaml.cs">
-      <DependentUpon>CarouselPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\ContextMenuPage.xaml.cs">
-      <DependentUpon>ContextMenuPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\CheckBoxPage.xaml.cs">
-      <DependentUpon>CheckBoxPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\DropDownPage.xaml.cs">
-      <DependentUpon>DropDownPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\ExpanderPage.xaml.cs">
-      <DependentUpon>ExpanderPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\ImagePage.xaml.cs">
-      <DependentUpon>ImagePage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\LayoutTransformControlPage.xaml.cs">
-      <DependentUpon>LayoutTransformControlPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\MenuPage.xaml.cs">
-      <DependentUpon>MenuPage.xaml</DependentUpon>
+    <Compile Update="**\*.xaml.cs">
+      <DependentUpon>%(Filename)</DependentUpon>
     </Compile>
-    <Compile Include="Pages\ProgressBarPage.xaml.cs">
-      <DependentUpon>ProgressBarPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\RadioButtonPage.xaml.cs">
-      <DependentUpon>RadioButtonPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\SliderPage.xaml.cs">
-      <DependentUpon>SliderPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\TreeViewPage.xaml.cs">
-      <DependentUpon>TreeViewPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\TextBoxPage.xaml.cs">
-      <DependentUpon>TextBoxPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\ToolTipPage.xaml.cs">
-      <DependentUpon>ToolTipPage.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Pages\ScreenPage.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Assets\delicate-arch-896885_640.jpg" />
-    <EmbeddedResource Include="Assets\github_icon.png" />
-    <EmbeddedResource Include="Assets\hirsch-899118_640.jpg" />
-    <EmbeddedResource Include="Assets\maple-leaf-888807_640.jpg" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="SideBar.xaml">
+    <EmbeddedResource Include="**\*.xaml">
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="Assets\*" />
   </ItemGroup>
+
   <ItemGroup>
     <ProjectReference Include="..\..\src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj" />
     <ProjectReference Include="..\..\src\Markup\Avalonia.Markup\Avalonia.Markup.csproj" />
@@ -182,20 +28,6 @@
     <ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj" />
     <ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
   </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Assets\test_icon.ico" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Pages\TreeViewPage.xaml">
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="MainWindow.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>
-      </SubType>
-    </EmbeddedResource>
-  </ItemGroup>
+  
   <Import Project="..\..\build\Serilog.props" />
 </Project>

+ 7 - 1
samples/ControlCatalog/MainView.xaml

@@ -5,17 +5,23 @@
     <TabControl.Transition>
       <CrossFade Duration="0.25"/>
     </TabControl.Transition>
+    <TabItem Header="AutoCompleteBox"><pages:AutoCompleteBoxPage/></TabItem>
     <TabItem Header="Border"><pages:BorderPage/></TabItem>
     <TabItem Header="Button"><pages:ButtonPage/></TabItem>
+    <TabItem Header="ButtonSpinner"><pages:ButtonSpinnerPage/></TabItem>
+    <TabItem Header="Calendar"><pages:CalendarPage/></TabItem>
     <TabItem Header="Canvas"><pages:CanvasPage/></TabItem>
     <TabItem Header="Carousel"><pages:CarouselPage/></TabItem>
     <TabItem Header="CheckBox"><pages:CheckBoxPage/></TabItem>
     <TabItem Header="ContextMenu"><pages:ContextMenuPage/></TabItem>
+    <TabItem Header="DatePicker"><pages:DatePickerPage/></TabItem>
+    <TabItem Header="Drag+Drop"><pages:DragAndDropPage/></TabItem>
     <TabItem Header="DropDown"><pages:DropDownPage/></TabItem>
     <TabItem Header="Expander"><pages:ExpanderPage/></TabItem>
     <TabItem Header="Image"><pages:ImagePage/></TabItem>
     <TabItem Header="LayoutTransformControl"><pages:LayoutTransformControlPage/></TabItem>
     <TabItem Header="Menu"><pages:MenuPage/></TabItem>
+	  <TabItem Header="NumericUpDown"><pages:NumericUpDownPage/></TabItem>
     <TabItem Header="ProgressBar"><pages:ProgressBarPage/></TabItem>
     <TabItem Header="RadioButton"><pages:RadioButtonPage/></TabItem>
     <TabItem Header="Slider"><pages:SliderPage/></TabItem>
@@ -23,4 +29,4 @@
     <TabItem Header="ToolTip"><pages:ToolTipPage/></TabItem>
     <TabItem Header="TreeView"><pages:TreeViewPage/></TabItem>
   </TabControl>
-</UserControl>
+</UserControl>

+ 59 - 0
samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml

@@ -0,0 +1,59 @@
+<UserControl xmlns="https://github.com/avaloniaui">
+  <StackPanel Orientation="Vertical" Gap="4">
+    <TextBlock Classes="h1">AutoCompleteBox</TextBlock>
+    <TextBlock Classes="h2">A control into which the user can input text</TextBlock>
+
+    <StackPanel Orientation="Horizontal"
+              Margin="0,16,0,0"
+              HorizontalAlignment="Center"
+              Gap="8">
+      <StackPanel Orientation="Vertical">
+        <TextBlock Text="MinimumPrefixLength: 1"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         MinimumPrefixLength="1"/>
+        <TextBlock Text="MinimumPrefixLength: 3"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         MinimumPrefixLength="3"/>
+        <TextBlock Text="MinimumPopulateDelay: 1 Second"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         MinimumPopulateDelay="1"/>
+        <TextBlock Text="MaxDropDownHeight: 60"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         MaxDropDownHeight="60"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         Watermark="Watermark"/>
+        <TextBlock Text="Disabled"/>
+        <AutoCompleteBox Width="200"
+                         IsEnabled="False"/>
+      </StackPanel>
+      
+
+      <StackPanel Orientation="Vertical">
+        
+        <TextBlock Text="ValueMemeberSelector"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         ValueMemberSelector="Capital"/>
+        <TextBlock Text="ValueMemberBinding"/>
+        <AutoCompleteBox Width="200"
+                         Margin="0,0,0,8"
+                         ValueMemberBinding="{Binding Capital}"/>
+        <TextBlock Text="Multi-Binding"/>
+        <AutoCompleteBox Name="MultiBindingBox"
+                         Width="200"
+                         Margin="0,0,0,8"
+                         FilterMode="Contains"/>
+        <TextBlock Text="Async Populate"/>
+        <AutoCompleteBox Name="AsyncBox"
+                         Width="200"
+                         Margin="0,0,0,8"
+                         FilterMode="None"/>
+      </StackPanel>
+    </StackPanel>
+  </StackPanel>
+</UserControl>

+ 143 - 0
samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml.cs

@@ -0,0 +1,143 @@
+using Avalonia.Controls;
+using Avalonia.LogicalTree;
+using Avalonia.Markup;
+using Avalonia.Markup.Xaml;
+using Avalonia.Markup.Xaml.Data;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace ControlCatalog.Pages
+{
+    public class AutoCompleteBoxPage : UserControl
+    {
+        public class StateData
+        {
+            public string Name { get; private set; }
+            public string Abbreviation { get; private set; }
+            public string Capital { get; private set; }
+
+            public StateData(string name, string abbreviatoin, string capital)
+            {
+                Name = name;
+                Abbreviation = abbreviatoin;
+                Capital = capital;
+            }
+
+            public override string ToString()
+            {
+                return Name;
+            }
+        }
+
+        private StateData[] BuildAllStates()
+        {
+            return new StateData[]
+            {
+                new StateData("Alabama","AL","Montgomery"),
+                new StateData("Alaska","AK","Juneau"),
+                new StateData("Arizona","AZ","Phoenix"),
+                new StateData("Arkansas","AR","Little Rock"),
+                new StateData("California","CA","Sacramento"),
+                new StateData("Colorado","CO","Denver"),
+                new StateData("Connecticut","CT","Hartford"),
+                new StateData("Delaware","DE","Dover"),
+                new StateData("Florida","FL","Tallahassee"),
+                new StateData("Georgia","GA","Atlanta"),
+                new StateData("Hawaii","HI","Honolulu"),
+                new StateData("Idaho","ID","Boise"),
+                new StateData("Illinois","IL","Springfield"),
+                new StateData("Indiana","IN","Indianapolis"),
+                new StateData("Iowa","IA","Des Moines"),
+                new StateData("Kansas","KS","Topeka"),
+                new StateData("Kentucky","KY","Frankfort"),
+                new StateData("Louisiana","LA","Baton Rouge"),
+                new StateData("Maine","ME","Augusta"),
+                new StateData("Maryland","MD","Annapolis"),
+                new StateData("Massachusetts","MA","Boston"),
+                new StateData("Michigan","MI","Lansing"),
+                new StateData("Minnesota","MN","St. Paul"),
+                new StateData("Mississippi","MS","Jackson"),
+                new StateData("Missouri","MO","Jefferson City"),
+                new StateData("Montana","MT","Helena"),
+                new StateData("Nebraska","NE","Lincoln"),
+                new StateData("Nevada","NV","Carson City"),
+                new StateData("New Hampshire","NH","Concord"),
+                new StateData("New Jersey","NJ","Trenton"),
+                new StateData("New Mexico","NM","Santa Fe"),
+                new StateData("New York","NY","Albany"),
+                new StateData("North Carolina","NC","Raleigh"),
+                new StateData("North Dakota","ND","Bismarck"),
+                new StateData("Ohio","OH","Columbus"),
+                new StateData("Oklahoma","OK","Oklahoma City"),
+                new StateData("Oregon","OR","Salem"),
+                new StateData("Pennsylvania","PA","Harrisburg"),
+                new StateData("Rhode Island","RI","Providence"),
+                new StateData("South Carolina","SC","Columbia"),
+                new StateData("South Dakota","SD","Pierre"),
+                new StateData("Tennessee","TN","Nashville"),
+                new StateData("Texas","TX","Austin"),
+                new StateData("Utah","UT","Salt Lake City"),
+                new StateData("Vermont","VT","Montpelier"),
+                new StateData("Virginia","VA","Richmond"),
+                new StateData("Washington","WA","Olympia"),
+                new StateData("West Virginia","WV","Charleston"),
+                new StateData("Wisconsin","WI","Madison"),
+                new StateData("Wyoming","WY","Cheyenne"),
+            };
+        }
+        public StateData[] States { get; private set; }
+        
+        public AutoCompleteBoxPage()
+        {
+            this.InitializeComponent();
+
+            States = BuildAllStates();
+
+            foreach (AutoCompleteBox box in GetAllAutoCompleteBox())
+            {
+                box.Items = States;
+            }
+
+            var converter = new FuncMultiValueConverter<string, string>(parts =>
+            {
+                return String.Format("{0} ({1})", parts.ToArray());
+            });
+            var binding = new MultiBinding { Converter = converter };
+            binding.Bindings.Add(new Binding("Name"));
+            binding.Bindings.Add(new Binding("Abbreviation"));
+
+            var multibindingBox = this.FindControl<AutoCompleteBox>("MultiBindingBox");
+            multibindingBox.ValueMemberBinding = binding;
+
+            var asyncBox = this.FindControl<AutoCompleteBox>("AsyncBox");
+            asyncBox.AsyncPopulator = PopulateAsync;
+        }
+        private IEnumerable<AutoCompleteBox> GetAllAutoCompleteBox()
+        {
+            return
+                this.GetLogicalDescendants()
+                    .OfType<AutoCompleteBox>();
+        }
+
+        private bool StringContains(string str, string query)
+        {
+            return str.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0;
+        }
+        private async Task<IEnumerable<object>> PopulateAsync(string searchText, CancellationToken cancellationToken)
+        {
+            await Task.Delay(TimeSpan.FromSeconds(1.5), cancellationToken);
+
+            return
+                States.Where(data => StringContains(data.Name, searchText) || StringContains(data.Capital, searchText))
+                      .ToList();
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+    }
+}

+ 24 - 0
samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml

@@ -0,0 +1,24 @@
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+  <StackPanel Orientation="Vertical" Gap="4">
+    <TextBlock Classes="h1">ButtonSpinner</TextBlock>
+    <TextBlock Classes="h2">The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element.</TextBlock>
+
+    <StackPanel Orientation="Vertical" Gap="8" Width="200" Margin="0,20,0,0">
+      <CheckBox Name="allowSpinCheck" IsChecked="True">AllowSpin</CheckBox>
+      <CheckBox Name="showSpinCheck" IsChecked="True">ShowButtonSpinner</CheckBox>
+      <ButtonSpinner Spin="OnSpin" Height="30"
+                     AllowSpin="{Binding #allowSpinCheck.IsChecked}"
+                     ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
+        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
+      </ButtonSpinner>
+      <ButtonSpinner Spin="OnSpin" Height="30" ButtonSpinnerLocation="Left"
+                     AllowSpin="{Binding #allowSpinCheck.IsChecked}"
+                     ShowButtonSpinner="{Binding #showSpinCheck.IsChecked}">
+        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Everest"/>
+      </ButtonSpinner>
+    </StackPanel>
+  </StackPanel>
+
+</UserControl>

+ 54 - 0
samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml.cs

@@ -0,0 +1,54 @@
+using System;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Interactivity;
+using Avalonia.Markup.Xaml;
+
+namespace ControlCatalog.Pages
+{
+    public class ButtonSpinnerPage : UserControl
+    {
+        public ButtonSpinnerPage()
+        {
+            this.InitializeComponent();
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+
+        private void OnSpin(object sender, SpinEventArgs e)
+        {
+            var spinner = (ButtonSpinner)sender;
+            var txtBox = (TextBlock)spinner.Content;
+
+            int value = Array.IndexOf(_mountains, txtBox.Text);
+            if (e.Direction == SpinDirection.Increase)
+                value++;
+            else
+                value--;
+
+            if (value < 0)
+                value = _mountains.Length - 1;
+            else if (value >= _mountains.Length)
+                value = 0;
+
+            txtBox.Text = _mountains[value];
+        }
+
+        private readonly string[] _mountains = new[]
+        {
+            "Everest",
+            "K2 (Mount Godwin Austen)",
+            "Kangchenjunga",
+            "Lhotse",
+            "Makalu",
+            "Cho Oyu",
+            "Dhaulagiri",
+            "Manaslu",
+            "Nanga Parbat",
+            "Annapurna"
+        };
+    }
+}

+ 47 - 0
samples/ControlCatalog/Pages/CalendarPage.xaml

@@ -0,0 +1,47 @@
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+  <StackPanel Orientation="Vertical" Gap="4">
+    <TextBlock Classes="h1">Calendar</TextBlock>
+    <TextBlock Classes="h2">A calendar control for selecting dates</TextBlock>
+        
+    <StackPanel Orientation="Horizontal"
+                Margin="0,16,0,0"
+                HorizontalAlignment="Center"
+                Gap="16">
+      <StackPanel Orientation="Vertical">
+        <TextBlock Text="SelectionMode: None"/>
+        <Calendar SelectionMode="None"
+                  Margin="0,0,0,8"/>
+
+        <TextBlock Text="SelectionMode: SingleDate"/>
+        <Calendar SelectionMode="SingleDate"
+                  Margin="0,0,0,8"/>
+
+        <TextBlock Text="Disabled"/>
+        <Calendar IsEnabled="False"
+                  SelectionMode="SingleDate"/>
+      </StackPanel>
+
+      <StackPanel Orientation="Vertical">
+        <TextBlock Text="SelectionMode: SingleRange"/>
+        <Calendar SelectionMode="SingleRange"
+                  Margin="0,0,0,8"/>
+
+        <TextBlock Text="SelectionMode: MultipleRange"/>
+        <Calendar SelectionMode="MultipleRange"/>
+      </StackPanel>
+
+      <StackPanel Orientation="Vertical">
+        <TextBlock Text="DisplayDates"/>
+        <Calendar Name="DisplayDatesCalendar"
+                  SelectionMode="SingleDate"
+                  Margin="0,0,0,8"/>
+
+        <TextBlock Text="BlackoutDates"/>
+        <Calendar Name="BlackoutDatesCalendar"
+                  SelectionMode="SingleDate" />
+      </StackPanel>
+      
+    </StackPanel> 
+  </StackPanel>
+</UserControl>

+ 28 - 0
samples/ControlCatalog/Pages/CalendarPage.xaml.cs

@@ -0,0 +1,28 @@
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using System;
+
+namespace ControlCatalog.Pages
+{
+    public class CalendarPage : UserControl
+    {
+        public CalendarPage()
+        {
+            this.InitializeComponent();
+
+            var today = DateTime.Today; 
+            var cal1 = this.FindControl<Calendar>("DisplayDatesCalendar");
+            cal1.DisplayDateStart = today.AddDays(-25);
+            cal1.DisplayDateEnd = today.AddDays(25);
+
+            var cal2 = this.FindControl<Calendar>("BlackoutDatesCalendar");
+            cal2.BlackoutDates.AddDatesInPast();
+            cal2.BlackoutDates.Add(new CalendarDateRange(today.AddDays(6)));
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+    }
+}

+ 9 - 1
samples/ControlCatalog/Pages/CarouselPage.xaml

@@ -9,7 +9,7 @@
       </Button>
       <Carousel Name="carousel">
         <Carousel.Transition>
-          <PageSlide Duration="0.25"/>
+          <PageSlide Duration="0.25" Orientation="Vertical" />
         </Carousel.Transition>
         <Image Source="resm:ControlCatalog.Assets.delicate-arch-896885_640.jpg"/>
         <Image Source="resm:ControlCatalog.Assets.hirsch-899118_640.jpg"/>
@@ -28,6 +28,14 @@
         <DropDownItem>Crossfade</DropDownItem>
       </DropDown>
     </StackPanel>
+
+    <StackPanel Orientation="Horizontal" Gap="4">
+      <TextBlock VerticalAlignment="Center">Orientation</TextBlock>
+      <DropDown Name="orientation" SelectedIndex="1" VerticalAlignment="Center">
+        <DropDownItem>Horizontal</DropDownItem>
+        <DropDownItem>Vertical</DropDownItem>
+      </DropDown>
+    </StackPanel>
     
   </StackPanel>
 </UserControl>

+ 4 - 1
samples/ControlCatalog/Pages/CarouselPage.xaml.cs

@@ -11,6 +11,7 @@ namespace ControlCatalog.Pages
         private Button _left;
         private Button _right;
         private DropDown _transition;
+        private DropDown _orientation;
 
         public CarouselPage()
         {
@@ -18,6 +19,7 @@ namespace ControlCatalog.Pages
             _left.Click += (s, e) => _carousel.Previous();
             _right.Click += (s, e) => _carousel.Next();
             _transition.SelectionChanged += TransitionChanged;
+            _orientation.SelectionChanged += TransitionChanged;
         }
 
         private void InitializeComponent()
@@ -27,6 +29,7 @@ namespace ControlCatalog.Pages
             _left = this.FindControl<Button>("left");
             _right = this.FindControl<Button>("right");
             _transition = this.FindControl<DropDown>("transition");
+            _orientation = this.FindControl<DropDown>("orientation");
         }
 
         private void TransitionChanged(object sender, SelectionChangedEventArgs e)
@@ -37,7 +40,7 @@ namespace ControlCatalog.Pages
                     _carousel.Transition = null;
                     break;
                 case 1:
-                    _carousel.Transition = new PageSlide(TimeSpan.FromSeconds(0.25));
+                    _carousel.Transition = new PageSlide(TimeSpan.FromSeconds(0.25), _orientation.SelectedIndex == 0 ? PageSlide.SlideAxis.Horizontal : PageSlide.SlideAxis.Vertical);
                     break;
                 case 2:
                     _carousel.Transition = new CrossFade(TimeSpan.FromSeconds(0.25));

+ 19 - 6
samples/ControlCatalog/Pages/CheckBoxPage.xaml

@@ -1,15 +1,28 @@
-<UserControl xmlns="https://github.com/avaloniaui">
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <StackPanel Orientation="Vertical" Gap="4">
     <TextBlock Classes="h1">CheckBox</TextBlock>
     <TextBlock Classes="h2">A check box control</TextBlock>
 
-    <StackPanel Orientation="Vertical"
+    <StackPanel Orientation="Horizontal"
                 Margin="0,16,0,0"
                 HorizontalAlignment="Center"
                 Gap="16">
-      <CheckBox>Unchecked</CheckBox>
-      <CheckBox IsChecked="True">Checked</CheckBox>
-      <CheckBox IsChecked="True" IsEnabled="False">Disabled</CheckBox>
-    </StackPanel>    
+      <StackPanel Orientation="Vertical"
+                  Gap="16">
+        <CheckBox>Unchecked</CheckBox>
+        <CheckBox IsChecked="True">Checked</CheckBox>
+        <CheckBox IsChecked="{x:Null}">Indeterminate</CheckBox>
+        <CheckBox IsChecked="True" IsEnabled="False">Disabled</CheckBox>
+      </StackPanel>
+      <StackPanel Orientation="Vertical"
+                  HorizontalAlignment="Center"
+                  Gap="16">
+        <CheckBox IsChecked="False" IsThreeState="True">Three State: Unchecked</CheckBox>
+        <CheckBox IsChecked="True" IsThreeState="True">Three State: Checked</CheckBox>
+        <CheckBox IsChecked="{x:Null}" IsThreeState="True">Three State: Indeterminate</CheckBox>
+        <CheckBox IsChecked="{x:Null}" IsThreeState="True" IsEnabled="False">Three State: Disabled</CheckBox>
+      </StackPanel>
+    </StackPanel>
   </StackPanel>
 </UserControl>

+ 46 - 0
samples/ControlCatalog/Pages/DatePickerPage.xaml

@@ -0,0 +1,46 @@
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+  <StackPanel Orientation="Vertical" Gap="4">
+    <TextBlock Classes="h1">DatePicker</TextBlock>
+    <TextBlock Classes="h2">A control for selecting dates with a calendar drop-down</TextBlock>
+        
+    <StackPanel Orientation="Horizontal"
+                Margin="0,16,0,0"
+                HorizontalAlignment="Center"
+                Gap="16">
+      <StackPanel Orientation="Vertical"
+                  Width="200">
+        <TextBlock Text="SelectedDateFormat: Short"/>
+        <DatePicker Name="DatePicker1"
+                    SelectedDateFormat="Short"
+                    Margin="0,0,0,8"/>
+
+        <TextBlock Text="SelectedDateFormat: Long"/>
+        <DatePicker Name="DatePicker2"
+                    SelectedDateFormat="Long"
+                    Margin="0,0,0,8"/>
+
+        <TextBlock Text="SelectedDateFormat: Custom"/>
+        <DatePicker Name="DatePicker3"
+                    SelectedDateFormat="Custom"
+                    CustomDateFormatString="ddd, MMM d"
+                    Margin="0,0,0,8"/>
+
+        <TextBlock Text="Blackout Dates"/>
+        <DatePicker Name="DatePicker4"
+                    Margin="0,0,0,8"/>
+
+        <DatePicker Margin="0,0,0,8"
+                    Watermark="Watermark"/>
+        <DatePicker Margin="0,0,0,8"
+                    Name="DatePicker5"
+                    Watermark="Floating Watermark"
+                    UseFloatingWatermark="True"/>
+                
+        <TextBlock Text="Disabled"/>
+        <DatePicker IsEnabled="False"/>
+      </StackPanel>
+
+    </StackPanel> 
+  </StackPanel>
+</UserControl>

+ 36 - 0
samples/ControlCatalog/Pages/DatePickerPage.xaml.cs

@@ -0,0 +1,36 @@
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using System;
+
+namespace ControlCatalog.Pages
+{
+    public class DatePickerPage : UserControl
+    {
+        public DatePickerPage()
+        {
+            InitializeComponent();
+            
+            var dp1 = this.FindControl<DatePicker>("DatePicker1");
+            var dp2 = this.FindControl<DatePicker>("DatePicker2");
+            var dp3 = this.FindControl<DatePicker>("DatePicker3");
+            var dp4 = this.FindControl<DatePicker>("DatePicker4");
+            var dp5 = this.FindControl<DatePicker>("DatePicker5");
+
+            dp1.SelectedDate = DateTime.Today;
+            dp2.SelectedDate = DateTime.Today.AddDays(10);
+            dp3.SelectedDate = DateTime.Today.AddDays(20);
+            dp5.SelectedDate = DateTime.Today;
+
+            dp4.TemplateApplied += (s, e) =>
+            {
+                dp4.BlackoutDates.AddDatesInPast();
+            };
+            
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+    }
+}

+ 1 - 1
samples/ControlCatalog/Pages/DialogsPage.xaml.cs

@@ -36,7 +36,7 @@ namespace ControlCatalog.Pages
             };
         }
 
-        Window GetWindow() => this.FindControl<CheckBox>("IsModal").IsChecked ? (Window)this.VisualRoot : null;
+        Window GetWindow() => this.FindControl<CheckBox>("IsModal").IsChecked.Value ? (Window)this.VisualRoot : null;
 
         private void InitializeComponent()
         {

+ 19 - 0
samples/ControlCatalog/Pages/DragAndDropPage.xaml

@@ -0,0 +1,19 @@
+<UserControl xmlns="https://github.com/avaloniaui">
+    <StackPanel Orientation="Vertical" Gap="4">
+        <TextBlock Classes="h1">Drag+Drop</TextBlock>
+        <TextBlock Classes="h2">Example of Drag+Drop capabilities</TextBlock>
+
+        <StackPanel Orientation="Horizontal"
+                Margin="0,16,0,0"
+                HorizontalAlignment="Center"
+                Gap="16">
+            <Border BorderBrush="{DynamicResource ThemeAccentBrush}" BorderThickness="2" Padding="16" Name="DragMe">
+                <TextBlock Name="DragState">Drag Me</TextBlock>
+            </Border>
+            <Border Background="{DynamicResource ThemeAccentBrush2}" Padding="16" 
+                    DragDrop.AllowDrop="True">
+                <TextBlock Name="DropState">Drop some text or files here</TextBlock>
+            </Border>
+        </StackPanel>
+    </StackPanel>
+</UserControl>

+ 71 - 0
samples/ControlCatalog/Pages/DragAndDropPage.xaml.cs

@@ -0,0 +1,71 @@
+using Avalonia.Controls;
+using Avalonia.Input.DragDrop;
+using Avalonia.Markup.Xaml;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace ControlCatalog.Pages
+{
+    public class DragAndDropPage : UserControl
+    {
+        private TextBlock _DropState;
+        private TextBlock _DragState;
+        private Border _DragMe;
+        private int DragCount = 0;
+
+        public DragAndDropPage()
+        {
+            this.InitializeComponent();
+
+            _DragMe.PointerPressed += DoDrag;
+
+            AddHandler(DragDrop.DropEvent, Drop);
+            AddHandler(DragDrop.DragOverEvent, DragOver);
+        }
+
+        private async void DoDrag(object sender, Avalonia.Input.PointerPressedEventArgs e)
+        {
+            DataObject dragData = new DataObject();
+            dragData.Set(DataFormats.Text, $"You have dragged text {++DragCount} times");
+
+            var result = await DragDrop.DoDragDrop(dragData, DragDropEffects.Copy);
+            switch(result)
+            {
+                case DragDropEffects.Copy:
+                    _DragState.Text = "The text was copied"; break;
+                case DragDropEffects.Link:
+                    _DragState.Text = "The text was linked"; break;
+                case DragDropEffects.None:
+                    _DragState.Text = "The drag operation was canceled"; break;
+            }
+        }
+
+        private void DragOver(object sender, DragEventArgs e)
+        {
+            // Only allow Copy or Link as Drop Operations.
+            e.DragEffects = e.DragEffects & (DragDropEffects.Copy | DragDropEffects.Link);
+
+            // Only allow if the dragged data contains text or filenames.
+            if (!e.Data.Contains(DataFormats.Text) && !e.Data.Contains(DataFormats.FileNames))
+                e.DragEffects = DragDropEffects.None; 
+        }
+
+        private void Drop(object sender, DragEventArgs e)
+        {
+            if (e.Data.Contains(DataFormats.Text))
+                _DropState.Text = e.Data.GetText();
+            else if (e.Data.Contains(DataFormats.FileNames))
+                _DropState.Text = string.Join(Environment.NewLine, e.Data.GetFileNames());
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+
+            _DropState = this.Find<TextBlock>("DropState");
+            _DragState = this.Find<TextBlock>("DragState");
+            _DragMe = this.Find<Border>("DragMe");
+        }
+    }
+}

+ 80 - 0
samples/ControlCatalog/Pages/NumericUpDownPage.xaml

@@ -0,0 +1,80 @@
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+  <StackPanel Orientation="Vertical" Gap="4">
+    <TextBlock Margin="2" Classes="h1">Numeric up-down control</TextBlock>
+    <TextBlock Margin="2" Classes="h2" TextWrapping="Wrap">Numeric up-down control provides a TextBox with button spinners that allow incrementing and decrementing numeric values by using the spinner buttons, keyboard up/down arrows, or mouse wheel.</TextBlock>
+
+    <TextBlock Margin="2,5,2,2" FontSize="14" FontWeight="Bold">Features:</TextBlock>
+    <Grid Margin="2" ColumnDefinitions="Auto,Auto,Auto,Auto" RowDefinitions="Auto,Auto">
+      <Grid Grid.Row="0" Grid.Column="0" ColumnDefinitions="Auto, Auto" RowDefinitions="35,35,35,35,35">
+        <TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="2">ShowButtonSpinner:</TextBlock>
+        <CheckBox Grid.Row="0" Grid.Column="1" IsChecked="{Binding #upDown.ShowButtonSpinner}" VerticalAlignment="Center" Margin="2"/>
+
+        <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="2">IsReadOnly:</TextBlock>
+        <CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding #upDown.IsReadOnly}" VerticalAlignment="Center" Margin="2"/>
+
+        <TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="2">AllowSpin:</TextBlock>
+        <CheckBox Grid.Row="2" Grid.Column="1" IsChecked="{Binding #upDown.AllowSpin}" IsEnabled="{Binding #upDown.!IsReadOnly}" VerticalAlignment="Center" Margin="2"/>
+
+        <TextBlock Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Margin="2">ClipValueToMinMax:</TextBlock>
+        <CheckBox Grid.Row="3" Grid.Column="1" IsChecked="{Binding #upDown.ClipValueToMinMax}" VerticalAlignment="Center" Margin="2"/>
+
+      </Grid>
+      <Grid Grid.Row="0" Grid.Column="1" Margin="10,2,2,2" ColumnDefinitions="Auto, 120" RowDefinitions="35,35,35,35,35">
+        <TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="2">FormatString:</TextBlock>
+        <DropDown Grid.Row="0" Grid.Column="1" Items="{Binding Formats}" SelectedItem="{Binding SelectedFormat}"
+                  VerticalAlignment="Center" Margin="2">
+          <DropDown.ItemTemplate>
+            <DataTemplate>
+              <StackPanel Orientation="Horizontal" Gap="2">
+                <TextBlock Text="{Binding Name}"/>
+                <TextBlock Text="-"/>
+                <TextBlock Text="{Binding Value}"/>
+              </StackPanel>
+            </DataTemplate>
+          </DropDown.ItemTemplate>
+        </DropDown>
+
+        <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="2">ButtonSpinnerLocation:</TextBlock>
+        <DropDown Grid.Row="1" Grid.Column="1" Items="{Binding SpinnerLocations}" SelectedItem="{Binding #upDown.ButtonSpinnerLocation}"
+                  VerticalAlignment="Center" Margin="2"/>
+
+        <TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="2">CultureInfo:</TextBlock>
+        <DropDown Grid.Row="2" Grid.Column="1" Items="{Binding Cultures}" SelectedItem="{Binding #upDown.CultureInfo}"
+                  VerticalAlignment="Center" Margin="2"/>
+
+        <TextBlock Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Margin="2">Watermark:</TextBlock>
+        <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding #upDown.Watermark}" VerticalAlignment="Center" Margin="2" />
+
+        <TextBlock Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Margin="2">Text:</TextBlock>
+        <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding #upDown.Text}" VerticalAlignment="Center" Margin="2" />
+      </Grid>
+      <Grid Grid.Row="0" Grid.Column="2" Margin="10,2,2,2" RowDefinitions="35,35,35,35,35" ColumnDefinitions="Auto, 120">
+        <TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="10,2,2,2">Minimum:</TextBlock>
+        <NumericUpDown Grid.Row="0" Grid.Column="1" Value="{Binding #upDown.Minimum}"
+                       CultureInfo="{Binding #upDown.CultureInfo}" VerticalAlignment="Center" Height="25" Margin="2" Width="70" HorizontalAlignment="Center"/>
+
+        <TextBlock Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Margin="10,2,2,2">Maximum:</TextBlock>
+        <NumericUpDown Grid.Row="1" Grid.Column="1" Value="{Binding #upDown.Maximum}"
+                       CultureInfo="{Binding #upDown.CultureInfo}" VerticalAlignment="Center" Height="25" Margin="2" Width="70" HorizontalAlignment="Center"/>
+
+        <TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Margin="10,2,2,2">Increment:</TextBlock>
+        <NumericUpDown Grid.Row="2" Grid.Column="1" Value="{Binding #upDown.Increment}" VerticalAlignment="Center"
+                       Height="25" Margin="2" Width="70" HorizontalAlignment="Center"/>
+
+        <TextBlock Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" Margin="10,2,2,2">Value:</TextBlock>
+        <NumericUpDown Grid.Row="3" Grid.Column="1" Value="{Binding #upDown.Value}" VerticalAlignment="Center"
+                       Height="25" Margin="2" Width="70" HorizontalAlignment="Center"/>
+
+      </Grid>
+    </Grid>
+
+    <StackPanel Margin="2,10,2,2" Orientation="Horizontal" Gap="10">
+      <TextBlock FontSize="14" FontWeight="Bold" VerticalAlignment="Center">Usage of NumericUpDown:</TextBlock>
+      <NumericUpDown Name="upDown" Minimum="0" Maximum="10" Increment="0.5"
+                     CultureInfo="en-US" VerticalAlignment="Center" Height="25" Width="100"
+                     Watermark="Enter text" FormatString="{Binding SelectedFormat.Value}"/>
+    </StackPanel>
+
+  </StackPanel>
+</UserControl>

+ 94 - 0
samples/ControlCatalog/Pages/NumericUpDownPage.xaml.cs

@@ -0,0 +1,94 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Primitives;
+using Avalonia.Markup.Xaml;
+using ReactiveUI;
+
+namespace ControlCatalog.Pages
+{
+    public class NumericUpDownPage : UserControl
+    {
+        public NumericUpDownPage()
+        {
+            this.InitializeComponent();
+            var viewModel = new NumbersPageViewModel();
+            DataContext = viewModel;
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+
+    }
+
+    public class NumbersPageViewModel : ReactiveObject
+    {
+        private IList<FormatObject> _formats;
+        private FormatObject _selectedFormat;
+        private IList<Location> _spinnerLocations;
+
+        public NumbersPageViewModel()
+        {
+            SelectedFormat = Formats.FirstOrDefault();
+        }
+
+        public IList<FormatObject> Formats
+        {
+            get
+            {
+                return _formats ?? (_formats = new List<FormatObject>()
+                {
+                    new FormatObject() {Name = "Currency", Value = "C2"},
+                    new FormatObject() {Name = "Fixed point", Value = "F2"},
+                    new FormatObject() {Name = "General", Value = "G"},
+                    new FormatObject() {Name = "Number", Value = "N"},
+                    new FormatObject() {Name = "Percent", Value = "P"},
+                    new FormatObject() {Name = "Degrees", Value = "{0:N2} °"},
+                });
+            }
+        }
+
+        public IList<Location> SpinnerLocations
+        {
+            get
+            {
+                if (_spinnerLocations == null)
+                {
+                    _spinnerLocations = new List<Location>();
+                    foreach (Location value in Enum.GetValues(typeof(Location)))
+                    {
+                        _spinnerLocations.Add(value);
+                    }
+                }
+                return _spinnerLocations ;
+            }
+        }
+
+        public IList<CultureInfo> Cultures { get; } = new List<CultureInfo>()
+        {
+            new CultureInfo("en-US"),
+            new CultureInfo("en-GB"),
+            new CultureInfo("fr-FR"),
+            new CultureInfo("ar-DZ"),
+            new CultureInfo("zh-CN"),
+            new CultureInfo("cs-CZ")
+        };
+
+        public FormatObject SelectedFormat
+        {
+            get { return _selectedFormat; }
+            set { this.RaiseAndSetIfChanged(ref _selectedFormat, value); }
+        }
+    }
+
+    public class FormatObject
+    {
+        public string Value { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 18 - 6
samples/ControlCatalog/Pages/RadioButtonPage.xaml

@@ -1,15 +1,27 @@
-<UserControl xmlns="https://github.com/avaloniaui">
+<UserControl xmlns="https://github.com/avaloniaui"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <StackPanel Orientation="Vertical" Gap="4">
     <TextBlock Classes="h1">RadioButton</TextBlock>
     <TextBlock Classes="h2">Allows the selection of a single option of many</TextBlock>
 
-    <StackPanel Orientation="Vertical"
+    <StackPanel Orientation="Horizontal"
                 Margin="0,16,0,0"
                 HorizontalAlignment="Center"
                 Gap="16">
-      <RadioButton IsChecked="True">Option 1</RadioButton>
-      <RadioButton>Option 2</RadioButton>
-      <RadioButton IsEnabled="False">Disabled</RadioButton>
-    </StackPanel>    
+      <StackPanel Orientation="Vertical"
+                  Gap="16">
+        <RadioButton IsChecked="True">Option 1</RadioButton>
+        <RadioButton>Option 2</RadioButton>
+        <RadioButton IsChecked="{x:Null}">Option 3</RadioButton>
+        <RadioButton IsEnabled="False">Disabled</RadioButton>
+      </StackPanel>
+      <StackPanel Orientation="Vertical"
+                  Gap="16">
+        <RadioButton IsChecked="True" IsThreeState="True">Three States: Option 1</RadioButton>
+        <RadioButton IsChecked="False" IsThreeState="True">Three States: Option 2</RadioButton>
+        <RadioButton IsChecked="{x:Null}" IsThreeState="True">Three States: Option 3</RadioButton>
+        <RadioButton IsChecked="{x:Null}" IsThreeState="True" IsEnabled="False">Disabled</RadioButton>
+      </StackPanel>
+    </StackPanel>
   </StackPanel>
 </UserControl>

+ 0 - 36
samples/ControlCatalog/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-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")]

+ 3 - 3
samples/ControlCatalog/SideBar.xaml

@@ -1,11 +1,11 @@
-<Styles xmlns="https://github.com/avaloniaui">
+<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <Style Selector="TabControl.sidebar">
     <Setter Property="Template">
       <ControlTemplate>
         <DockPanel>
           <ScrollViewer MinWidth="190" Background="{DynamicResource ThemeAccentBrush}" DockPanel.Dock="Left">
             <TabStrip Name="PART_TabStrip"
-                      MemberSelector="{Static TabControl.HeaderSelector}"
+                      MemberSelector="{x:Static TabControl.HeaderSelector}"
                       Items="{TemplateBinding Items}"
                       SelectedIndex="{TemplateBinding Path=SelectedIndex, Mode=TwoWay}">
               <TabStrip.ItemsPanel>
@@ -17,7 +17,7 @@
           </ScrollViewer>
           <Carousel Name="PART_Content"
                     Margin="8 0 0 0"
-                    MemberSelector="{Static TabControl.ContentSelector}"
+                    MemberSelector="{x:Static TabControl.ContentSelector}"
                     Items="{TemplateBinding Items}"
                     SelectedIndex="{TemplateBinding Path=SelectedIndex}"
                     Transition="{TemplateBinding Transition}"

+ 6 - 0
samples/Previewer/App.xaml

@@ -0,0 +1,6 @@
+<Application xmlns="https://github.com/avaloniaui">
+    <Application.Styles>
+        <StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
+        <StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/>
+    </Application.Styles>
+</Application>

+ 14 - 0
samples/Previewer/App.xaml.cs

@@ -0,0 +1,14 @@
+using Avalonia;
+using Avalonia.Markup.Xaml;
+
+namespace Previewer
+{
+    public class App : Application
+    {
+        public override void Initialize()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+    }
+
+}

+ 19 - 0
samples/Previewer/Center.cs

@@ -0,0 +1,19 @@
+using Avalonia;
+using Avalonia.Controls;
+
+namespace Previewer
+{
+    public class Center : Decorator
+    {
+        protected override Size ArrangeOverride(Size finalSize)
+        {
+            if (Child != null)
+            {
+                var desired = Child.DesiredSize;
+                Child.Arrange(new Rect((finalSize.Width - desired.Width) / 2, (finalSize.Height - desired.Height) / 2,
+                    desired.Width, desired.Height));
+            }
+            return finalSize;
+        }
+    }
+}

+ 12 - 0
samples/Previewer/MainWindow.xaml

@@ -0,0 +1,12 @@
+<Window xmlns="https://github.com/avaloniaui" Width="600" Height="500"
+        Title="Previewer">
+    <Grid RowDefinitions="0.5*,200">
+        <ScrollViewer Name="Remote"/>
+        
+        <ScrollViewer Name="ErrorsContainer" Background="#ffe0e0">
+            <TextBlock Name="Errors"/>
+        </ScrollViewer>
+        <TextBox Grid.Row="1" AcceptsReturn="True" Name="Xaml"/>
+    </Grid>
+    
+</Window>

+ 86 - 0
samples/Previewer/MainWindow.xaml.cs

@@ -0,0 +1,86 @@
+using System;
+using System.Net;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Remote;
+using Avalonia.Markup.Xaml;
+using Avalonia.Remote.Protocol;
+using Avalonia.Remote.Protocol.Designer;
+using Avalonia.Remote.Protocol.Viewport;
+using Avalonia.Threading;
+
+namespace Previewer
+{
+    public class MainWindow : Window
+    {
+        private const string InitialXaml = @"<Window xmlns=""https://github.com/avaloniaui"" Width=""600"" Height=""500"">
+        <TextBlock>Hello world!</TextBlock>
+    
+        </Window>";
+        private IAvaloniaRemoteTransportConnection _connection;
+        private Control _errorsContainer;
+        private TextBlock _errors;
+        private RemoteWidget _remote;
+
+
+        public MainWindow()
+        {
+            this.InitializeComponent();
+            var tb = this.FindControl<TextBox>("Xaml");
+            tb.Text = InitialXaml;
+            var scroll = this.FindControl<ScrollViewer>("Remote");
+            var rem = new Center();
+            scroll.Content = rem;
+            _errorsContainer = this.FindControl<Control>("ErrorsContainer");
+            _errors = this.FindControl<TextBlock>("Errors");
+            tb.GetObservable(TextBox.TextProperty).Subscribe(text => _connection?.Send(new UpdateXamlMessage
+            {
+                Xaml = text
+            }));
+            new BsonTcpTransport().Listen(IPAddress.Loopback, 25000, t =>
+            {
+                Dispatcher.UIThread.Post(() =>
+                {
+                    if (_connection != null)
+                    {
+                        _connection.Dispose();
+                        _connection.OnMessage -= OnMessage;
+                    }
+                    _connection = t;
+                    rem.Child = _remote = new RemoteWidget(t);
+                    t.Send(new UpdateXamlMessage
+                    {
+                        Xaml = tb.Text
+                    });
+                    
+                    t.OnMessage += OnMessage;
+                });
+            });
+            Title = "Listening on 127.0.0.1:25000";
+        }
+
+        private void OnMessage(IAvaloniaRemoteTransportConnection transport, object obj)
+        {
+            Dispatcher.UIThread.Post(() =>
+            {
+                if (transport != _connection)
+                    return;
+                if (obj is UpdateXamlResultMessage result)
+                {
+                    _errorsContainer.IsVisible = result.Error != null;
+                    _errors.Text = result.Error ?? "";
+                }
+                if (obj is RequestViewportResizeMessage resize)
+                {
+                    _remote.Width = Math.Min(4096, Math.Max(resize.Width, 1));
+                    _remote.Height = Math.Min(4096, Math.Max(resize.Height, 1));
+                }
+            });
+        }
+
+        private void InitializeComponent()
+        {
+            AvaloniaXamlLoader.Load(this);
+        }
+    }
+}

+ 27 - 0
samples/Previewer/Previewer.csproj

@@ -0,0 +1,27 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Update="**\*.xaml.cs">
+      <DependentUpon>%(Filename)</DependentUpon>
+    </Compile>
+    <EmbeddedResource Include="**\*.xaml" />
+    <ProjectReference Include="..\..\src\Avalonia.DotNetCoreRuntime\Avalonia.DotNetCoreRuntime.csproj" />
+    <ProjectReference Include="..\..\src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj" />
+    <ProjectReference Include="..\..\src\Markup\Avalonia.Markup\Avalonia.Markup.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Animation\Avalonia.Animation.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Base\Avalonia.Base.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Controls\Avalonia.Controls.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.HtmlRenderer\Avalonia.HtmlRenderer.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
+  </ItemGroup>
+</Project>

+ 13 - 0
samples/Previewer/Program.cs

@@ -0,0 +1,13 @@
+using System;
+using Avalonia;
+
+namespace Previewer
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            AppBuilder.Configure<App>().UsePlatformDetect().Start<MainWindow>();
+        }
+    }
+}

+ 53 - 0
samples/RemoteTest/Program.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Remote;
+using Avalonia.Remote.Protocol;
+using Avalonia.Threading;
+using ControlCatalog;
+
+namespace RemoteTest
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            AppBuilder.Configure<App>().UsePlatformDetect().SetupWithoutStarting();
+
+            var l = new TcpListener(IPAddress.Loopback, 0);
+            l.Start();
+            var port = ((IPEndPoint) l.LocalEndpoint).Port;
+            l.Stop();
+            
+            var transport = new BsonTcpTransport();
+            transport.Listen(IPAddress.Loopback, port, sc =>
+            {
+                Dispatcher.UIThread.Post(() =>
+                {
+                    new RemoteServer(sc).Content = new MainView();
+                });
+            });
+
+            var cts = new CancellationTokenSource();
+            transport.Connect(IPAddress.Loopback, port).ContinueWith(t =>
+            {
+                Dispatcher.UIThread.Post(() =>
+                {
+                    var window = new Window()
+                    {
+                        Content = new RemoteWidget(t.Result)
+                    };
+                    window.Closed += delegate { cts.Cancel(); };
+                    window.Show();
+                });
+            });
+            Dispatcher.UIThread.MainLoop(cts.Token);
+
+
+
+        }
+    }
+}

+ 25 - 0
samples/RemoteTest/RemoteTest.csproj

@@ -0,0 +1,25 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\..\src\Avalonia.Animation\Avalonia.Animation.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Base\Avalonia.Base.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Controls\Avalonia.Controls.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.DotNetCoreRuntime\Avalonia.DotNetCoreRuntime.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Input\Avalonia.Input.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Interactivity\Avalonia.Interactivity.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Layout\Avalonia.Layout.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Styling\Avalonia.Styling.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
+    <ProjectReference Include="..\..\src\Avalonia.Visuals\Avalonia.Visuals.csproj" />
+    <ProjectReference Include="..\..\src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj" />
+    <ProjectReference Include="..\..\src\Markup\Avalonia.Markup\Avalonia.Markup.csproj" />
+    <ProjectReference Include="..\ControlCatalog\ControlCatalog.csproj" />
+  </ItemGroup>
+
+</Project>

+ 1 - 1
samples/RenderTest/App.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
     </startup>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

+ 1 - 13
samples/RenderTest/Program.cs

@@ -12,25 +12,13 @@ namespace RenderTest
     {
         static void Main(string[] args)
         {
-            InitializeLogging();
-
             // TODO: Make this work with GTK/Skia/Cairo depending on command-line args
             // again.
             AppBuilder.Configure<App>()
                 .UsePlatformDetect()
                 .UseReactiveUI()
+                .LogToDebug()
                 .Start<MainWindow>();
         }
-
-        // This will be made into a runtime configuration extension soon!
-        private static void InitializeLogging()
-        {
-#if DEBUG
-            SerilogLogger.Initialize(new LoggerConfiguration()
-                .MinimumLevel.Warning()
-                .WriteTo.Trace(outputTemplate: "{Area}: {Message}")
-                .CreateLogger());
-#endif
-        }
     }
 }

+ 1 - 3
samples/RenderTest/RenderTest.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>RenderTest</RootNamespace>
     <AssemblyName>RenderTest</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <TargetFrameworkProfile />
@@ -180,8 +180,6 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\..\build\Serilog.props" />
-  <Import Project="..\..\build\Serilog.Sinks.Trace.props" />
-  <Import Project="..\..\build\Splat.props" />
   <Import Project="..\..\build\Rx.props" />
   <Import Project="..\..\build\ReactiveUI.props" />
 </Project>

+ 3 - 3
samples/RenderTest/SideBar.xaml

@@ -1,11 +1,11 @@
-<Styles xmlns="https://github.com/avaloniaui">
+<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
   <Style Selector="TabControl.sidebar">
     <Setter Property="Template">
       <ControlTemplate>
         <DockPanel>
           <ScrollViewer MinWidth="190" Background="{DynamicResource ThemeAccentBrush}" DockPanel.Dock="Left">
             <TabStrip Name="PART_TabStrip"
-                      MemberSelector="{Static TabControl.HeaderSelector}"
+                      MemberSelector="{x:Static TabControl.HeaderSelector}"
                       Items="{TemplateBinding Items}"
                       SelectedIndex="{TemplateBinding Path=SelectedIndex, Mode=TwoWay}">
               <TabStrip.ItemsPanel>
@@ -17,7 +17,7 @@
           </ScrollViewer>
           <Carousel Name="PART_Content"
                     Margin="8 0 0 0"
-                    MemberSelector="{Static TabControl.ContentSelector}"
+                    MemberSelector="{x:Static TabControl.ContentSelector}"
                     Items="{TemplateBinding Items}"
                     SelectedIndex="{TemplateBinding Path=SelectedIndex}"
                     Transition="{TemplateBinding Transition}"

+ 1 - 1
samples/VirtualizationTest/App.config

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/>
     </startup>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

+ 10 - 2
samples/VirtualizationTest/MainWindow.xaml

@@ -21,6 +21,12 @@
             <TextBox Watermark="Viewport"
                      UseFloatingWatermark="True"
                      Text="{Binding #listBox.Scroll.Viewport, Mode=OneWay}"/>
+            <TextBlock>Horiz. ScrollBar</TextBlock>
+            <DropDown Items="{Binding ScrollBarVisibilities}"
+                      SelectedItem="{Binding HorizontalScrollBarVisibility}"/>
+            <TextBlock>Vert. ScrollBar</TextBlock>
+            <DropDown Items="{Binding ScrollBarVisibilities}"
+                      SelectedItem="{Binding VerticalScrollBarVisibility}"/>
             <TextBox Watermark="Item to Create"
                      UseFloatingWatermark="True"
                      Text="{Binding NewItemString}"/>
@@ -35,7 +41,9 @@
                  Items="{Binding Items}" 
                  SelectedItems="{Binding SelectedItems}"
                  SelectionMode="Multiple"
-                 VirtualizationMode="{Binding VirtualizationMode}">
+                 VirtualizationMode="{Binding VirtualizationMode}"
+                 ScrollViewer.HorizontalScrollBarVisibility="{Binding HorizontalScrollBarVisibility, Mode=TwoWay}"
+                 ScrollViewer.VerticalScrollBarVisibility="{Binding VerticalScrollBarVisibility, Mode=TwoWay}">
             <ListBox.ItemsPanel>
                 <ItemsPanelTemplate>
                     <VirtualizingStackPanel Orientation="{Binding Orientation}"/>
@@ -43,7 +51,7 @@
             </ListBox.ItemsPanel>
             <ListBox.ItemTemplate>
                 <DataTemplate>
-                    <TextBlock Text="{Binding Header}"/>
+                    <TextBlock Text="{Binding Header}" TextWrapping="Wrap"/>
                 </DataTemplate>
             </ListBox.ItemTemplate>
         </ListBox>

+ 1 - 12
samples/VirtualizationTest/Program.cs

@@ -13,22 +13,11 @@ namespace VirtualizationTest
     {
         static void Main(string[] args)
         {
-            InitializeLogging();
-
             AppBuilder.Configure<App>()
                .UsePlatformDetect()
                .UseReactiveUI()
+               .LogToDebug()
                .Start<MainWindow>();
         }
-
-        private static void InitializeLogging()
-        {
-#if DEBUG
-            SerilogLogger.Initialize(new LoggerConfiguration()
-                .MinimumLevel.Warning()
-                .WriteTo.Trace(outputTemplate: "{Area}: {Message}")
-                .CreateLogger());
-#endif
-        }
     }
 }

+ 19 - 1
samples/VirtualizationTest/ViewModels/MainWindowViewModel.cs

@@ -6,6 +6,7 @@ using System.Collections.Generic;
 using System.Linq;
 using Avalonia.Collections;
 using Avalonia.Controls;
+using Avalonia.Controls.Primitives;
 using ReactiveUI;
 
 namespace VirtualizationTest.ViewModels
@@ -17,7 +18,9 @@ namespace VirtualizationTest.ViewModels
         private int _newItemIndex;
         private IReactiveList<ItemViewModel> _items;
         private string _prefix = "Item";
-        private Orientation _orientation;
+        private ScrollBarVisibility _horizontalScrollBarVisibility = ScrollBarVisibility.Auto;
+        private ScrollBarVisibility _verticalScrollBarVisibility = ScrollBarVisibility.Auto;
+        private Orientation _orientation = Orientation.Vertical;
         private ItemVirtualizationMode _virtualizationMode = ItemVirtualizationMode.Simple;
 
         public MainWindowViewModel()
@@ -64,6 +67,21 @@ namespace VirtualizationTest.ViewModels
         public IEnumerable<Orientation> Orientations =>
             Enum.GetValues(typeof(Orientation)).Cast<Orientation>();
 
+        public ScrollBarVisibility HorizontalScrollBarVisibility
+        {
+            get { return _horizontalScrollBarVisibility; }
+            set { this.RaiseAndSetIfChanged(ref _horizontalScrollBarVisibility, value); }
+        }
+
+        public ScrollBarVisibility VerticalScrollBarVisibility
+        {
+            get { return _verticalScrollBarVisibility; }
+            set { this.RaiseAndSetIfChanged(ref _verticalScrollBarVisibility, value); }
+        }
+
+        public IEnumerable<ScrollBarVisibility> ScrollBarVisibilities =>
+            Enum.GetValues(typeof(ScrollBarVisibility)).Cast<ScrollBarVisibility>();
+
         public ItemVirtualizationMode VirtualizationMode
         {
             get { return _virtualizationMode; }

+ 1 - 3
samples/VirtualizationTest/VirtualizationTest.csproj

@@ -9,7 +9,7 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>VirtualizationTest</RootNamespace>
     <AssemblyName>VirtualizationTest</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <TargetFrameworkProfile />
@@ -147,8 +147,6 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="..\..\build\Serilog.props" />
-  <Import Project="..\..\build\Serilog.Sinks.Trace.props" />
-  <Import Project="..\..\build\Splat.props" />
   <Import Project="..\..\build\Rx.props" />
   <Import Project="..\..\build\ReactiveUI.props" />
 </Project>

+ 3 - 3
samples/interop/Direct3DInteropSample/Direct3DInteropSample.csproj

@@ -17,7 +17,9 @@
       <None Remove="MiniCube.fx" />
     </ItemGroup>
     <ItemGroup>
-      <EmbeddedResource Include="MiniCube.fx" />
+      <EmbeddedResource Include="MiniCube.fx">
+        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      </EmbeddedResource>
     </ItemGroup>
     <ItemGroup>
         <ProjectReference Include="..\..\..\src\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj" />
@@ -28,7 +30,5 @@
         <ProjectReference Include="..\..\..\src\Windows\Avalonia.Win32\Avalonia.Win32.csproj" />
     </ItemGroup>
     <Import Project="..\..\..\build\Serilog.props" />
-    <Import Project="..\..\..\build\Serilog.Sinks.Trace.props" />
-    <Import Project="..\..\..\build\Splat.props" />
     <Import Project="..\..\..\build\Rx.props" />
 </Project>

Some files were not shown because too many files changed in this diff