diff --git a/.editorconfig b/.editorconfig
index 64fe33bbae..b7a03207a4 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,11 +1,159 @@
-; This file is for unifying the coding style for different editors and IDEs.
-; More information at http://EditorConfig.org
+# editorconfig.org
+# top-most EditorConfig file
root = true
+# Default settings:
+# A newline ending every file
+# Use 4 spaces as indentation
[*]
-end_of_line = CRLF
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+# C# files
[*.cs]
-indent_style = space
+# New line preferences
+csharp_new_line_before_open_brace = all
+csharp_new_line_before_else = true
+csharp_new_line_before_catch = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_between_query_expression_clauses = true
+
+# Indentation preferences
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_switch_labels = true
+csharp_indent_labels = one_less_than_current
+
+# avoid this. unless absolutely necessary
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+# prefer var
+csharp_style_var_for_built_in_types = true
+csharp_style_var_when_type_is_apparent = true
+csharp_style_var_elsewhere = true:suggestion
+
+# use language keywords instead of BCL types
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# name all constant fields using PascalCase
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+
+# static fields should have s_ prefix
+dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
+dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
+dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
+
+dotnet_naming_symbols.static_fields.applicable_kinds = field
+dotnet_naming_symbols.static_fields.required_modifiers = static
+
+dotnet_naming_style.static_prefix_style.required_prefix = s_
+dotnet_naming_style.static_prefix_style.capitalization = camel_case
+
+# internal and private fields should be _camelCase
+dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
+dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
+dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
+
+dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
+dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
+
+dotnet_naming_style.camel_case_underscore_style.required_prefix = _
+dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
+
+# use accessibility modifiers
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
+
+# Code style defaults
+dotnet_sort_system_directives_first = true
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = false
+
+# Expression-level preferences
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+
+# Expression-bodied members
+csharp_style_expression_bodied_methods = false:none
+csharp_style_expression_bodied_constructors = false:none
+csharp_style_expression_bodied_operators = false:none
+csharp_style_expression_bodied_properties = true:none
+csharp_style_expression_bodied_indexers = true:none
+csharp_style_expression_bodied_accessors = true:none
+
+# Pattern matching
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+
+# Null checking preferences
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
+
+# Space preferences
+csharp_space_after_cast = false
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_after_comma = true
+csharp_space_after_dot = false
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_after_semicolon_in_for_statement = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_around_declaration_statements = do_not_ignore
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_before_comma = false
+csharp_space_before_dot = false
+csharp_space_before_open_square_brackets = false
+csharp_space_before_semicolon_in_for_statement = false
+csharp_space_between_empty_square_brackets = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_parentheses = false
+csharp_space_between_square_brackets = false
+
+# Xaml files
+[*.xaml]
indent_size = 4
+
+# Xml project files
+[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
+indent_size = 2
+
+# Xml build files
+[*.builds]
+indent_size = 2
+
+# Xml files
+[*.{xml,stylecop,resx,ruleset}]
+indent_size = 2
+
+# Xml config files
+[*.{props,targets,config,nuspec}]
+indent_size = 2
+
+# Shell scripts
+[*.sh]
+end_of_line = lf
+[*.{cmd, bat}]
+end_of_line = crlf
diff --git a/.gitignore b/.gitignore
index a9a8fd36b4..32acee4c90 100644
--- a/.gitignore
+++ b/.gitignore
@@ -165,6 +165,11 @@ $RECYCLE.BIN/
#################
.idea
+#################
+## VS Code
+#################
+.vscode/
+
#################
## Cake
#################
@@ -176,5 +181,9 @@ nuget
Avalonia.XBuild.sln
project.lock.json
.idea/*
-**/obj-Skia/*
-**/obj-Direct2D1/*
+
+
+##################
+## BenchmarkDotNet
+##################
+BenchmarkDotNet.Artifacts/
diff --git a/.ncrunch/Avalonia.Designer.HostApp.NetFX.v3.ncrunchproject b/.ncrunch/Avalonia.Designer.HostApp.NetFX.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/Avalonia.Designer.HostApp.NetFX.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/BindingDemo.net461.v3.ncrunchproject b/.ncrunch/BindingDemo.net461.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/BindingDemo.net461.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/BindingDemo.netcoreapp2.0.v3.ncrunchproject b/.ncrunch/BindingDemo.netcoreapp2.0.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/BindingDemo.netcoreapp2.0.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/Previewer.v3.ncrunchproject b/.ncrunch/Previewer.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/Previewer.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/RemoteDemo.v3.ncrunchproject b/.ncrunch/RemoteDemo.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/RemoteDemo.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/RenderDemo.net461.v3.ncrunchproject b/.ncrunch/RenderDemo.net461.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/RenderDemo.net461.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/RenderDemo.netcoreapp2.0.v3.ncrunchproject b/.ncrunch/RenderDemo.netcoreapp2.0.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/RenderDemo.netcoreapp2.0.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/VirtualizationDemo.net461.v3.ncrunchproject b/.ncrunch/VirtualizationDemo.net461.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/VirtualizationDemo.net461.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/.ncrunch/VirtualizationDemo.netcoreapp2.0.v3.ncrunchproject b/.ncrunch/VirtualizationDemo.netcoreapp2.0.v3.ncrunchproject
new file mode 100644
index 0000000000..319cd523ce
--- /dev/null
+++ b/.ncrunch/VirtualizationDemo.netcoreapp2.0.v3.ncrunchproject
@@ -0,0 +1,5 @@
+
+
+ True
+
+
\ No newline at end of file
diff --git a/Avalonia.sln b/Avalonia.sln
index 39396f3ab8..d1c5026e58 100644
--- a/Avalonia.sln
+++ b/Avalonia.sln
@@ -58,6 +58,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B9E
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A689DEF5-D50F-4975-8B72-124C9EB54066}"
ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
src\Shared\SharedAssemblyInfo.cs = src\Shared\SharedAssemblyInfo.cs
EndProjectSection
EndProject
@@ -398,6 +399,7 @@ Global
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|NetCoreOnly.ActiveCfg = Debug|Any CPU
+ {3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|NetCoreOnly.Build.0 = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|x86.ActiveCfg = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|x86.Build.0 = Debug|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -407,6 +409,7 @@ Global
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|NetCoreOnly.ActiveCfg = Release|Any CPU
+ {3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|NetCoreOnly.Build.0 = Release|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|x86.ActiveCfg = Release|Any CPU
{3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|x86.Build.0 = Release|Any CPU
{62024B2D-53EB-4638-B26B-85EEAA54866E}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/build.cake b/build.cake
index 561a33186a..78c166a3bc 100644
--- a/build.cake
+++ b/build.cake
@@ -6,6 +6,7 @@
#addin "nuget:?package=NuGet.Core&version=2.14.0"
#tool "nuget:?package=NuGet.CommandLine&version=4.3.0"
#tool "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2017.1.20170613.162720"
+
///////////////////////////////////////////////////////////////////////////////
// TOOLS
///////////////////////////////////////////////////////////////////////////////
@@ -98,7 +99,7 @@ Teardown((context, buildContext) =>
// TASKS
///////////////////////////////////////////////////////////////////////////////
-Task("Clean")
+Task("Clean-Impl")
.Does(data =>
{
CleanDirectories(data.Parameters.BuildDirs);
@@ -108,9 +109,9 @@ Task("Clean")
CleanDirectory(data.Parameters.BinRoot);
});
-Task("Restore-NuGet-Packages")
- .IsDependentOn("Clean")
+Task("Restore-NuGet-Packages-Impl")
.WithCriteria((context, data) => data.Parameters.IsRunningOnWindows)
+ .WithCriteria((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does(data =>
{
var maxRetryCount = 5;
@@ -148,11 +149,10 @@ void DotNetCoreBuild(Parameters parameters)
DotNetCoreBuild(parameters.MSBuildSolution, settings);
}
-Task("Build")
- .IsDependentOn("Restore-NuGet-Packages")
+Task("Build-Impl")
.Does(data =>
{
- if(data.Parameters.IsRunningOnWindows)
+ if(data.Parameters.IsRunningOnWindows && !data.Parameters.IsPlatformNetCoreOnly)
{
MSBuild(data.Parameters.MSBuildSolution, settings => {
settings.SetConfiguration(data.Parameters.Configuration);
@@ -171,7 +171,6 @@ Task("Build")
}
});
-
void RunCoreTest(string project, Parameters parameters, bool coreOnly = false)
{
if(!project.EndsWith(".csproj"))
@@ -194,94 +193,91 @@ void RunCoreTest(string project, Parameters parameters, bool coreOnly = false)
}
}
-Task("Run-Unit-Tests")
- .IsDependentOn("Build")
+Task("Run-Unit-Tests-Impl")
.WithCriteria((context, data) => !data.Parameters.SkipTests)
- .Does(data => {
- RunCoreTest("./tests/Avalonia.Base.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Controls.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Input.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Interactivity.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Layout.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Markup.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Markup.Xaml.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Styling.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Visuals.UnitTests", data.Parameters, false);
- RunCoreTest("./tests/Avalonia.Skia.UnitTests", data.Parameters, false);
- if (data.Parameters.IsRunningOnWindows)
- {
- RunCoreTest("./tests/Avalonia.Direct2D1.UnitTests", data.Parameters, true);
- }
- });
+ .Does(data =>
+{
+ RunCoreTest("./tests/Avalonia.Base.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Controls.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Input.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Interactivity.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Layout.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Markup.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Markup.Xaml.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Styling.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Visuals.UnitTests", data.Parameters, false);
+ RunCoreTest("./tests/Avalonia.Skia.UnitTests", data.Parameters, false);
+ if (data.Parameters.IsRunningOnWindows && !data.Parameters.IsPlatformNetCoreOnly)
+ {
+ RunCoreTest("./tests/Avalonia.Direct2D1.UnitTests", data.Parameters, true);
+ }
+});
-Task("Run-Designer-Tests")
- .IsDependentOn("Build")
+Task("Run-Designer-Tests-Impl")
.WithCriteria((context, data) => !data.Parameters.SkipTests)
- .Does(data => {
- RunCoreTest("./tests/Avalonia.DesignerSupport.Tests", data.Parameters, false);
- });
+ .Does(data =>
+{
+ RunCoreTest("./tests/Avalonia.DesignerSupport.Tests", data.Parameters, false);
+});
-Task("Run-Render-Tests")
- .IsDependentOn("Build")
- .WithCriteria((context, data) => !data.Parameters.SkipTests && data.Parameters.IsRunningOnWindows)
- .Does(data => {
- RunCoreTest("./tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj", data.Parameters, true);
- RunCoreTest("./tests/Avalonia.Direct2D1.RenderTests/Avalonia.Direct2D1.RenderTests.csproj", data.Parameters, true);
- });
+Task("Run-Render-Tests-Impl")
+ .WithCriteria((context, data) => !data.Parameters.SkipTests)
+ .WithCriteria((context, data) => data.Parameters.IsRunningOnWindows)
+ .WithCriteria((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
+ .Does(data =>
+{
+ RunCoreTest("./tests/Avalonia.Skia.RenderTests/Avalonia.Skia.RenderTests.csproj", data.Parameters, true);
+ RunCoreTest("./tests/Avalonia.Direct2D1.RenderTests/Avalonia.Direct2D1.RenderTests.csproj", data.Parameters, true);
+});
-Task("Run-Leak-Tests")
- .WithCriteria((context, data) => !data.Parameters.SkipTests && data.Parameters.IsRunningOnWindows)
- .IsDependentOn("Build")
+Task("Run-Leak-Tests-Impl")
+ .WithCriteria((context, data) => !data.Parameters.SkipTests)
+ .WithCriteria((context, data) => data.Parameters.IsRunningOnWindows)
+ .WithCriteria((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does(() =>
+{
+ var dotMemoryUnit = Context.Tools.Resolve("dotMemoryUnit.exe");
+ var leakTestsExitCode = StartProcess(dotMemoryUnit, new ProcessSettings
{
- var dotMemoryUnit = Context.Tools.Resolve("dotMemoryUnit.exe");
- var leakTestsExitCode = StartProcess(dotMemoryUnit, new ProcessSettings
- {
- Arguments = new ProcessArgumentBuilder()
- .Append(Context.Tools.Resolve("xunit.console.x86.exe").FullPath)
- .Append("--propagate-exit-code")
- .Append("--")
- .Append("tests\\Avalonia.LeakTests\\bin\\Release\\net461\\Avalonia.LeakTests.dll"),
- Timeout = 120000
- });
-
- if (leakTestsExitCode != 0)
- {
- throw new Exception("Leak Tests failed");
- }
+ Arguments = new ProcessArgumentBuilder()
+ .Append(Context.Tools.Resolve("xunit.console.x86.exe").FullPath)
+ .Append("--propagate-exit-code")
+ .Append("--")
+ .Append("tests\\Avalonia.LeakTests\\bin\\Release\\net461\\Avalonia.LeakTests.dll"),
+ Timeout = 120000
});
-Task("Run-Tests")
- .IsDependentOn("Run-Unit-Tests")
- .IsDependentOn("Run-Render-Tests")
- .IsDependentOn("Run-Designer-Tests")
- .IsDependentOn("Run-Leak-Tests");
+ if (leakTestsExitCode != 0)
+ {
+ throw new Exception("Leak Tests failed");
+ }
+});
-Task("Copy-Files")
- .IsDependentOn("Run-Tests")
+Task("Copy-Files-Impl")
.Does(data =>
{
CopyFiles(data.Packages.BinFiles, data.Parameters.BinRoot);
});
-Task("Zip-Files")
- .IsDependentOn("Copy-Files")
+Task("Zip-Files-Impl")
.Does(data =>
{
Zip(data.Parameters.BinRoot, data.Parameters.ZipCoreArtifacts);
- Zip(data.Parameters.ZipSourceControlCatalogDesktopDirs,
- data.Parameters.ZipTargetControlCatalogDesktopDirs,
- GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dll") +
- GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.config") +
- GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.so") +
- GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dylib") +
- GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.exe"));
+ Zip(data.Parameters.NugetRoot, data.Parameters.ZipNuGetArtifacts);
+
+ if (!data.Parameters.IsPlatformNetCoreOnly) {
+ Zip(data.Parameters.ZipSourceControlCatalogDesktopDirs,
+ data.Parameters.ZipTargetControlCatalogDesktopDirs,
+ GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dll") +
+ GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.config") +
+ GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.so") +
+ GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.dylib") +
+ GetFiles(data.Parameters.ZipSourceControlCatalogDesktopDirs.FullPath + "/*.exe"));
+ }
});
-Task("Create-NuGet-Packages")
- .IsDependentOn("Run-Tests")
- .IsDependentOn("Inspect")
+Task("Create-NuGet-Packages-Impl")
.Does(data =>
{
foreach(var nuspec in data.Packages.NuspecNuGetSettings)
@@ -290,8 +286,7 @@ Task("Create-NuGet-Packages")
}
});
-Task("Publish-MyGet")
- .IsDependentOn("Create-NuGet-Packages")
+Task("Publish-MyGet-Impl")
.WithCriteria((context, data) => !data.Parameters.IsLocalBuild)
.WithCriteria((context, data) => !data.Parameters.IsPullRequest)
.WithCriteria((context, data) => data.Parameters.IsMainRepo)
@@ -324,8 +319,7 @@ Task("Publish-MyGet")
Information("Publish-MyGet Task failed, but continuing with next Task...");
});
-Task("Publish-NuGet")
- .IsDependentOn("Create-NuGet-Packages")
+Task("Publish-NuGet-Impl")
.WithCriteria((context, data) => !data.Parameters.IsLocalBuild)
.WithCriteria((context, data) => !data.Parameters.IsPullRequest)
.WithCriteria((context, data) => data.Parameters.IsMainRepo)
@@ -357,54 +351,67 @@ Task("Publish-NuGet")
Information("Publish-NuGet Task failed, but continuing with next Task...");
});
-Task("Inspect")
+Task("Inspect-Impl")
.WithCriteria((context, data) => data.Parameters.IsRunningOnWindows)
- .IsDependentOn("Restore-NuGet-Packages")
+ .WithCriteria((context, data) => !data.Parameters.IsPlatformNetCoreOnly)
.Does(() =>
- {
- var badIssues = new []{"PossibleNullReferenceException"};
- var whitelist = new []{"tests", "src\\android", "src\\ios",
- "src\\markup\\avalonia.markup.xaml\\portablexaml\\portable.xaml.github"};
- Information("Running code inspections");
-
- var exitCode = StartProcess(Context.Tools.Resolve("inspectcode.exe"),
- new ProcessSettings
- {
- Arguments = "--output=artifacts\\inspectcode.xml --profile=Avalonia.sln.DotSettings Avalonia.sln",
- RedirectStandardOutput = true
- });
+{
+ var badIssues = new []{"PossibleNullReferenceException"};
+ var whitelist = new []{"tests", "src\\android", "src\\ios",
+ "src\\markup\\avalonia.markup.xaml\\portablexaml\\portable.xaml.github"};
+ Information("Running code inspections");
+
+ var exitCode = StartProcess(Context.Tools.Resolve("inspectcode.exe"),
+ new ProcessSettings
+ {
+ Arguments = "--output=artifacts\\inspectcode.xml --profile=Avalonia.sln.DotSettings Avalonia.sln",
+ RedirectStandardOutput = true
+ });
- Information("Analyzing report");
- var doc = XDocument.Parse(System.IO.File.ReadAllText("artifacts\\inspectcode.xml"));
- var failBuild = false;
- foreach(var xml in doc.Descendants("Issue"))
+ Information("Analyzing report");
+ var doc = XDocument.Parse(System.IO.File.ReadAllText("artifacts\\inspectcode.xml"));
+ var failBuild = false;
+ foreach(var xml in doc.Descendants("Issue"))
+ {
+ var typeId = xml.Attribute("TypeId").Value.ToString();
+ if(badIssues.Contains(typeId))
{
- var typeId = xml.Attribute("TypeId").Value.ToString();
- if(badIssues.Contains(typeId))
- {
- var file = xml.Attribute("File").Value.ToString().ToLower();
- if(whitelist.Any(wh => file.StartsWith(wh)))
- continue;
- var line = xml.Attribute("Line").Value.ToString();
- Error(typeId + " - " + file + " on line " + line);
- failBuild = true;
- }
+ var file = xml.Attribute("File").Value.ToString().ToLower();
+ if(whitelist.Any(wh => file.StartsWith(wh)))
+ continue;
+ var line = xml.Attribute("Line").Value.ToString();
+ Error(typeId + " - " + file + " on line " + line);
+ failBuild = true;
}
- if(failBuild)
- throw new Exception("Issues found");
- });
+ }
+ if(failBuild)
+ throw new Exception("Issues found");
+});
///////////////////////////////////////////////////////////////////////////////
// TARGETS
///////////////////////////////////////////////////////////////////////////////
+Task("Run-Tests")
+ .IsDependentOn("Clean-Impl")
+ .IsDependentOn("Restore-NuGet-Packages-Impl")
+ .IsDependentOn("Build-Impl")
+ .IsDependentOn("Run-Unit-Tests-Impl")
+ .IsDependentOn("Run-Render-Tests-Impl")
+ .IsDependentOn("Run-Designer-Tests-Impl")
+ .IsDependentOn("Run-Leak-Tests-Impl");
+
Task("Package")
- .IsDependentOn("Create-NuGet-Packages");
+ .IsDependentOn("Run-Tests")
+ .IsDependentOn("Inspect-Impl")
+ .IsDependentOn("Create-NuGet-Packages-Impl");
Task("AppVeyor")
- .IsDependentOn("Zip-Files")
- .IsDependentOn("Publish-MyGet")
- .IsDependentOn("Publish-NuGet");
+ .IsDependentOn("Package")
+ .IsDependentOn("Copy-Files-Impl")
+ .IsDependentOn("Zip-Files-Impl")
+ .IsDependentOn("Publish-MyGet-Impl")
+ .IsDependentOn("Publish-NuGet-Impl");
Task("Travis")
.IsDependentOn("Run-Tests");
diff --git a/build/System.Memory.props b/build/System.Memory.props
new file mode 100644
index 0000000000..f3253f8882
--- /dev/null
+++ b/build/System.Memory.props
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/packages.cake b/packages.cake
index 7e7e722c82..51d9c48159 100644
--- a/packages.cake
+++ b/packages.cake
@@ -1,3 +1,6 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
using System.Xml.Linq;
public class Packages
@@ -9,12 +12,11 @@ public class Packages
public string SkiaSharpVersion {get; private set; }
public string SkiaSharpLinuxVersion {get; private set; }
public Dictionary>> PackageVersions{get; private set;}
-
-
-
+
class DependencyBuilder : List
{
Packages _parent;
+
public DependencyBuilder(Packages parent)
{
_parent = parent;
@@ -24,8 +26,7 @@ public class Packages
{
return _parent.PackageVersions[name].First().Item1;
}
-
-
+
public DependencyBuilder Dep(string name, params string[] fws)
{
if(fws.Length == 0)
@@ -212,17 +213,33 @@ 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 toolHostApp = 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"
+ };
+
+ var toolHostAppNetFx = new NuSpecContent{
+ Source = ((FilePath)context.File("./src/tools/Avalonia.Designer.HostApp.NetFx/bin/" + parameters.DirSuffix + "/Avalonia.Designer.HostApp.exe")).FullPath,
+ Target = "tools/net461/previewer"
};
+ IList coreFiles;
+
+ if (!parameters.IsPlatformNetCoreOnly) {
+ var toolsContent = new[] { toolHostApp, toolHostAppNetFx };
+ coreFiles = coreLibrariesNuSpecContent
+ .Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform)
+ .Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
+ .Concat(toolsContent)
+ .ToList();
+ } else {
+ var toolsContent = new[] { toolHostApp };
+ coreFiles = coreLibrariesNuSpecContent
+ .Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
+ .Concat(toolsContent)
+ .ToList();
+ }
+
var nuspecNuGetSettingsCore = new []
{
///////////////////////////////////////////////////////////////////////////////
@@ -253,13 +270,9 @@ public class Packages
}
.Deps(new string[]{null, "netcoreapp2.0"},
"System.ValueTuple", "System.ComponentModel.TypeConverter", "System.ComponentModel.Primitives",
- "System.Runtime.Serialization.Primitives", "System.Xml.XmlDocument", "System.Xml.ReaderWriter")
+ "System.Runtime.Serialization.Primitives", "System.Xml.XmlDocument", "System.Xml.ReaderWriter", "System.Memory")
.ToArray(),
- Files = coreLibrariesNuSpecContent
- .Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform)
- .Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform)
- .Concat(toolsContent)
- .ToList(),
+ Files = coreFiles,
BasePath = context.Directory("./"),
OutputDirectory = parameters.NugetRoot
},
@@ -451,22 +464,6 @@ public class Packages
BasePath = context.Directory("./"),
OutputDirectory = parameters.NugetRoot
},
- new NuGetPackSettings()
- {
- Id = "Avalonia.Win32.Interoperability",
- Dependencies = new []
- {
- new NuSpecDependency() { Id = "Avalonia.Win32", Version = parameters.Version },
- new NuSpecDependency() { Id = "Avalonia.Direct2D1", Version = parameters.Version },
- new NuSpecDependency() { Id = "SharpDX.Direct3D9", Version = SharpDXDirect3D9Version },
- },
- Files = new []
- {
- new NuSpecContent { Source = "Avalonia.Win32.Interop/bin/" + parameters.DirSuffix + "/Avalonia.Win32.Interop.dll", Target = "lib/net45" }
- },
- BasePath = context.Directory("./src/Windows"),
- OutputDirectory = parameters.NugetRoot
- },
///////////////////////////////////////////////////////////////////////////////
// Avalonia.LinuxFramebuffer
///////////////////////////////////////////////////////////////////////////////
@@ -487,11 +484,32 @@ public class Packages
}
};
+ var nuspecNuGetSettingInterop = new NuGetPackSettings()
+ {
+ Id = "Avalonia.Win32.Interoperability",
+ Dependencies = new []
+ {
+ new NuSpecDependency() { Id = "Avalonia.Win32", Version = parameters.Version },
+ new NuSpecDependency() { Id = "Avalonia.Direct2D1", Version = parameters.Version },
+ new NuSpecDependency() { Id = "SharpDX.Direct3D9", Version = SharpDXDirect3D9Version },
+ },
+ Files = new []
+ {
+ new NuSpecContent { Source = "Avalonia.Win32.Interop/bin/" + parameters.DirSuffix + "/Avalonia.Win32.Interop.dll", Target = "lib/net45" }
+ },
+ BasePath = context.Directory("./src/Windows"),
+ OutputDirectory = parameters.NugetRoot
+ };
+
NuspecNuGetSettings = new List();
NuspecNuGetSettings.AddRange(nuspecNuGetSettingsCore);
NuspecNuGetSettings.AddRange(nuspecNuGetSettingsDesktop);
- NuspecNuGetSettings.AddRange(nuspecNuGetSettingsMobile);
+
+ if (!parameters.IsPlatformNetCoreOnly) {
+ NuspecNuGetSettings.Add(nuspecNuGetSettingInterop);
+ NuspecNuGetSettings.AddRange(nuspecNuGetSettingsMobile);
+ }
NuspecNuGetSettings.ForEach((nuspec) => SetNuGetNuspecCommonProperties(nuspec));
diff --git a/parameters.cake b/parameters.cake
index ffd472cbd4..e595b8159f 100644
--- a/parameters.cake
+++ b/parameters.cake
@@ -8,11 +8,11 @@ public class Parameters
public string AssemblyInfoPath { get; private set; }
public string ReleasePlatform { get; private set; }
public string ReleaseConfiguration { get; private set; }
- public string MSBuildSolution { get; private set; }
- public string XBuildSolution { get; private set; }
+ public string MSBuildSolution { get; private set; }
public bool IsPlatformAnyCPU { get; private set; }
public bool IsPlatformX86 { get; private set; }
public bool IsPlatformX64 { get; private set; }
+ public bool IsPlatformNetCoreOnly { get; private set; }
public bool IsLocalBuild { get; private set; }
public bool IsRunningOnUnix { get; private set; }
public bool IsRunningOnWindows { get; private set; }
@@ -34,6 +34,7 @@ public class Parameters
public DirectoryPathCollection BuildDirs { get; private set; }
public string FileZipSuffix { get; private set; }
public FilePath ZipCoreArtifacts { get; private set; }
+ public FilePath ZipNuGetArtifacts { get; private set; }
public DirectoryPath ZipSourceControlCatalogDesktopDirs { get; private set; }
public FilePath ZipTargetControlCatalogDesktopDirs { get; private set; }
@@ -53,12 +54,12 @@ public class Parameters
ReleasePlatform = "Any CPU";
ReleaseConfiguration = "Release";
MSBuildSolution = "./Avalonia.sln";
- XBuildSolution = "./Avalonia.XBuild.sln";
// PARAMETERS
IsPlatformAnyCPU = StringComparer.OrdinalIgnoreCase.Equals(Platform, "Any CPU");
IsPlatformX86 = StringComparer.OrdinalIgnoreCase.Equals(Platform, "x86");
IsPlatformX64 = StringComparer.OrdinalIgnoreCase.Equals(Platform, "x64");
+ IsPlatformNetCoreOnly = StringComparer.OrdinalIgnoreCase.Equals(Platform, "NetCoreOnly");
IsLocalBuild = buildSystem.IsLocalBuild;
IsRunningOnUnix = context.IsRunningOnUnix();
IsRunningOnWindows = context.IsRunningOnWindows();
@@ -71,7 +72,6 @@ public class Parameters
IsReleasable = StringComparer.OrdinalIgnoreCase.Equals(ReleasePlatform, Platform)
&& StringComparer.OrdinalIgnoreCase.Equals(ReleaseConfiguration, Configuration);
IsMyGetRelease = !IsTagged && IsReleasable;
-
// VERSION
Version = context.Argument("force-nuget-version", context.ParseAssemblyInfo(AssemblyInfoPath).AssemblyVersion);
@@ -103,14 +103,12 @@ public class Parameters
NugetRoot = ArtifactsDir.Combine("nuget");
ZipRoot = ArtifactsDir.Combine("zip");
BinRoot = ArtifactsDir.Combine("bin");
-
BuildDirs = context.GetDirectories("**/bin") + context.GetDirectories("**/obj");
-
DirSuffix = Configuration;
DirSuffixIOS = "iPhone" + "/" + Configuration;
-
FileZipSuffix = Version + ".zip";
ZipCoreArtifacts = ZipRoot.CombineWithFilePath("Avalonia-" + FileZipSuffix);
+ ZipNuGetArtifacts = ZipRoot.CombineWithFilePath("Avalonia-NuGet-" + FileZipSuffix);
ZipSourceControlCatalogDesktopDirs = (DirectoryPath)context.Directory("./samples/ControlCatalog.Desktop/bin/" + DirSuffix + "/net461");
ZipTargetControlCatalogDesktopDirs = ZipRoot.CombineWithFilePath("ControlCatalog.Desktop-" + FileZipSuffix);
}
diff --git a/readme.md b/readme.md
index 4fe76a2faf..345ad7fe9b 100644
--- a/readme.md
+++ b/readme.md
@@ -20,6 +20,8 @@ Avalonia is a WPF-inspired cross-platform XAML-based UI framework providing a fl
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 (screenshot). Now you can write code and markup that will work on multiple platforms!
+For those without Visual Studio, starter guide for .NET Core CLI can be found [here](http://avaloniaui.net/docs/quickstart/create-new-project#net-core).
+
Avalonia is delivered via NuGet 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))
Use these commands in Package Manager console to install Avalonia manually:
diff --git a/samples/BindingDemo/MainWindow.xaml b/samples/BindingDemo/MainWindow.xaml
index a69fb75742..95713dc22f 100644
--- a/samples/BindingDemo/MainWindow.xaml
+++ b/samples/BindingDemo/MainWindow.xaml
@@ -18,18 +18,18 @@
-
+
-
+
-
+
!BooleanString
@@ -37,13 +37,13 @@
-
+
-
+
@@ -52,7 +52,7 @@
-
+
@@ -68,11 +68,11 @@
-
+
-
+
@@ -87,16 +87,16 @@
-
+
-
+
-
+
@@ -104,7 +104,7 @@
-
+
@@ -114,4 +114,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml b/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
index 943fadf100..28bdc7ac71 100644
--- a/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
+++ b/samples/ControlCatalog/Pages/AutoCompleteBoxPage.xaml
@@ -1,12 +1,12 @@
-
+
AutoCompleteBox
A control into which the user can input text
+ Spacing="8">
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/BorderPage.xaml b/samples/ControlCatalog/Pages/BorderPage.xaml
index a81bd13ddd..09f591d59d 100644
--- a/samples/ControlCatalog/Pages/BorderPage.xaml
+++ b/samples/ControlCatalog/Pages/BorderPage.xaml
@@ -1,12 +1,12 @@
-
+
Border
A control which decorates a child with a border and background
+ Spacing="16">
Border
@@ -29,4 +29,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/ButtonPage.xaml b/samples/ControlCatalog/Pages/ButtonPage.xaml
index b5335ff15e..38757148ab 100644
--- a/samples/ControlCatalog/Pages/ButtonPage.xaml
+++ b/samples/ControlCatalog/Pages/ButtonPage.xaml
@@ -1,14 +1,14 @@
-
+
Button
A button control
-
+ Spacing="16">
+
@@ -25,7 +25,7 @@
-
+
@@ -33,4 +33,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml b/samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml
index 1797fb48bc..fba15f6e77 100644
--- a/samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml
+++ b/samples/ControlCatalog/Pages/ButtonSpinnerPage.xaml
@@ -1,11 +1,11 @@
-
+
ButtonSpinner
The ButtonSpinner control allows you to add button spinners to any element and then respond to the Spin event to manipulate that element.
-
+
AllowSpin
ShowButtonSpinner
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/CalendarPage.xaml b/samples/ControlCatalog/Pages/CalendarPage.xaml
index a433fd1add..c47fd766fb 100644
--- a/samples/ControlCatalog/Pages/CalendarPage.xaml
+++ b/samples/ControlCatalog/Pages/CalendarPage.xaml
@@ -1,13 +1,13 @@
-
+
Calendar
A calendar control for selecting dates
+ Spacing="16">
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/CanvasPage.xaml b/samples/ControlCatalog/Pages/CanvasPage.xaml
index f934f57c22..10a38895a2 100644
--- a/samples/ControlCatalog/Pages/CanvasPage.xaml
+++ b/samples/ControlCatalog/Pages/CanvasPage.xaml
@@ -1,5 +1,5 @@
-
+
Canvas
A panel which lays out its children by explicit coordinates
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/CarouselPage.xaml b/samples/ControlCatalog/Pages/CarouselPage.xaml
index 3468b71fd8..cf9b13c00c 100644
--- a/samples/ControlCatalog/Pages/CarouselPage.xaml
+++ b/samples/ControlCatalog/Pages/CarouselPage.xaml
@@ -1,9 +1,9 @@
-
+
Carousel
An items control that displays its items as pages that fill the control.
-
+
@@ -20,7 +20,7 @@
-
+
Transition
None
@@ -29,7 +29,7 @@
-
+
Orientation
Horizontal
@@ -38,4 +38,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/CheckBoxPage.xaml b/samples/ControlCatalog/Pages/CheckBoxPage.xaml
index a00b3a7bef..154a6254a4 100644
--- a/samples/ControlCatalog/Pages/CheckBoxPage.xaml
+++ b/samples/ControlCatalog/Pages/CheckBoxPage.xaml
@@ -1,15 +1,15 @@
-
+
CheckBox
A check box control
+ Spacing="16">
+ Spacing="16">
Unchecked
Checked
Indeterminate
@@ -17,7 +17,7 @@
+ Spacing="16">
Three State: Unchecked
Three State: Checked
Three State: Indeterminate
@@ -25,4 +25,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/ContextMenuPage.xaml b/samples/ControlCatalog/Pages/ContextMenuPage.xaml
index 3af823befc..37eeaeb2ac 100644
--- a/samples/ControlCatalog/Pages/ContextMenuPage.xaml
+++ b/samples/ControlCatalog/Pages/ContextMenuPage.xaml
@@ -1,12 +1,12 @@
-
+
Context Menu
A right click menu that can be applied to any control.
+ Spacing="16">
@@ -33,4 +33,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/DatePickerPage.xaml b/samples/ControlCatalog/Pages/DatePickerPage.xaml
index 92cfa7e178..2c34460fce 100644
--- a/samples/ControlCatalog/Pages/DatePickerPage.xaml
+++ b/samples/ControlCatalog/Pages/DatePickerPage.xaml
@@ -1,13 +1,13 @@
-
+
DatePicker
A control for selecting dates with a calendar drop-down
+ Spacing="16">
@@ -43,4 +43,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/DialogsPage.xaml b/samples/ControlCatalog/Pages/DialogsPage.xaml
index c3e9435630..710d791f3a 100644
--- a/samples/ControlCatalog/Pages/DialogsPage.xaml
+++ b/samples/ControlCatalog/Pages/DialogsPage.xaml
@@ -1,5 +1,5 @@
-
+
@@ -9,4 +9,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/DragAndDropPage.xaml b/samples/ControlCatalog/Pages/DragAndDropPage.xaml
index af679d2f9a..1f3cd3ff71 100644
--- a/samples/ControlCatalog/Pages/DragAndDropPage.xaml
+++ b/samples/ControlCatalog/Pages/DragAndDropPage.xaml
@@ -1,12 +1,12 @@
-
+
Drag+Drop
Example of Drag+Drop capabilities
+ Spacing="16">
Drag Me
@@ -16,4 +16,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/DropDownPage.xaml b/samples/ControlCatalog/Pages/DropDownPage.xaml
index 0a7a88e331..5e2a3102e7 100644
--- a/samples/ControlCatalog/Pages/DropDownPage.xaml
+++ b/samples/ControlCatalog/Pages/DropDownPage.xaml
@@ -1,9 +1,9 @@
-
+
DropDown
A drop-down list.
-
+
Inline Items
Inline Item 2
@@ -28,4 +28,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/ExpanderPage.xaml b/samples/ControlCatalog/Pages/ExpanderPage.xaml
index e32fa1caf1..91440929f5 100644
--- a/samples/ControlCatalog/Pages/ExpanderPage.xaml
+++ b/samples/ControlCatalog/Pages/ExpanderPage.xaml
@@ -1,12 +1,12 @@
-
+
Expander
Expands to show nested content
+ Spacing="16">
Expanded content
@@ -29,4 +29,4 @@
-
\ No newline at end of file
+
diff --git a/samples/ControlCatalog/Pages/ImagePage.xaml b/samples/ControlCatalog/Pages/ImagePage.xaml
index dc93808f27..78fbf90192 100644
--- a/samples/ControlCatalog/Pages/ImagePage.xaml
+++ b/samples/ControlCatalog/Pages/ImagePage.xaml
@@ -1,12 +1,12 @@
-
+
Image
Displays an image
+ Spacing="16">
No Stretch
-
+
Menu
A window menu
+ Spacing="16">