From 851b97ac58a708553b968e023909dc3348f25c83 Mon Sep 17 00:00:00 2001 From: donandren Date: Wed, 1 Mar 2017 17:00:15 +0200 Subject: [PATCH 001/132] Added some simple tests for Content control and datatemplate --- .../Xaml/BasicTests.cs | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs index a742a4ac96..b732c0d642 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs @@ -1,6 +1,8 @@ // Copyright (c) The Avalonia Project. All rights reserved. // Licensed under the MIT license. See licence.md file in the project root for full license information. +using System.IO; +using System.Text; using Avalonia.Controls; using Avalonia.UnitTests; using Xunit; @@ -9,6 +11,60 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml { public class BasicTests { + [Fact] + public void Simple_Property_Is_Set() + { + + var xaml = @" + +"; + var loader = new AvaloniaXamlLoader(); + var target = (ContentControl)loader.Load(xaml); + + Assert.NotNull(target); + Assert.Equal("Foo", target.Content); + } + + [Fact] + public void Default_Content_Property_Is_Set() + { + var xaml = @" +Foo"; + var loader = new AvaloniaXamlLoader(); + var target = (ContentControl)loader.Load(xaml); + + Assert.NotNull(target); + Assert.Equal("Foo", target.Content); + } + + [Fact] + public void ContentControl_ContentTemplate_Is_Functional() + { + var xaml = +@" + + + + + +"; + + var loader = new AvaloniaXamlLoader(); + var contentControl = (ContentControl)loader.Load(xaml); + var target = contentControl.ContentTemplate; + + Assert.NotNull(target); + + var txt = (TextBlock)target.Build(null); + + Assert.Equal("Foo", txt.Text); + } + [Fact] public void Named_Control_Is_Added_To_NameScope() { From 1948fff8de6d8025e24c6668c57a940751cb4231 Mon Sep 17 00:00:00 2001 From: donandren Date: Wed, 1 Mar 2017 17:58:22 +0200 Subject: [PATCH 002/132] named control added to namescope tests --- .../Xaml/BasicTests.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs index b732c0d642..d0d99c5569 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs @@ -65,6 +65,36 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml Assert.Equal("Foo", txt.Text); } + [Fact] + public void Named_Control_Is_Added_To_NameScope_Simple() + { + var xaml = @" + + +"; + var loader = new AvaloniaXamlLoader(); + var control = (UserControl)loader.Load(xaml); + var button = control.FindControl +"; + var loader = new AvaloniaXamlLoader(); + var control = (UserControl)loader.Load(xaml); + var button = control.FindControl "; var loader = new AvaloniaXamlLoader(); @@ -95,6 +86,55 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml Assert.Equal("Foo", button.Content); } + [Fact] + public void Standart_TypeConverter_Is_Used() + { + var xaml = @""; + + var control = (UserControl)new AvaloniaXamlLoader().Load(xaml); + Assert.Equal(200.5, control.Width); + } + + [Fact] + public void Avalonia_TypeConverter_Is_Used() + { + var xaml = @""; + + var control = (UserControl)new AvaloniaXamlLoader().Load(xaml); + var bk = control.Background; + Assert.IsType(bk); + Assert.Equal(Colors.White, (bk as SolidColorBrush).Color); + } + + [Fact] + public void Simple_Style_Is_Parsed() + { + var xaml = @" + + +"; + + var styles = (Styles)new AvaloniaXamlLoader().Load(xaml); + + Assert.Equal(1, styles.Count); + + var style = (Style)styles[0]; + + var setters = style.Setters.Cast().ToArray(); + + Assert.Equal(2, setters.Length); + + Assert.Equal(TextBlock.BackgroundProperty, setters[0].Property); + Assert.Equal(Brushes.White, setters[0].Value); + + Assert.Equal(TextBlock.WidthProperty, setters[1].Property); + Assert.Equal(100.0, setters[1].Value); + } + [Fact] public void Named_Control_Is_Added_To_NameScope() { @@ -137,4 +177,4 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml } } } -} +} \ No newline at end of file diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/packages.config b/tests/Avalonia.Markup.Xaml.UnitTests/packages.config index cad6395387..6972facac2 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/packages.config +++ b/tests/Avalonia.Markup.Xaml.UnitTests/packages.config @@ -1,6 +1,7 @@  + From d42e6d02cbed21d59aac32c96e89296906b9506b Mon Sep 17 00:00:00 2001 From: donandren Date: Thu, 2 Mar 2017 15:12:15 +0200 Subject: [PATCH 004/132] initial portable xaml support attempt with datatemplate working and namespace support --- src/Avalonia.Base/Avalonia.Base.csproj | 1 + src/Avalonia.Base/Metadata/TemplateContent.cs | 15 ++ .../Avalonia.Markup.Xaml.csproj | 16 +- .../AvaloniaXamlLoader.cs | 230 +----------------- .../AvaloniaXamlLoaderOmniXaml.cs | 227 +++++++++++++++++ .../AvaloniaXamlLoaderPortableXaml.cs | 219 +++++++++++++++++ .../Context/AvaloniaObjectAssembler.cs | 2 + .../Context/AvaloniaParserFactory.cs | 2 + .../Context/AvaloniaTypeFeatureProvider.cs | 2 +- .../AvaloniaMemberAttributeProvider.cs | 69 ++++++ .../PortableXaml/AvaloniaNameScope.cs | 56 +++++ .../AvaloniaRuntimeTypeProvider.cs | 147 +++++++++++ .../AvaloniaTypeAttributeProvider.cs | 91 +++++++ .../PortableXaml/AvaloniaXamlObjectWriter.cs | 101 ++++++++ .../PortableXaml/AvaloniaXamlSchemaContext.cs | 70 ++++++ .../Templates/DataTemplate.cs | 10 +- .../Templates/TemplateContent.cs | 31 ++- .../Templates/TemplateLoader.cs | 23 +- .../Avalonia.Markup.Xaml/packages.config | 1 + .../Avalonia.Markup/Avalonia.Markup.csproj | 11 + src/Markup/Avalonia.Markup/packages.config | 12 + 21 files changed, 1105 insertions(+), 231 deletions(-) create mode 100644 src/Avalonia.Base/Metadata/TemplateContent.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderPortableXaml.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaNameScope.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaRuntimeTypeProvider.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs create mode 100644 src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs diff --git a/src/Avalonia.Base/Avalonia.Base.csproj b/src/Avalonia.Base/Avalonia.Base.csproj index 90550a12f2..acc4145dc5 100644 --- a/src/Avalonia.Base/Avalonia.Base.csproj +++ b/src/Avalonia.Base/Avalonia.Base.csproj @@ -70,6 +70,7 @@ + diff --git a/src/Avalonia.Base/Metadata/TemplateContent.cs b/src/Avalonia.Base/Metadata/TemplateContent.cs new file mode 100644 index 0000000000..ecc16b04a2 --- /dev/null +++ b/src/Avalonia.Base/Metadata/TemplateContent.cs @@ -0,0 +1,15 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System; + +namespace Avalonia.Metadata +{ + /// + /// Defines the property that contains the object's content in markup. + /// + [AttributeUsage(AttributeTargets.Property)] + public class TemplateContentAttribute : Attribute + { + } +} diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index 4ed20629cf..2f33fb912d 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -21,7 +21,7 @@ full false bin\Debug\ - DEBUG;TRACE + TRACE;DEBUG;OMNIXAML_no prompt 4 CS1591 @@ -40,6 +40,13 @@ Properties\SharedAssemblyInfo.cs + + + + + + + @@ -266,8 +273,9 @@ + - + @@ -322,6 +330,10 @@ + + ..\..\..\packages\Portable.Xaml.0.15.0\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\Portable.Xaml.dll + True + ..\..\..\packages\Sprache.2.1.0\lib\netstandard1.0\Sprache.dll diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs index 7b3d0036ef..978048bb9d 100644 --- a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs +++ b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs @@ -1,225 +1,11 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Text; -using OmniXaml; -using Avalonia.Platform; -using Avalonia.Markup.Xaml.Context; -using Avalonia.Markup.Xaml.Styling; -using OmniXaml.ObjectAssembler; -using Avalonia.Controls; -using Avalonia.Markup.Xaml.Data; - -namespace Avalonia.Markup.Xaml +namespace Avalonia.Markup.Xaml { - /// - /// Loads XAML for a avalonia application. - /// - public class AvaloniaXamlLoader : XmlLoader + public class AvaloniaXamlLoader : +#if OMNIXAML + AvaloniaXamlLoaderOmniXaml +#else + AvaloniaXamlLoaderPortableXaml +#endif { - private static AvaloniaParserFactory s_parserFactory; - private static IInstanceLifeCycleListener s_lifeCycleListener = new AvaloniaLifeCycleListener(); - private static Stack s_uriStack = new Stack(); - - /// - /// Initializes a new instance of the class. - /// - public AvaloniaXamlLoader() - : this(GetParserFactory()) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The parser factory to use. - public AvaloniaXamlLoader(IParserFactory xamlParserFactory) - : base(xamlParserFactory) - { - } - - /// - /// Gets the URI of the XAML file currently being loaded. - /// - /// - /// TODO: Making this internal for now as I'm not sure that this is the correct - /// thing to do, but its needed by to get the URL of - /// the currently loading XAML file, as we can't use the OmniXAML parsing context - /// there. Maybe we need a way to inject OmniXAML context into the objects its - /// constructing? - /// - internal static Uri UriContext => s_uriStack.Count > 0 ? s_uriStack.Peek() : null; - - /// - /// Loads the XAML into a Avalonia component. - /// - /// The object to load the XAML into. - public static void Load(object obj) - { - Contract.Requires(obj != null); - - var loader = new AvaloniaXamlLoader(); - loader.Load(obj.GetType(), obj); - } - - /// - /// Loads the XAML for a type. - /// - /// The type. - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The loaded object. - public object Load(Type type, object rootInstance = null) - { - Contract.Requires(type != null); - - // HACK: Currently Visual Studio is forcing us to change the extension of xaml files - // in certain situations, so we try to load .xaml and if that's not found we try .xaml. - // Ideally we'd be able to use .xaml everywhere - var assetLocator = AvaloniaLocator.Current.GetService(); - - if (assetLocator == null) - { - throw new InvalidOperationException( - "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); - } - - foreach (var uri in GetUrisFor(type)) - { - if (assetLocator.Exists(uri)) - { - using (var stream = assetLocator.Open(uri)) - { - var initialize = rootInstance as ISupportInitialize; - initialize?.BeginInit(); - return Load(stream, rootInstance, uri); - } - } - } - - throw new FileNotFoundException("Unable to find view for " + type.FullName); - } - - /// - /// Loads XAML from a URI. - /// - /// The URI of the XAML file. - /// - /// A base URI to use if is relative. - /// - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The loaded object. - public object Load(Uri uri, Uri baseUri = null, object rootInstance = null) - { - Contract.Requires(uri != null); - - var assetLocator = AvaloniaLocator.Current.GetService(); - - if (assetLocator == null) - { - throw new InvalidOperationException( - "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); - } - - using (var stream = assetLocator.Open(uri, baseUri)) - { - return Load(stream, rootInstance, uri); - } - } - - /// - /// Loads XAML from a string. - /// - /// The string containing the XAML. - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The loaded object. - public object Load(string xaml, object rootInstance = null) - { - Contract.Requires(xaml != null); - - using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(xaml))) - { - return Load(stream, rootInstance); - } - } - - /// - /// Loads XAML from a stream. - /// - /// The stream containing the XAML. - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The URI of the XAML - /// The loaded object. - public object Load(Stream stream, object rootInstance = null, Uri uri = null) - { - try - { - if (uri != null) - { - s_uriStack.Push(uri); - } - - var result = base.Load(stream, new Settings - { - RootInstance = rootInstance, - InstanceLifeCycleListener = s_lifeCycleListener, - ParsingContext = new Dictionary - { - { "Uri", uri } - } - }); - - var topLevel = result as TopLevel; - - if (topLevel != null) - { - DelayedBinding.ApplyBindings(topLevel); - } - - return result; - } - finally - { - if (uri != null) - { - s_uriStack.Pop(); - } - } - } - - private static AvaloniaParserFactory GetParserFactory() - { - if (s_parserFactory == null) - { - s_parserFactory = new AvaloniaParserFactory(); - } - - return s_parserFactory; - } - - /// - /// Gets the URI for a type. - /// - /// The type. - /// The URI. - private static IEnumerable GetUrisFor(Type type) - { - var asm = type.GetTypeInfo().Assembly.GetName().Name; - var typeName = type.FullName; - yield return new Uri("resm:" + typeName + ".xaml?assembly=" + asm); - yield return new Uri("resm:" + typeName + ".paml?assembly=" + asm); - - } } -} +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs new file mode 100644 index 0000000000..df734dfe39 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs @@ -0,0 +1,227 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text; +using OmniXaml; +using Avalonia.Platform; +using Avalonia.Markup.Xaml.Context; +using Avalonia.Markup.Xaml.Styling; +using OmniXaml.ObjectAssembler; +using Avalonia.Controls; +using Avalonia.Markup.Xaml.Data; + +namespace Avalonia.Markup.Xaml +{ +#if OMNIXAML + /// + /// Loads XAML for a avalonia application. + /// + public class AvaloniaXamlLoaderOmniXaml : XmlLoader + { + private static AvaloniaParserFactory s_parserFactory; + private static IInstanceLifeCycleListener s_lifeCycleListener = new AvaloniaLifeCycleListener(); + private static Stack s_uriStack = new Stack(); + + /// + /// Initializes a new instance of the class. + /// + public AvaloniaXamlLoaderOmniXaml() + : this(GetParserFactory()) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The parser factory to use. + public AvaloniaXamlLoaderOmniXaml(IParserFactory xamlParserFactory) + : base(xamlParserFactory) + { + } + + /// + /// Gets the URI of the XAML file currently being loaded. + /// + /// + /// TODO: Making this internal for now as I'm not sure that this is the correct + /// thing to do, but its needed by to get the URL of + /// the currently loading XAML file, as we can't use the OmniXAML parsing context + /// there. Maybe we need a way to inject OmniXAML context into the objects its + /// constructing? + /// + internal static Uri UriContext => s_uriStack.Count > 0 ? s_uriStack.Peek() : null; + + /// + /// Loads the XAML into a Avalonia component. + /// + /// The object to load the XAML into. + public static void Load(object obj) + { + Contract.Requires(obj != null); + + var loader = new AvaloniaXamlLoaderOmniXaml(); + loader.Load(obj.GetType(), obj); + } + + /// + /// Loads the XAML for a type. + /// + /// The type. + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The loaded object. + public object Load(Type type, object rootInstance = null) + { + Contract.Requires(type != null); + + // HACK: Currently Visual Studio is forcing us to change the extension of xaml files + // in certain situations, so we try to load .xaml and if that's not found we try .xaml. + // Ideally we'd be able to use .xaml everywhere + var assetLocator = AvaloniaLocator.Current.GetService(); + + if (assetLocator == null) + { + throw new InvalidOperationException( + "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); + } + + foreach (var uri in GetUrisFor(type)) + { + if (assetLocator.Exists(uri)) + { + using (var stream = assetLocator.Open(uri)) + { + var initialize = rootInstance as ISupportInitialize; + initialize?.BeginInit(); + return Load(stream, rootInstance, uri); + } + } + } + + throw new FileNotFoundException("Unable to find view for " + type.FullName); + } + + /// + /// Loads XAML from a URI. + /// + /// The URI of the XAML file. + /// + /// A base URI to use if is relative. + /// + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The loaded object. + public object Load(Uri uri, Uri baseUri = null, object rootInstance = null) + { + Contract.Requires(uri != null); + + var assetLocator = AvaloniaLocator.Current.GetService(); + + if (assetLocator == null) + { + throw new InvalidOperationException( + "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); + } + + using (var stream = assetLocator.Open(uri, baseUri)) + { + return Load(stream, rootInstance, uri); + } + } + + /// + /// Loads XAML from a string. + /// + /// The string containing the XAML. + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The loaded object. + public object Load(string xaml, object rootInstance = null) + { + Contract.Requires(xaml != null); + + using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(xaml))) + { + return Load(stream, rootInstance); + } + } + + /// + /// Loads XAML from a stream. + /// + /// The stream containing the XAML. + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The URI of the XAML + /// The loaded object. + public object Load(Stream stream, object rootInstance = null, Uri uri = null) + { + try + { + if (uri != null) + { + s_uriStack.Push(uri); + } + + var result = base.Load(stream, new Settings + { + RootInstance = rootInstance, + InstanceLifeCycleListener = s_lifeCycleListener, + ParsingContext = new Dictionary + { + { "Uri", uri } + } + }); + + var topLevel = result as TopLevel; + + if (topLevel != null) + { + DelayedBinding.ApplyBindings(topLevel); + } + + return result; + } + finally + { + if (uri != null) + { + s_uriStack.Pop(); + } + } + } + + private static AvaloniaParserFactory GetParserFactory() + { + if (s_parserFactory == null) + { + s_parserFactory = new AvaloniaParserFactory(); + } + + return s_parserFactory; + } + + /// + /// Gets the URI for a type. + /// + /// The type. + /// The URI. + private static IEnumerable GetUrisFor(Type type) + { + var asm = type.GetTypeInfo().Assembly.GetName().Name; + var typeName = type.FullName; + yield return new Uri("resm:" + typeName + ".xaml?assembly=" + asm); + yield return new Uri("resm:" + typeName + ".paml?assembly=" + asm); + + } + } +#endif +} diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderPortableXaml.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderPortableXaml.cs new file mode 100644 index 0000000000..d09787803a --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderPortableXaml.cs @@ -0,0 +1,219 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text; +using Avalonia.Controls; +using Avalonia.Markup.Xaml.Context; +using Avalonia.Markup.Xaml.Data; +using Avalonia.Markup.Xaml.PortableXaml; +using Avalonia.Platform; +using Portable.Xaml; + +namespace Avalonia.Markup.Xaml +{ + /// + /// Loads XAML for a avalonia application. + /// + public class AvaloniaXamlLoaderPortableXaml + { + internal static readonly AvaloniaXamlSchemaContext _context + = new AvaloniaXamlSchemaContext(new AvaloniaRuntimeTypeProvider()); + + /// + /// Initializes a new instance of the class. + /// + public AvaloniaXamlLoaderPortableXaml() + { + } + + /// + /// Gets the URI of the XAML file currently being loaded. + /// + /// + /// TODO: Making this internal for now as I'm not sure that this is the correct + /// thing to do, but its needed by to get the URL of + /// the currently loading XAML file, as we can't use the OmniXAML parsing context + /// there. Maybe we need a way to inject OmniXAML context into the objects its + /// constructing? + /// + [Obsolete] + internal static Uri UriContext => s_uriStack.Count > 0 ? s_uriStack.Peek() : null; + + private static Stack s_uriStack = new Stack(); + + /// + /// Loads the XAML into a Avalonia component. + /// + /// The object to load the XAML into. + public static void Load(object obj) + { + Contract.Requires(obj != null); + + var loader = new AvaloniaXamlLoader(); + loader.Load(obj.GetType(), obj); + } + + /// + /// Loads the XAML for a type. + /// + /// The type. + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The loaded object. + public object Load(Type type, object rootInstance = null) + { + Contract.Requires(type != null); + + // HACK: Currently Visual Studio is forcing us to change the extension of xaml files + // in certain situations, so we try to load .xaml and if that's not found we try .xaml. + // Ideally we'd be able to use .xaml everywhere + var assetLocator = AvaloniaLocator.Current.GetService(); + + if (assetLocator == null) + { + throw new InvalidOperationException( + "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); + } + + foreach (var uri in GetUrisFor(type)) + { + if (assetLocator.Exists(uri)) + { + using (var stream = assetLocator.Open(uri)) + { + var initialize = rootInstance as ISupportInitialize; + initialize?.BeginInit(); + return Load(stream, type, rootInstance, uri); + } + } + } + + throw new FileNotFoundException("Unable to find view for " + type.FullName); + } + + /// + /// Loads XAML from a URI. + /// + /// The URI of the XAML file. + /// + /// A base URI to use if is relative. + /// + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The loaded object. + public object Load(Uri uri, Uri baseUri = null, object rootInstance = null) + { + Contract.Requires(uri != null); + + var assetLocator = AvaloniaLocator.Current.GetService(); + + if (assetLocator == null) + { + throw new InvalidOperationException( + "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); + } + + using (var stream = assetLocator.Open(uri, baseUri)) + { + return Load(stream, null, rootInstance, uri); + } + } + + /// + /// Loads XAML from a string. + /// + /// The string containing the XAML. + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The loaded object. + public object Load(string xaml, Type type = null, object rootInstance = null) + { + Contract.Requires(xaml != null); + + using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(xaml))) + { + return Load(stream, type, rootInstance); + } + } + + /// + /// Loads XAML from a stream. + /// + /// The stream containing the XAML. + /// + /// The optional instance into which the XAML should be loaded. + /// + /// The URI of the XAML + /// The loaded object. + public object Load(Stream stream, Type type = null, object rootInstance = null, Uri uri = null) + { + try + { + if (uri != null) + { + s_uriStack.Push(uri); + } + + var readerSettings = new XamlXmlReaderSettings(); + + if (rootInstance != null && type == null) + { + type = rootInstance.GetType(); + } + + if (type != null) + { + readerSettings.LocalAssembly = type.GetTypeInfo().Assembly; + } + + var reader = new XamlXmlReader(stream, _context, readerSettings); + object result = Load(reader, rootInstance); + + var topLevel = result as TopLevel; + + if (topLevel != null) + { + DelayedBinding.ApplyBindings(topLevel); + } + + return result; + } + finally + { + if (uri != null) + { + s_uriStack.Pop(); + } + } + } + + internal static object Load(XamlXmlReader reader, object instance) + { + var writer = AvaloniaXamlObjectWriter.Create(_context, instance); + + XamlServices.Transform(reader, writer); + + return writer.Result; + } + + /// + /// Gets the URI for a type. + /// + /// The type. + /// The URI. + private static IEnumerable GetUrisFor(Type type) + { + var asm = type.GetTypeInfo().Assembly.GetName().Name; + var typeName = type.FullName; + yield return new Uri("resm:" + typeName + ".xaml?assembly=" + asm); + yield return new Uri("resm:" + typeName + ".paml?assembly=" + asm); + } + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs index 1f5d259fc3..fefebdd18d 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs @@ -12,6 +12,7 @@ using System.Collections.ObjectModel; namespace Avalonia.Markup.Xaml.Context { +#if OMNIXAML public class AvaloniaObjectAssembler : IObjectAssembler { private readonly TemplateHostingObjectAssembler objectAssembler; @@ -76,4 +77,5 @@ namespace Avalonia.Markup.Xaml.Context return dict; } } +#endif } \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaParserFactory.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaParserFactory.cs index 9e0c21edd4..69ab0727da 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaParserFactory.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaParserFactory.cs @@ -8,6 +8,7 @@ using OmniXaml.Parsers.ProtoParser; namespace Avalonia.Markup.Xaml.Context { +#if OMNIXAML public class AvaloniaParserFactory : IParserFactory { private readonly IRuntimeTypeSource runtimeTypeSource; @@ -38,4 +39,5 @@ namespace Avalonia.Markup.Xaml.Context return new XmlParser(phaseParserKit); } } +#endif } \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs index fcb5703f83..7828934a62 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs @@ -171,7 +171,7 @@ namespace Avalonia.Markup.Xaml.Context RegisterTypeConverter(typeof(SolidColorBrush), new BrushTypeConverter()); RegisterTypeConverter(typeof(Thickness), new ThicknessTypeConverter()); RegisterTypeConverter(typeof(TimeSpan), new TimeSpanTypeConverter()); - RegisterTypeConverter(typeof(Uri), new UriTypeConverter()); + RegisterTypeConverter(typeof(Uri), new Converters.UriTypeConverter()); RegisterTypeConverter(typeof(Cursor), new CursorTypeConverter()); RegisterTypeConverter(typeof(WindowIcon), new IconTypeConverter()); RegisterTypeConverter(typeof(FontWeight), new FontWeightConverter()); diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs new file mode 100644 index 0000000000..b878b860cc --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs @@ -0,0 +1,69 @@ +using System; +using System.Linq; +using System.Reflection; +using Avalonia.Markup.Xaml.Templates; +using Portable.Xaml.ComponentModel; +using avm = Avalonia.Metadata; +using pm = Portable.Xaml.Markup; + +namespace Avalonia.Markup.Xaml.PortableXaml +{ + public class AvaloniaMemberAttributeProvider : ICustomAttributeProvider + { + public AvaloniaMemberAttributeProvider(MemberInfo info) + { + _info = info; + } + + public object[] GetCustomAttributes(bool inherit) + { + throw new NotImplementedException(); + } + + public object[] GetCustomAttributes(Type attributeType, bool inherit) + { + object[] result = null; + + if (attributeType == typeof(pm.XamlDeferLoadAttribute)) + { + var attr = GetXamlDeferLoadAttribute(inherit); + + if (attr != null) + { + result = new object[] { attr }; + } + } + + if (result == null || result.Length == 0) + { + var attr = _info.GetCustomAttributes(attributeType, inherit); + return (attr as object[]) ?? attr.ToArray(); + } + else + { + return result; + } + } + + public bool IsDefined(Type attributeType, bool inherit) + { + throw new NotImplementedException(); + } + + private readonly MemberInfo _info; + + private Attribute GetXamlDeferLoadAttribute(bool inherit) + { + var result = _info.GetCustomAttributes(typeof(avm.TemplateContentAttribute), inherit) + .Cast() + .FirstOrDefault(); + + if (result == null) + { + return null; + } + + return new pm.XamlDeferLoadAttribute(typeof(TemplateLoader), typeof(TemplateContent)); + } + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaNameScope.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaNameScope.cs new file mode 100644 index 0000000000..6f855bafa1 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaNameScope.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using Avalonia.Controls; + +namespace Avalonia.Markup.Xaml.PortableXaml +{ + internal class AvaloniaNameScope : Portable.Xaml.Markup.INameScope + { + public object Instance { get; set; } + + private Dictionary _names = new Dictionary(); + + public object FindName(string name) + { + object result; + if (_names.TryGetValue(name, out result)) + return result; + return null; + } + + public void RegisterName(string name, object scopedElement) + { + if (scopedElement != null) + _names.Add(name, scopedElement); + + //TODO: ??? + //var control = scopedElement as Control; + + //if (control != null) + //{ + // var nameScope = (Instance as INameScope) ?? control.FindNameScope(); + + // if (nameScope != null) + // { + // nameScope.Register(name, scopedElement); + // } + //} + } + + public void UnregisterName(string name) + { + } + + public void RegisterOnNameScope(object target) + { + var nameScope = target as INameScope; + + if (nameScope != null) + { + foreach (var v in _names) + { + nameScope.Register(v.Key, v.Value); + } + } + } + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaRuntimeTypeProvider.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaRuntimeTypeProvider.cs new file mode 100644 index 0000000000..b6ffac69ab --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaRuntimeTypeProvider.cs @@ -0,0 +1,147 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Avalonia.Controls; +using Avalonia.Markup.Xaml.Templates; +using Avalonia.Media; +using Avalonia.Metadata; +using Avalonia.Platform; +using Avalonia.Styling; + +namespace Avalonia.Markup.Xaml.Context +{ + using ClrNamespaceInfo = Tuple; + + public interface IRuntimeTypeProvider + { + Type FindType(string xamlNamespace, string name, Type[] genArgs); + + IEnumerable ReferencedAssemblies { get; } + } + + public class AvaloniaRuntimeTypeProvider : IRuntimeTypeProvider + { + private const string ClrNamespace = "clr-namespace:"; + // private const string AvaloniaNs = "https://github.com/avaloniaui"; + + private static readonly IEnumerable ForcedAssemblies = new[] + { + typeof(AvaloniaObject).GetTypeInfo().Assembly, + typeof(Control).GetTypeInfo().Assembly, + typeof(Style).GetTypeInfo().Assembly, + typeof(DataTemplate).GetTypeInfo().Assembly, + typeof(SolidColorBrush).GetTypeInfo().Assembly, + typeof(IValueConverter).GetTypeInfo().Assembly, + }; + + private Dictionary> _namespaces = new Dictionary>(); + + private List _scanned = new List(); + + public IEnumerable ReferencedAssemblies => _scanned; + + public AvaloniaRuntimeTypeProvider() + { + ScanAssemblies(ForcedAssemblies); + ScanNewAssemblies(); + } + + private static bool IsClrNamespace(string ns) + { + return ns.StartsWith(ClrNamespace); + } + + private static Assembly GetAssembly(string assemblyName) + { + return Assembly.Load(new AssemblyName(assemblyName)); + } + + private void ScanAssemblies(IEnumerable assemblies) + { + foreach (var assembly in assemblies) + { + var namespaces = assembly.GetCustomAttributes() + .Select(x => new { x.XmlNamespace, x.ClrNamespace }) + .GroupBy(x => x.XmlNamespace); + + foreach (var nsa in namespaces) + { + HashSet reg; + + if (!_namespaces.TryGetValue(nsa.Key, out reg)) + { + _namespaces[nsa.Key] = reg = new HashSet>(); + } + + foreach (var child in nsa) + { + reg.Add(new ClrNamespaceInfo(child.ClrNamespace, assembly)); + } + } + + _scanned.Add(assembly); + } + } + + private void ScanNewAssemblies() + { + IEnumerable assemblies = AvaloniaLocator.Current + .GetService() + ?.GetLoadedAssemblies(); + + if (assemblies != null) + { + assemblies = assemblies.Except(_scanned); + ScanAssemblies(assemblies); + } + } + + private Dictionary _typeCache = new Dictionary(); + + public Type FindType(string xamlNamespace, string name, Type[] genArgs) + { + if (IsClrNamespace(xamlNamespace)) + { + //we need to handle only xaml url namespaces for avalonia, + //the other namespaces are handled well in portable.xaml + return null; + } + + string key = $"{xamlNamespace}:{name}"; + + Type type; + + if (_typeCache.TryGetValue(key, out type)) + { + return type; + } + + HashSet reg; + + if (!_namespaces.TryGetValue(xamlNamespace, out reg)) + { + return null; + } + + if (genArgs != null) + name += "`" + genArgs.Length; + + foreach (var ns in reg) + { + var n = ns.Item1 + "." + name; + var t = ns.Item2.GetType(n); + if (t != null) + { + _typeCache[key] = t; + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs new file mode 100644 index 0000000000..ba470d521d --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs @@ -0,0 +1,91 @@ +// Copyright (c) The Perspex Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System; +using System.Linq; +using System.Reflection; +using Avalonia.Metadata; +using Portable.Xaml.ComponentModel; +using pm = Portable.Xaml.Markup; + +namespace Avalonia.Markup.Xaml.PortableXaml +{ + internal class AvaloniaTypeAttributeProvider : ICustomAttributeProvider + { + public AvaloniaTypeAttributeProvider(Type type) + { + _type = type; + } + + public object[] GetCustomAttributes(bool inherit) + { + throw new NotImplementedException(); + } + + public object[] GetCustomAttributes(Type attributeType, bool inherit) + { + if (attributeType == typeof(pm.ContentPropertyAttribute)) + { + var cp = GetContentPropertyAttribute(inherit); + + if (cp != null) + { + return new object[] { cp }; + } + } + else if (attributeType == typeof(pm.RuntimeNamePropertyAttribute)) + { + if (_namedType.IsAssignableFrom(_type.GetTypeInfo())) + { + return new object[] + { + new pm.RuntimeNamePropertyAttribute(nameof(INamed.Name)) + }; + } + } + + var attr = _type.GetTypeInfo().GetCustomAttributes(attributeType, inherit); + return (attr as object[]) ?? attr.ToArray(); + } + + public bool IsDefined(Type attributeType, bool inherit) + { + throw new NotImplementedException(); + } + + private readonly TypeInfo _namedType = typeof(INamed).GetTypeInfo(); + + private readonly Type _type; + + private Attribute GetContentPropertyAttribute(bool inherit) + { + var type = _type; + + while (type != null) + { + var properties = type.GetTypeInfo().DeclaredProperties + .Where(x => x.GetCustomAttribute() != null); + string result = null; + + foreach (var property in properties) + { + if (result != null) + { + throw new Exception($"Content property defined more than once on {type}."); + } + + result = property.Name; + } + + if (result != null) + { + return new pm.ContentPropertyAttribute(result); + } + + type = inherit ? type.GetTypeInfo().BaseType : null; + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs new file mode 100644 index 0000000000..287e1a140e --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs @@ -0,0 +1,101 @@ +using Portable.Xaml; + +namespace Avalonia.Markup.Xaml.PortableXaml +{ + public class AvaloniaXamlObjectWriter : XamlObjectWriter + { + public static AvaloniaXamlObjectWriter Create(XamlSchemaContext schemaContext, object instance) + { + var writerSettings = new XamlObjectWriterSettings(); + var nameScope = new AvaloniaNameScope { Instance = instance }; + writerSettings.ExternalNameScope = nameScope; + writerSettings.RegisterNamesOnExternalNamescope = true; + writerSettings.RootObjectInstance = instance; + + return new AvaloniaXamlObjectWriter(schemaContext, writerSettings, nameScope); + } + + private AvaloniaXamlObjectWriter( + XamlSchemaContext schemaContext, + XamlObjectWriterSettings settings, + AvaloniaNameScope nameScope + ) + : base(schemaContext, settings) + { + _nameScope = nameScope; + } + + protected override void OnAfterBeginInit(object value) + { + base.OnAfterBeginInit(value); + } + + protected override void OnAfterEndInit(object value) + { + base.OnAfterEndInit(value); + } + + protected override void OnAfterProperties(object value) + { + base.OnAfterProperties(value); + + //AfterEndInit is not called as it supports only + //Portable.Xaml.ComponentModel.ISupportInitialize + //and we have Avalonia.ISupportInitialize so we need some hacks + _endEditValue = value; + } + + protected override void OnBeforeProperties(object value) + { + //OnAfterBeginInit is not called as it supports only + //Portable.Xaml.ComponentModel.ISupportInitialize + //and we have Avalonia.ISupportInitialize so we need some hacks + HandleBeginInit(value); + + base.OnBeforeProperties(value); + } + + public override void WriteEndObject() + { + base.WriteEndObject(); + + //AfterEndInit is not called as it supports only + //Portable.Xaml.ComponentModel.ISupportInitialize + //and we have Avalonia.ISupportInitialize so we need some hacks + HandleEndEdit(_endEditValue); + _endEditValue = null; + } + + private object _endEditValue; + + private AvaloniaNameScope _nameScope; + + private void HandleBeginInit(object value) + { + (value as Avalonia.ISupportInitialize)?.BeginInit(); + } + + private void HandleEndEdit(object value) + { + (value as Avalonia.ISupportInitialize)?.EndInit(); + } + + private void HandleFinished() + { + if(_nameScope != null && Result != null) + { + _nameScope.RegisterOnNameScope(Result); + } + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + HandleFinished(); + } + + base.Dispose(disposing); + } + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs new file mode 100644 index 0000000000..75ca5dff37 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Avalonia.Markup.Xaml.Context; +using Portable.Xaml; +using Portable.Xaml.ComponentModel; + +namespace Avalonia.Markup.Xaml.PortableXaml +{ + internal class AvaloniaXamlSchemaContext : XamlSchemaContext + { + public AvaloniaXamlSchemaContext(IRuntimeTypeProvider typeProvider) + : base(typeProvider.ReferencedAssemblies) + { + _avaloniaTypeProvider = typeProvider; + } + + private IRuntimeTypeProvider _avaloniaTypeProvider; + + protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) + { + XamlType type = null; + try + { + type = ResolveXamlTypeName(xamlNamespace, name, typeArguments, false); + + if (type == null) + { + type = base.GetXamlType(xamlNamespace, name, typeArguments); + } + } + catch(Exception e) + { + //TODO: log or wrap exception + throw e; + } + return type; + } + + private XamlType ResolveXamlTypeName(string xmlNamespace, string xmlLocalName, XamlType[] typeArguments, bool required) + { + Type[] genArgs = null; + if (typeArguments != null && typeArguments.Any()) + { + genArgs = typeArguments.Select(t => t?.UnderlyingType).ToArray(); + + if (genArgs.Any(t => t == null)) + { + return null; + } + } + + Type type = _avaloniaTypeProvider.FindType(xmlNamespace, xmlLocalName, genArgs); + + if (type == null) + { + return null; + } + + return GetXamlType(type); + } + + protected override ICustomAttributeProvider GetCustomAttributeProvider(Type type) + => new AvaloniaTypeAttributeProvider(type); + + protected override ICustomAttributeProvider GetCustomAttributeProvider(MemberInfo member) + => new AvaloniaMemberAttributeProvider(member); + } +} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Templates/DataTemplate.cs b/src/Markup/Avalonia.Markup.Xaml/Templates/DataTemplate.cs index 1feaed1b27..a1c77450e8 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Templates/DataTemplate.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Templates/DataTemplate.cs @@ -13,10 +13,14 @@ namespace Avalonia.Markup.Xaml.Templates { public Type DataType { get; set; } + //we need content to be object otherwise portable.xaml is crashing [Content] - public TemplateContent Content { get; set; } + [TemplateContent] + public object Content { get; set; } - public bool SupportsRecycling => true; + private TemplateContent TemplateContent => (TemplateContent)Content; + + public bool SupportsRecycling { get; set; } public bool Match(object data) { @@ -30,6 +34,6 @@ namespace Avalonia.Markup.Xaml.Templates } } - public IControl Build(object data) => Content.Load(); + public IControl Build(object data) => TemplateContent.Load(); } } \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateContent.cs b/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateContent.cs index 325b9bf53f..695661a623 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateContent.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateContent.cs @@ -2,13 +2,38 @@ // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.Collections.Generic; -using OmniXaml; -using OmniXaml.ObjectAssembler; using Avalonia.Controls; using Avalonia.Markup.Xaml.Context; namespace Avalonia.Markup.Xaml.Templates { +#if !OMNIXAML + using Portable.Xaml; + + public class TemplateContent + { + public TemplateContent() + { + } + + public TemplateContent(XamlReader reader) + { + List = new XamlNodeList(reader.SchemaContext); + XamlServices.Transform(reader, List.Writer); + } + + public XamlNodeList List { get; set; } + + public IControl Load() + { + return (IControl)XamlServices.Load(List.GetReader()); + } + } +#else + + using OmniXaml; + using OmniXaml.ObjectAssembler; + public class TemplateContent { private readonly IEnumerable nodes; @@ -34,4 +59,6 @@ namespace Avalonia.Markup.Xaml.Templates return (Control)assembler.Result; } } + +#endif } \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs b/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs index 75f0329629..0f67615527 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs @@ -2,10 +2,29 @@ // Licensed under the MIT license. See licence.md file in the project root for full license information. using System.Collections.Generic; -using OmniXaml; namespace Avalonia.Markup.Xaml.Templates { +#if !OMNIXAML + using Portable.Xaml; + using System; + + public class TemplateLoader : XamlDeferringLoader + { + public override object Load(XamlReader xamlReader, IServiceProvider serviceProvider) + { + return new TemplateContent(xamlReader); + } + + public override XamlReader Save(object value, IServiceProvider serviceProvider) + { + return ((TemplateContent)value).List.GetReader(); + } + } +#else + + using OmniXaml; + public class TemplateLoader : IDeferredLoader { public object Load(IEnumerable nodes, IRuntimeTypeSource runtimeTypeSource) @@ -13,4 +32,6 @@ namespace Avalonia.Markup.Xaml.Templates return new TemplateContent(nodes, runtimeTypeSource); } } + +#endif } \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/packages.config b/src/Markup/Avalonia.Markup.Xaml/packages.config index 7a9353bb05..89e19db1dc 100644 --- a/src/Markup/Avalonia.Markup.Xaml/packages.config +++ b/src/Markup/Avalonia.Markup.Xaml/packages.config @@ -1,5 +1,6 @@  + diff --git a/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj b/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj index 5826346fc9..50d5886e10 100644 --- a/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj +++ b/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj @@ -114,6 +114,14 @@ + + ..\..\..\packages\System.ComponentModel.Primitives.4.3.0\lib\netstandard1.0\System.ComponentModel.Primitives.dll + True + + + ..\..\..\packages\System.ComponentModel.TypeConverter.4.3.0\lib\netstandard1.0\System.ComponentModel.TypeConverter.dll + True + ..\..\..\packages\System.Reactive.Core.3.0.0\lib\netstandard1.1\System.Reactive.Core.dll True @@ -134,6 +142,9 @@ + + + - - - - - - - - - - - - - - - - - - - - - <_ReferencesFromNuGetPackages Remove="%(ReferencePath.FileName)" Condition="'%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetFramework'" /> - - - - <_ResolvedProjectReferencePaths Include="@(_ReferencesFromNuGetPackages)" Condition="'%(_ReferencesFromNuGetPackages.NuGetSourceType)' == 'Project'" /> - - - - - - - - - true - - - - - - - - - $(MSBuildToolsPath)\..\Roslyn - - \ No newline at end of file diff --git a/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj b/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj index aab791cd8f..4cd1f21022 100644 --- a/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj +++ b/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj @@ -86,5 +86,4 @@ - \ No newline at end of file diff --git a/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj b/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj index b8dd79eca9..e2d4522d7e 100644 --- a/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj +++ b/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj @@ -106,5 +106,4 @@ - \ No newline at end of file diff --git a/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj b/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj index 220fb37b81..b2d92b0304 100644 --- a/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj +++ b/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj @@ -88,5 +88,4 @@ - \ No newline at end of file diff --git a/src/Windows/Avalonia.Designer/Avalonia.Designer.csproj b/src/Windows/Avalonia.Designer/Avalonia.Designer.csproj index 71fb024d89..4fdd06c9ce 100644 --- a/src/Windows/Avalonia.Designer/Avalonia.Designer.csproj +++ b/src/Windows/Avalonia.Designer/Avalonia.Designer.csproj @@ -123,5 +123,4 @@ - \ No newline at end of file diff --git a/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj b/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj index ab62f5ac75..bd2e77d022 100644 --- a/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj +++ b/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj @@ -115,5 +115,4 @@ - \ No newline at end of file diff --git a/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj b/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj index b134f4666e..41728ee486 100644 --- a/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj +++ b/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj @@ -102,5 +102,4 @@ - \ No newline at end of file diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index d915b67cd0..fd150052da 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -105,5 +105,4 @@ - \ No newline at end of file diff --git a/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj b/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj index 050d61376a..92fcf226de 100644 --- a/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj +++ b/src/iOS/Avalonia.iOSTestApplication/Avalonia.iOSTestApplication.csproj @@ -187,5 +187,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.Benchmarks/Avalonia.Benchmarks.csproj b/tests/Avalonia.Benchmarks/Avalonia.Benchmarks.csproj index 1f5ebac203..be6480618b 100644 --- a/tests/Avalonia.Benchmarks/Avalonia.Benchmarks.csproj +++ b/tests/Avalonia.Benchmarks/Avalonia.Benchmarks.csproj @@ -102,5 +102,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.DesignerSupport.TestApp/Avalonia.DesignerSupport.TestApp.csproj b/tests/Avalonia.DesignerSupport.TestApp/Avalonia.DesignerSupport.TestApp.csproj index 2bf962bfa5..7945915e8c 100644 --- a/tests/Avalonia.DesignerSupport.TestApp/Avalonia.DesignerSupport.TestApp.csproj +++ b/tests/Avalonia.DesignerSupport.TestApp/Avalonia.DesignerSupport.TestApp.csproj @@ -147,5 +147,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.DesignerSupport.Tests/Avalonia.DesignerSupport.Tests.csproj b/tests/Avalonia.DesignerSupport.Tests/Avalonia.DesignerSupport.Tests.csproj index efca582573..477d44b99d 100644 --- a/tests/Avalonia.DesignerSupport.Tests/Avalonia.DesignerSupport.Tests.csproj +++ b/tests/Avalonia.DesignerSupport.Tests/Avalonia.DesignerSupport.Tests.csproj @@ -58,5 +58,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.Direct2D1.UnitTests/Avalonia.Direct2D1.UnitTests.csproj b/tests/Avalonia.Direct2D1.UnitTests/Avalonia.Direct2D1.UnitTests.csproj index 035d5b6c3e..4b33d14243 100644 --- a/tests/Avalonia.Direct2D1.UnitTests/Avalonia.Direct2D1.UnitTests.csproj +++ b/tests/Avalonia.Direct2D1.UnitTests/Avalonia.Direct2D1.UnitTests.csproj @@ -92,5 +92,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.LeakTests/Avalonia.LeakTests.csproj b/tests/Avalonia.LeakTests/Avalonia.LeakTests.csproj index 83893b9bcd..46bd4ee324 100644 --- a/tests/Avalonia.LeakTests/Avalonia.LeakTests.csproj +++ b/tests/Avalonia.LeakTests/Avalonia.LeakTests.csproj @@ -122,5 +122,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.RenderTests/Avalonia.Cairo.RenderTests.csproj b/tests/Avalonia.RenderTests/Avalonia.Cairo.RenderTests.csproj index b6c573c3c9..98256529bc 100644 --- a/tests/Avalonia.RenderTests/Avalonia.Cairo.RenderTests.csproj +++ b/tests/Avalonia.RenderTests/Avalonia.Cairo.RenderTests.csproj @@ -102,5 +102,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.RenderTests/Avalonia.Direct2D1.RenderTests.csproj b/tests/Avalonia.RenderTests/Avalonia.Direct2D1.RenderTests.csproj index 14fb35202e..370bc04395 100644 --- a/tests/Avalonia.RenderTests/Avalonia.Direct2D1.RenderTests.csproj +++ b/tests/Avalonia.RenderTests/Avalonia.Direct2D1.RenderTests.csproj @@ -101,5 +101,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.RenderTests/Avalonia.Skia.RenderTests.csproj b/tests/Avalonia.RenderTests/Avalonia.Skia.RenderTests.csproj index 9b228a89ee..92111585a7 100644 --- a/tests/Avalonia.RenderTests/Avalonia.Skia.RenderTests.csproj +++ b/tests/Avalonia.RenderTests/Avalonia.Skia.RenderTests.csproj @@ -102,5 +102,4 @@ - \ No newline at end of file diff --git a/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj b/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj index 628ccb2a1f..5b679fe360 100644 --- a/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj +++ b/tests/Avalonia.UnitTests/Avalonia.UnitTests.csproj @@ -54,5 +54,4 @@ - \ No newline at end of file From 742d2f0a6d7ebb7905b441fb9b625592ba26645e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Wed, 17 May 2017 08:51:11 +0200 Subject: [PATCH 061/132] Remove Xamarin.Common.targets fix --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4bf7f7f157..7f2b1bb395 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,8 +13,6 @@ environment: MYGET_API_KEY: secure: OtVfyN3ErqQrDTnWH2HDfJDlCiu/i4/X4wFmK3ZXXP7HmCiXYPSbTjMPwwdOxRaK MYGET_API_URL: https://www.myget.org/F/avalonia-ci/api/v2/package -init: -- ps: (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/appveyor/ci/master/scripts/xamarin-vs2017-151-fixed.targets', "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.Targets\ImportAfter\Xamarin.Common.targets") install: - if not exist gtk-sharp-2.12.26.msi appveyor DownloadFile http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.26.msi - if not exist dotnet-1.0.1.exe appveyor DownloadFile https://go.microsoft.com/fwlink/?linkid=843448 -FileName "dotnet-1.0.1.exe" From 4d2d68057b5f8782aef7df33b690b0d8265cee8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Wed, 17 May 2017 19:49:21 +0200 Subject: [PATCH 062/132] Restore UseRoslynPathHack --- build.cake | 1 + src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj | 3 +++ src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj | 3 +++ src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 3 +++ 4 files changed, 10 insertions(+) diff --git a/build.cake b/build.cake index 2d62ae2d54..2bd88e3c50 100644 --- a/build.cake +++ b/build.cake @@ -143,6 +143,7 @@ Task("Build") MSBuild(parameters.MSBuildSolution, settings => { settings.SetConfiguration(parameters.Configuration); settings.WithProperty("Platform", "\"" + parameters.Platform + "\""); + settings.WithProperty("UseRoslynPathHack", "true"); settings.SetVerbosity(Verbosity.Minimal); settings.WithProperty("Windows", "True"); settings.UseToolVersion(MSBuildToolVersion.VS2017); diff --git a/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj b/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj index 4cd1f21022..55cefda6e4 100644 --- a/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj +++ b/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj @@ -86,4 +86,7 @@ + + $(MSBuildToolsPath)\Roslyn + \ No newline at end of file diff --git a/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj b/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj index b2d92b0304..a3a08ec060 100644 --- a/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj +++ b/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj @@ -88,4 +88,7 @@ + + $(MSBuildToolsPath)\Roslyn + \ No newline at end of file diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index fd150052da..333be18735 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -105,4 +105,7 @@ + + $(MSBuildToolsPath)\Roslyn + \ No newline at end of file From 3b086f6055e32dc74295c872fcbfe48692e68b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 3 Jun 2017 22:06:50 +0200 Subject: [PATCH 063/132] Fix iOS projects build --- src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj | 4 ++-- src/iOS/Avalonia.iOS/Avalonia.iOS.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj b/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj index a3a08ec060..9ea89704f7 100644 --- a/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj +++ b/src/Skia/Avalonia.Skia.iOS/Avalonia.Skia.iOS.csproj @@ -88,7 +88,7 @@ - - $(MSBuildToolsPath)\Roslyn + + $(MSBuildToolsPath)\..\Roslyn \ No newline at end of file diff --git a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj index 333be18735..a959c0cf72 100644 --- a/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj +++ b/src/iOS/Avalonia.iOS/Avalonia.iOS.csproj @@ -105,7 +105,7 @@ - - $(MSBuildToolsPath)\Roslyn + + $(MSBuildToolsPath)\..\Roslyn \ No newline at end of file From 0d4e5063000b611bb2d187ee869088e4c3d417d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 3 Jun 2017 22:07:32 +0200 Subject: [PATCH 064/132] Remove UseRoslynPathHack for Android projects --- src/Android/Avalonia.Android/Avalonia.Android.csproj | 3 --- src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/Android/Avalonia.Android/Avalonia.Android.csproj b/src/Android/Avalonia.Android/Avalonia.Android.csproj index 1ed416f385..091fdcc4b5 100644 --- a/src/Android/Avalonia.Android/Avalonia.Android.csproj +++ b/src/Android/Avalonia.Android/Avalonia.Android.csproj @@ -133,7 +133,4 @@ - - $(MSBuildToolsPath)\Roslyn - \ No newline at end of file diff --git a/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj b/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj index 55cefda6e4..4cd1f21022 100644 --- a/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj +++ b/src/Skia/Avalonia.Skia.Android/Avalonia.Skia.Android.csproj @@ -86,7 +86,4 @@ - - $(MSBuildToolsPath)\Roslyn - \ No newline at end of file From eaab3d6465c3ee8a60024b0fdbb49690feccf239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 3 Jun 2017 22:11:08 +0200 Subject: [PATCH 065/132] Added missing tool --- build.cake | 1 + 1 file changed, 1 insertion(+) diff --git a/build.cake b/build.cake index 2bd88e3c50..5420d24755 100644 --- a/build.cake +++ b/build.cake @@ -5,6 +5,7 @@ #addin "nuget:?package=Polly&version=5.1.0" #addin "nuget:?package=NuGet.Core&version=2.14.0" #tool "nuget:?package=JetBrains.dotMemoryUnit&version=2.1.20150828.125449" +#tool "JetBrains.ReSharper.CommandLineTools" /////////////////////////////////////////////////////////////////////////////// // TOOLS From afff2d8ae56dbc2a311b4b75041ba21dcfcca285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 3 Jun 2017 22:12:24 +0200 Subject: [PATCH 066/132] Update tool JetBrains.dotMemoryUnit version --- build.cake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cake b/build.cake index 5420d24755..b86cb395b8 100644 --- a/build.cake +++ b/build.cake @@ -4,7 +4,7 @@ #addin "nuget:?package=Polly&version=5.1.0" #addin "nuget:?package=NuGet.Core&version=2.14.0" -#tool "nuget:?package=JetBrains.dotMemoryUnit&version=2.1.20150828.125449" +#tool "nuget:?package=JetBrains.dotMemoryUnit&version=2.3.20160517.113140" #tool "JetBrains.ReSharper.CommandLineTools" /////////////////////////////////////////////////////////////////////////////// From 50786609c6194a528316953d2152e5289b062c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wies=C5=82aw=20=C5=A0olt=C3=A9s?= Date: Sat, 3 Jun 2017 22:13:49 +0200 Subject: [PATCH 067/132] Fix build.cake --- build.cake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.cake b/build.cake index b86cb395b8..b091dba1a2 100644 --- a/build.cake +++ b/build.cake @@ -2,17 +2,17 @@ // ADDINS /////////////////////////////////////////////////////////////////////////////// -#addin "nuget:?package=Polly&version=5.1.0" -#addin "nuget:?package=NuGet.Core&version=2.14.0" +#addin "nuget:?package=Polly&version=4.2.0" +#addin "nuget:?package=NuGet.Core&version=2.12.0" +#tool "nuget:https://dotnet.myget.org/F/nuget-build/?package=NuGet.CommandLine&version=4.3.0-preview1-3980&prerelease" #tool "nuget:?package=JetBrains.dotMemoryUnit&version=2.3.20160517.113140" #tool "JetBrains.ReSharper.CommandLineTools" - /////////////////////////////////////////////////////////////////////////////// // TOOLS /////////////////////////////////////////////////////////////////////////////// -#tool "nuget:?package=xunit.runner.console&version=2.2.0" -#tool "nuget:?package=OpenCover&version=4.6.519" +#tool "nuget:?package=xunit.runner.console&version=2.1.0" +#tool "nuget:?package=OpenCover" /////////////////////////////////////////////////////////////////////////////// // USINGS From 67ff5ba53c351a9b9198d14ddd37e69b217aceed Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Tue, 6 Jun 2017 16:12:02 +0300 Subject: [PATCH 068/132] =?UTF-8?q?Initial=20implementation=20of=20Proper?= =?UTF-8?q?=20WPF=20embedding=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Avalonia.sln | 43 ++++ .../WindowsInteropTest/EmbedToWpfDemo.xaml | 3 +- .../WindowsInteropTest.csproj | 6 +- .../Embedding/EmbeddableControlRoot.cs | 2 + .../Avalonia.Win32.Interop.csproj | 101 ++++++++++ .../Properties/AssemblyInfo.cs | 36 ++++ .../Avalonia.Win32.Interop/Wpf/CursorShim.cs | 38 ++++ .../Avalonia.Win32.Interop/Wpf/Helpers.cs | 16 ++ .../Wpf/WpfAvaloniaHost.cs | 80 ++++++++ .../Wpf/WpfMouseDevice.cs | 30 +++ .../Wpf/WpfTopLevelImpl.cs | 190 ++++++++++++++++++ .../Wpf/WritableBitmapSurface.cs | 81 ++++++++ 12 files changed, 624 insertions(+), 2 deletions(-) create mode 100644 src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj create mode 100644 src/Windows/Avalonia.Win32.Interop/Properties/AssemblyInfo.cs create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/CursorShim.cs create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/WpfMouseDevice.cs create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs diff --git a/Avalonia.sln b/Avalonia.sln index f12af02236..afaee6a907 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -191,6 +191,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.LinuxFramebuffer", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Direct3DInteropSample", "samples\interop\Direct3DInteropSample\Direct3DInteropSample.csproj", "{638580B0-7910-40EF-B674-DCB34DA308CD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Win32.Interop", "src\Windows\Avalonia.Win32.Interop\Avalonia.Win32.Interop.csproj", "{CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution src\Skia\Avalonia.Skia\Avalonia.Skia.projitems*{2f59f3d0-748d-4652-b01e-e0d954756308}*SharedItemsImports = 13 @@ -2589,6 +2591,46 @@ Global {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|Mono.Build.0 = Release|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|x86.ActiveCfg = Release|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|x86.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|Mono.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|Mono.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|Any CPU.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|iPhone.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|Mono.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|Mono.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|x86.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.AppStore|x86.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|iPhone.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|Mono.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|Mono.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|x86.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|x86.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Any CPU.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|iPhone.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|iPhone.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Mono.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Mono.Build.0 = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|x86.ActiveCfg = Release|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -2649,5 +2691,6 @@ Global {4D6FAF79-58B4-482F-9122-0668C346364C} = {74487168-7D91-487E-BF93-055F2251461E} {854568D5-13D1-4B4F-B50D-534DC7EFD3C9} = {86C53C40-57AA-45B8-AD42-FAE0EFDF0F2B} {638580B0-7910-40EF-B674-DCB34DA308CD} = {A0CC0258-D18C-4AB3-854F-7101680FC3F9} + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E} = {B39A8919-9F95-48FE-AD7B-76E08B509888} EndGlobalSection EndGlobal diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml index 1115cf5768..5a346d4e8d 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:WindowsInteropTest" xmlns:embedding="clr-namespace:Avalonia.Win32.Embedding;assembly=Avalonia.Win32" + xmlns:wpf="clr-namespace:Avalonia.Win32.Interop.Wpf;assembly=Avalonia.Win32.Interop" mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="400" MinWidth="500" MinHeight="400"> @@ -15,7 +16,7 @@ - + diff --git a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj index 28e5e274d0..d0405a3af8 100644 --- a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj +++ b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj @@ -14,7 +14,7 @@ true - AnyCPU + x86 true full false @@ -164,6 +164,10 @@ {3e908f67-5543-4879-a1dc-08eace79b3cd} Avalonia.Direct2D1 + + {cbc4ff2f-92d4-420b-be21-9fe0b930b04e} + Avalonia.Win32.Interop + {811a76cf-1cf6-440f-963b-bbe31bd72a82} Avalonia.Win32 diff --git a/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs b/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs index b8d54fa67b..45b4f8eaa1 100644 --- a/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs +++ b/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs @@ -39,6 +39,8 @@ namespace Avalonia.Controls.Embedding } } + public Size MeasureBase(Size availableSize) => base.MeasureOverride(availableSize); + protected override Size MeasureOverride(Size availableSize) { var cs = PlatformImpl?.ClientSize ?? default(Size); diff --git a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj new file mode 100644 index 0000000000..ae61fc697f --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E} + Library + Properties + Avalonia.Win32.Interop + Avalonia.Win32.Interop + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + UnmanagedMethods.cs + + + + + + + + + + + + {d211e587-d8bc-45b9-95a4-f297c8fa5200} + Avalonia.Animation + + + {b09b78d8-9b26-48b0-9149-d64a2f120f3f} + Avalonia.Base + + + {d2221c82-4a25-4583-9b43-d791e3f6820c} + Avalonia.Controls + + + {62024b2d-53eb-4638-b26b-85eeaa54866e} + Avalonia.Input + + + {6b0ed19d-a08b-461c-a9d9-a9ee40b0c06b} + Avalonia.Interactivity + + + {42472427-4774-4c81-8aff-9f27b8e31721} + Avalonia.Layout + + + {f1baa01a-f176-4c6a-b39d-5b40bb1b148f} + Avalonia.Styling + + + {eb582467-6abb-43a1-b052-e981ba910e3a} + Avalonia.Visuals + + + {fb05ac90-89ba-4f2f-a924-f37875fb547c} + Avalonia.Cairo + + + {811a76cf-1cf6-440f-963b-bbe31bd72a82} + Avalonia.Win32 + + + + \ No newline at end of file diff --git a/src/Windows/Avalonia.Win32.Interop/Properties/AssemblyInfo.cs b/src/Windows/Avalonia.Win32.Interop/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..7c0d638381 --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Avalonia.Win32.Interop")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Avalonia.Win32.Interop")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[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("cbc4ff2f-92d4-420b-be21-9fe0b930b04e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/CursorShim.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/CursorShim.cs new file mode 100644 index 0000000000..6ae898ae3d --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/CursorShim.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace Avalonia.Win32.Interop.Wpf +{ + static class CursorShim + { + public static Cursor FromHCursor(IntPtr hcursor) + { + var field = typeof(Cursor).GetFields(BindingFlags.NonPublic | BindingFlags.Instance) + .FirstOrDefault(f => f.FieldType == typeof(SafeHandle)); + if (field == null) + return null; + var rv = (Cursor) FormatterServices.GetUninitializedObject(typeof(Cursor)); + field.SetValue(rv, new SafeHandleShim(hcursor)); + return rv; + } + + class SafeHandleShim : SafeHandle + { + public SafeHandleShim(IntPtr hcursor) : base(new IntPtr(-1), false) + { + this.handle = hcursor; + } + + protected override bool ReleaseHandle() => true; + + public override bool IsInvalid => false; + } + } +} diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs new file mode 100644 index 0000000000..9c1f39e86b --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Avalonia.Win32.Interop.Wpf +{ + static class Helpers + { + public static System.Windows.Point ToWpfPoint(this Point pt) => new System.Windows.Point(pt.X, pt.Y); + public static Point ToAvaloniaPoint(this System.Windows.Point pt) => new Point(pt.X, pt.Y); + public static System.Windows.Size ToWpfSize(this Size pt) => new System.Windows.Size(pt.Width, pt.Height); + public static Size ToAvaloniaSize(this System.Windows.Size pt) => new Size(pt.Width, pt.Height); + } +} diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs new file mode 100644 index 0000000000..2d350fbe30 --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace Avalonia.Win32.Interop.Wpf +{ + public class WpfAvaloniaHost : FrameworkElement, IDisposable + { + private WpfTopLevelImpl _impl = new WpfTopLevelImpl(); + private readonly SynchronizationContext _sync; + public WpfAvaloniaHost() + { + _sync = SynchronizationContext.Current; + _impl.ControlRoot.Prepare(); + _impl.Visibility = Visibility.Visible; + AddLogicalChild(_impl); + AddVisualChild(_impl); + } + + + public object Content + { + get => _impl.ControlRoot.Content; + set => _impl.ControlRoot.Content = value; + } + + //Separate class is needed to prevent accidential resurrection + class Disposer + { + private readonly WpfTopLevelImpl _impl; + + public Disposer(WpfTopLevelImpl impl) + { + _impl = impl; + } + + public void Callback(object state) + { + _impl.Dispose(); + } + } + + protected override System.Windows.Size MeasureOverride(System.Windows.Size constraint) + => _impl.ControlRoot.MeasureBase(constraint.ToAvaloniaSize()).ToWpfSize(); + + protected override System.Windows.Size ArrangeOverride(System.Windows.Size arrangeSize) + { + _impl.Arrange(new System.Windows.Rect(arrangeSize)); + return arrangeSize; + } + + protected override int VisualChildrenCount => 1; + protected override System.Windows.Media.Visual GetVisualChild(int index) => _impl; + + ~WpfAvaloniaHost() + { + if (_impl != null) + _sync.Post(new Disposer(_impl).Callback, null); + } + + public void Dispose() + { + if (_impl != null) + { + RemoveVisualChild(_impl); + RemoveLogicalChild(_impl); + _impl.Dispose(); + _impl = null; + GC.SuppressFinalize(this); + } + } + } +} diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfMouseDevice.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfMouseDevice.cs new file mode 100644 index 0000000000..4aad80f8a5 --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfMouseDevice.cs @@ -0,0 +1,30 @@ +using System; +using Avalonia.Controls.Embedding; +using Avalonia.Input; +using Avalonia.VisualTree; + +namespace Avalonia.Win32.Interop.Wpf +{ + class WpfMouseDevice : MouseDevice + { + private readonly WpfTopLevelImpl _impl; + + public WpfMouseDevice(WpfTopLevelImpl impl) + { + _impl = impl; + } + + public override void Capture(IInputElement control) + { + if (control == null) + { + System.Windows.Input.Mouse.Capture(null); + } + else if ((control.GetVisualRoot() as EmbeddableControlRoot)?.PlatformImpl != _impl) + throw new ArgumentException("Visual belongs to unknown toplevel"); + else + System.Windows.Input.Mouse.Capture(_impl); + base.Capture(control); + } + } +} \ No newline at end of file diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs new file mode 100644 index 0000000000..56dc26992e --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -0,0 +1,190 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Interop; +using System.Windows.Media; +using Avalonia.Controls.Embedding; +using Avalonia.Input; +using Avalonia.Input.Raw; +using Avalonia.Layout; +using Avalonia.Platform; +using Key = Avalonia.Input.Key; +using KeyEventArgs = System.Windows.Input.KeyEventArgs; +using MouseButton = System.Windows.Input.MouseButton; + +namespace Avalonia.Win32.Interop.Wpf +{ + class WpfTopLevelImpl : FrameworkElement, IEmbeddableWindowImpl + { + private HwndSource _currentHwndSource; + private readonly HwndSourceHook _hook; + private readonly IEmbeddableWindowImpl _ttl; + private IInputRoot _inputRoot; + private readonly IEnumerable _surfaces; + private readonly IMouseDevice _mouse; + private readonly IKeyboardDevice _keyboard; + private Size _finalSize; + + public EmbeddableControlRoot ControlRoot { get; } + internal ImageSource ImageSource { get; set; } + + public WpfTopLevelImpl() + { + PresentationSource.AddSourceChangedHandler(this, OnSourceChanged); + _hook = WndProc; + _ttl = this; + _surfaces = new object[] {new WritableBitmapSurface(this)}; + _mouse = new WpfMouseDevice(this); + _keyboard = AvaloniaLocator.Current.GetService(); + + ControlRoot = new EmbeddableControlRoot(this); + SnapsToDevicePixels = true; + Focusable = true; + } + + private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled) + { + if (msg == (int)UnmanagedMethods.WindowsMessage.WM_DPICHANGED) + _ttl.ScalingChanged?.Invoke(_ttl.Scaling); + return IntPtr.Zero; + } + + private void OnSourceChanged(object sender, SourceChangedEventArgs e) + { + _currentHwndSource?.RemoveHook(_hook); + _currentHwndSource = e.NewSource as HwndSource; + _currentHwndSource?.AddHook(_hook); + _ttl.ScalingChanged?.Invoke(_ttl.Scaling); + } + + public void Dispose() => _ttl.Closed?.Invoke(); + + Size ITopLevelImpl.ClientSize => _finalSize; + IMouseDevice ITopLevelImpl.MouseDevice => _mouse; + + double ITopLevelImpl.Scaling => PresentationSource.FromVisual(this)?.CompositionTarget?.TransformToDevice.M11 ?? 1; + + IEnumerable ITopLevelImpl.Surfaces => _surfaces; + + protected override System.Windows.Size ArrangeOverride(System.Windows.Size finalSize) + { + _finalSize = finalSize.ToAvaloniaSize(); + _ttl.Resized?.Invoke(finalSize.ToAvaloniaSize()); + return base.ArrangeOverride(finalSize); + } + + protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) + => ControlRoot.MeasureBase(availableSize.ToAvaloniaSize()).ToWpfSize(); + + protected override void OnRender(DrawingContext drawingContext) + { + _ttl.Paint?.Invoke(new Rect(0, 0, ActualWidth, ActualHeight)); + if (ImageSource != null) + drawingContext.DrawImage(ImageSource, new System.Windows.Rect(0, 0, ActualWidth, ActualHeight)); + } + + void ITopLevelImpl.Invalidate(Rect rect) => InvalidateVisual(); + + void ITopLevelImpl.SetInputRoot(IInputRoot inputRoot) => _inputRoot = inputRoot; + + Point ITopLevelImpl.PointToClient(Point point) => PointFromScreen(point.ToWpfPoint()).ToAvaloniaPoint(); + + Point ITopLevelImpl.PointToScreen(Point point) => PointToScreen(point.ToWpfPoint()).ToAvaloniaPoint(); + + protected override void OnLostFocus(RoutedEventArgs e) => LostFocus?.Invoke(); + + + InputModifiers GetModifiers() + { + var state = Keyboard.Modifiers; + var rv = default(InputModifiers); + if (state.HasFlag(ModifierKeys.Windows)) + rv |= InputModifiers.Windows; + if (state.HasFlag(ModifierKeys.Alt)) + rv |= InputModifiers.Alt; + if (state.HasFlag(ModifierKeys.Control)) + rv |= InputModifiers.Control; + if (state.HasFlag(ModifierKeys.Shift)) + rv |= InputModifiers.Shift; + //TODO: mouse modifiers + + + return rv; + } + + void MouseEvent(RawMouseEventType type, MouseEventArgs e) + => _ttl.Input?.Invoke(new RawMouseEventArgs(_mouse, (uint)e.Timestamp, _inputRoot, type, + e.GetPosition(this).ToAvaloniaPoint(), GetModifiers())); + + protected override void OnMouseDown(MouseButtonEventArgs e) + { + RawMouseEventType type; + if(e.ChangedButton == MouseButton.Left) + type = RawMouseEventType.LeftButtonDown; + else if (e.ChangedButton == MouseButton.Middle) + type = RawMouseEventType.MiddleButtonDown; + else if (e.ChangedButton == MouseButton.Right) + type = RawMouseEventType.RightButtonDown; + else + return; + MouseEvent(type, e); + } + + protected override void OnMouseUp(MouseButtonEventArgs e) + { + RawMouseEventType type; + if (e.ChangedButton == MouseButton.Left) + type = RawMouseEventType.LeftButtonUp; + else if (e.ChangedButton == MouseButton.Middle) + type = RawMouseEventType.MiddleButtonUp; + else if (e.ChangedButton == MouseButton.Right) + type = RawMouseEventType.RightButtonUp; + else + return; + MouseEvent(type, e); + } + + protected override void OnMouseMove(MouseEventArgs e) + { + MouseEvent(RawMouseEventType.Move, e); + } + + protected override void OnMouseWheel(MouseWheelEventArgs e) => + _ttl.Input?.Invoke(new RawMouseWheelEventArgs(_mouse, (uint) e.Timestamp, _inputRoot, + e.GetPosition(this).ToAvaloniaPoint(), new Vector(0, e.Delta), GetModifiers())); + + protected override void OnKeyDown(KeyEventArgs e) + => _ttl.Input?.Invoke(new RawKeyEventArgs(_keyboard, (uint) e.Timestamp, RawKeyEventType.KeyDown, + (Key) e.Key, + GetModifiers())); + + protected override void OnKeyUp(KeyEventArgs e) + => _ttl.Input?.Invoke(new RawKeyEventArgs(_keyboard, (uint)e.Timestamp, RawKeyEventType.KeyUp, + (Key)e.Key, + GetModifiers())); + + protected override void OnTextInput(TextCompositionEventArgs e) + => _ttl.Input?.Invoke(new RawTextInputEventArgs(_keyboard, (uint) e.Timestamp, e.Text)); + + void ITopLevelImpl.SetCursor(IPlatformHandle cursor) + { + if (cursor == null) + Cursor = Cursors.Arrow; + else if (cursor.HandleDescriptor == "HCURSOR") + Cursor = CursorShim.FromHCursor(cursor.Handle); + } + + Action ITopLevelImpl.Input { get; set; } //TODO + Action ITopLevelImpl.Paint { get; set; } + Action ITopLevelImpl.Resized { get; set; } + Action ITopLevelImpl.ScalingChanged { get; set; } + Action ITopLevelImpl.Closed { get; set; } + public new event Action LostFocus; + + } +} diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs new file mode 100644 index 0000000000..1dd1cb983a --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using Avalonia.Controls.Platform.Surfaces; +using Avalonia.Platform; +using PixelFormat = Avalonia.Platform.PixelFormat; + +namespace Avalonia.Win32.Interop.Wpf +{ + class WritableBitmapSurface : IFramebufferPlatformSurface + { + private readonly WpfTopLevelImpl _impl; + private WriteableBitmap _bitmap; + public WritableBitmapSurface(WpfTopLevelImpl impl) + { + _impl = impl; + } + + public ILockedFramebuffer Lock() + { + var scale = GetScaling(); + var size = new Size(_impl.ActualWidth * scale.X, _impl.ActualHeight * scale.Y); + var dpi = scale * 96; + if (_bitmap == null || _bitmap.PixelWidth != (int) size.Width || _bitmap.PixelHeight != (int) size.Height) + { + _bitmap = new WriteableBitmap((int) size.Width, (int) size.Height, dpi.X, dpi.Y, + PixelFormats.Bgra32, null); + } + return new LockedFramebuffer(_impl, _bitmap, dpi); + } + + internal class LockedFramebuffer : ILockedFramebuffer + { + private readonly WpfTopLevelImpl _impl; + private readonly WriteableBitmap _bitmap; + + public LockedFramebuffer(WpfTopLevelImpl impl, WriteableBitmap bitmap, Vector dpi) + { + _impl = impl; + _bitmap = bitmap; + Dpi = dpi; + _bitmap.Lock(); + } + + public void Dispose() + { + _bitmap.AddDirtyRect(new Int32Rect(0, 0, _bitmap.PixelWidth, _bitmap.PixelHeight)); + _bitmap.Unlock(); + /* + using (var fileStream = new FileStream("c:\\tools\\wat.png", FileMode.Create)) + { + BitmapEncoder encoder = new PngBitmapEncoder(); + encoder.Frames.Add(BitmapFrame.Create(_bitmap)); + encoder.Save(fileStream); + }*/ + _impl.ImageSource = _bitmap; + } + + public IntPtr Address => _bitmap.BackBuffer; + public int Width => _bitmap.PixelWidth; + public int Height => _bitmap.PixelHeight; + public int RowBytes => _bitmap.BackBufferStride; + public Vector Dpi { get; } + public PixelFormat Format => PixelFormat.Bgra8888; + } + + Vector GetScaling() + { + var src = PresentationSource.FromVisual(_impl)?.CompositionTarget; + if (src == null) + return new Vector(1, 1); + return new Vector(src.TransformToDevice.M11, src.TransformToDevice.M22); + } + } +} From b4d43be327d639cb5419046e8afc2122c2a43772 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 5 Jun 2017 23:37:42 +0300 Subject: [PATCH 069/132] DevTools now can be attached to any toplevel --- .../WindowsInteropTest/EmbedToWpfDemo.xaml.cs | 9 ++++++++- src/Avalonia.Diagnostics/DevTools.xaml.cs | 18 +++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs index e60c9ced0a..eebd18dece 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs @@ -11,6 +11,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Avalonia; using Avalonia.Controls; using ControlCatalog; using Window = System.Windows.Window; @@ -25,7 +26,13 @@ namespace WindowsInteropTest public EmbedToWpfDemo() { InitializeComponent(); - Host.Content = new MainView(); + var view = new MainView(); + Host.Content = view; + view.AttachedToVisualTree += delegate + { + view.AttachDevTools(); + }; + } } } diff --git a/src/Avalonia.Diagnostics/DevTools.xaml.cs b/src/Avalonia.Diagnostics/DevTools.xaml.cs index b735372b59..e48cdf5681 100644 --- a/src/Avalonia.Diagnostics/DevTools.xaml.cs +++ b/src/Avalonia.Diagnostics/DevTools.xaml.cs @@ -16,9 +16,9 @@ namespace Avalonia { public static class WindowExtensions { - public static void AttachDevTools(this Window window) + public static void AttachDevTools(this Control control) { - Avalonia.Diagnostics.DevTools.Attach(window); + Avalonia.Diagnostics.DevTools.Attach((TopLevel)control.GetVisualRoot()); } } } @@ -27,7 +27,7 @@ namespace Avalonia.Diagnostics { public class DevTools : UserControl { - private static Dictionary s_open = new Dictionary(); + private static Dictionary s_open = new Dictionary(); private IDisposable _keySubscription; public DevTools(IControl root) @@ -43,9 +43,9 @@ namespace Avalonia.Diagnostics public IControl Root { get; } - public static IDisposable Attach(Window window) + public static IDisposable Attach(TopLevel control) { - return window.AddHandler( + return control.AddHandler( KeyDownEvent, WindowPreviewKeyDown, RoutingStrategies.Tunnel); @@ -55,16 +55,16 @@ namespace Avalonia.Diagnostics { if (e.Key == Key.F12) { - var window = (Window)sender; + var control = (TopLevel)sender; var devToolsWindow = default(Window); - if (s_open.TryGetValue(window, out devToolsWindow)) + if (s_open.TryGetValue(control, out devToolsWindow)) { devToolsWindow.Activate(); } else { - var devTools = new DevTools(window); + var devTools = new DevTools(control); devToolsWindow = new Window { @@ -78,7 +78,7 @@ namespace Avalonia.Diagnostics }; devToolsWindow.Closed += devTools.DevToolsClosed; - s_open.Add((Window)sender, devToolsWindow); + s_open.Add(control, devToolsWindow); devToolsWindow.Show(); } } From 3126901721ea3f20c4c2c784cbc9f4dcf1e8ceea Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 17:36:01 +0300 Subject: [PATCH 070/132] WPF embedding improvements --- .../WindowsInteropTest/EmbedToWpfDemo.xaml | 11 ++++++ .../WindowsInteropTest/EmbedToWpfDemo.xaml.cs | 5 +++ src/Avalonia.Layout/Layoutable.cs | 2 +- .../Avalonia.Win32.Interop.csproj | 12 +++++++ .../Wpf/WpfAvaloniaHost.cs | 35 +++++++++++++++---- .../Wpf/WpfTopLevelImpl.cs | 11 ++++++ 6 files changed, 69 insertions(+), 7 deletions(-) diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml index 5a346d4e8d..1d8dc32a69 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml @@ -1,6 +1,7 @@  + + + + + + + + + + diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs index eebd18dece..636d89dc70 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs @@ -32,6 +32,11 @@ namespace WindowsInteropTest { view.AttachDevTools(); }; + var btn = (Avalonia.Controls.Button) RightBtn.Content; + btn.Click += delegate + { + btn.Content += "!"; + }; } } diff --git a/src/Avalonia.Layout/Layoutable.cs b/src/Avalonia.Layout/Layoutable.cs index 20050058bf..3f6d789877 100644 --- a/src/Avalonia.Layout/Layoutable.cs +++ b/src/Avalonia.Layout/Layoutable.cs @@ -370,7 +370,7 @@ namespace Avalonia.Layout /// /// Invalidates the measurement of the control and queues a new layout pass. /// - public void InvalidateMeasure() + public virtual void InvalidateMeasure() { if (IsMeasureValid) { diff --git a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj index ae61fc697f..e2d764c62c 100644 --- a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj +++ b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj @@ -68,6 +68,10 @@ {d2221c82-4a25-4583-9b43-d791e3f6820c} Avalonia.Controls + + {4a1abb09-9047-4bd5-a4ad-a055e52c5ee0} + Avalonia.DotNetFrameworkRuntime + {62024b2d-53eb-4638-b26b-85eeaa54866e} Avalonia.Input @@ -92,6 +96,14 @@ {fb05ac90-89ba-4f2f-a924-f37875fb547c} Avalonia.Cairo + + {3e53a01a-b331-47f3-b828-4a5717e77a24} + Avalonia.Markup.Xaml + + + {6417e941-21bc-467b-a771-0de389353ce6} + Avalonia.Markup + {811a76cf-1cf6-440f-963b-bbe31bd72a82} Avalonia.Win32 diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs index 2d350fbe30..4f85a326f0 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs @@ -1,29 +1,35 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; +using System.Windows.Markup; using System.Windows.Media; +using Avalonia.Markup.Xaml.Styling; +using Avalonia.Platform; +using Avalonia.Styling; namespace Avalonia.Win32.Interop.Wpf { - public class WpfAvaloniaHost : FrameworkElement, IDisposable + [ContentProperty("Content")] + public class WpfAvaloniaHost : FrameworkElement, IDisposable, IAddChild { - private WpfTopLevelImpl _impl = new WpfTopLevelImpl(); + private WpfTopLevelImpl _impl; private readonly SynchronizationContext _sync; public WpfAvaloniaHost() { _sync = SynchronizationContext.Current; + _impl = new WpfTopLevelImpl(); _impl.ControlRoot.Prepare(); _impl.Visibility = Visibility.Visible; AddLogicalChild(_impl); AddVisualChild(_impl); } - public object Content { @@ -47,9 +53,13 @@ namespace Avalonia.Win32.Interop.Wpf } } - protected override System.Windows.Size MeasureOverride(System.Windows.Size constraint) - => _impl.ControlRoot.MeasureBase(constraint.ToAvaloniaSize()).ToWpfSize(); - + protected override System.Windows.Size MeasureOverride(System.Windows.Size constraint) + { + _impl.InvalidateMeasure(); + _impl.Measure(constraint); + return _impl.DesiredSize; + } + protected override System.Windows.Size ArrangeOverride(System.Windows.Size arrangeSize) { _impl.Arrange(new System.Windows.Rect(arrangeSize)); @@ -76,5 +86,18 @@ namespace Avalonia.Win32.Interop.Wpf GC.SuppressFinalize(this); } } + + void IAddChild.AddChild(object value) + { + if (Content == null) + Content = value; + else + throw new InvalidOperationException(); + } + + void IAddChild.AddText(string text) + { + // + } } } diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 56dc26992e..c82b71d3a5 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -33,6 +33,15 @@ namespace Avalonia.Win32.Interop.Wpf public EmbeddableControlRoot ControlRoot { get; } internal ImageSource ImageSource { get; set; } + public class CustomControlRoot : EmbeddableControlRoot + { + public override void InvalidateMeasure() + { + base.InvalidateMeasure(); + ((FrameworkElement)PlatformImpl)?.InvalidateMeasure(); + } + } + public WpfTopLevelImpl() { PresentationSource.AddSourceChangedHandler(this, OnSourceChanged); @@ -158,6 +167,8 @@ namespace Avalonia.Win32.Interop.Wpf _ttl.Input?.Invoke(new RawMouseWheelEventArgs(_mouse, (uint) e.Timestamp, _inputRoot, e.GetPosition(this).ToAvaloniaPoint(), new Vector(0, e.Delta), GetModifiers())); + protected override void OnMouseLeave(MouseEventArgs e) => MouseEvent(RawMouseEventType.LeaveWindow, e); + protected override void OnKeyDown(KeyEventArgs e) => _ttl.Input?.Invoke(new RawKeyEventArgs(_keyboard, (uint) e.Timestamp, RawKeyEventType.KeyDown, (Key) e.Key, From d06c9e04eda93b0a47793ed667f7d72ad2cb125a Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 18:43:47 +0300 Subject: [PATCH 071/132] WPF integration improvements --- .../Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs | 1 + .../Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs index 4f85a326f0..e36b53199a 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs @@ -29,6 +29,7 @@ namespace Avalonia.Win32.Interop.Wpf _impl.Visibility = Visibility.Visible; AddLogicalChild(_impl); AddVisualChild(_impl); + SnapsToDevicePixels = true; } public object Content diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index c82b71d3a5..7be6b7e800 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -54,6 +54,10 @@ namespace Avalonia.Win32.Interop.Wpf ControlRoot = new EmbeddableControlRoot(this); SnapsToDevicePixels = true; Focusable = true; + DataContextChanged += delegate + { + ControlRoot.DataContext = DataContext; + }; } private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam, ref bool handled) @@ -80,15 +84,18 @@ namespace Avalonia.Win32.Interop.Wpf IEnumerable ITopLevelImpl.Surfaces => _surfaces; + private Size _previousSize; protected override System.Windows.Size ArrangeOverride(System.Windows.Size finalSize) { _finalSize = finalSize.ToAvaloniaSize(); + if (_finalSize == _previousSize) + return finalSize; + _previousSize = _finalSize; _ttl.Resized?.Invoke(finalSize.ToAvaloniaSize()); return base.ArrangeOverride(finalSize); } - protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) - => ControlRoot.MeasureBase(availableSize.ToAvaloniaSize()).ToWpfSize(); + protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) => ControlRoot.MeasureBase(availableSize.ToAvaloniaSize()).ToWpfSize(); protected override void OnRender(DrawingContext drawingContext) { From df13ab2ecb1b889a4acc759d085bd17ea810f902 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 19:09:17 +0300 Subject: [PATCH 072/132] [TEMP] Call measure directly --- .../Embedding/EmbeddableControlRoot.cs | 12 ++++++------ .../Wpf/WpfTopLevelImpl.cs | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs b/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs index 45b4f8eaa1..179dccaf76 100644 --- a/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs +++ b/src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs @@ -22,6 +22,8 @@ namespace Avalonia.Controls.Embedding [CanBeNull] public new IEmbeddableWindowImpl PlatformImpl => (IEmbeddableWindowImpl) base.PlatformImpl; + protected bool EnforceClientSize { get; set; } = true; + public void Prepare() { EnsureInitialized(); @@ -38,14 +40,12 @@ namespace Avalonia.Controls.Embedding init.EndInit(); } } - - public Size MeasureBase(Size availableSize) => base.MeasureOverride(availableSize); - + protected override Size MeasureOverride(Size availableSize) { - var cs = PlatformImpl?.ClientSize ?? default(Size); - base.MeasureOverride(cs); - return cs; + if (EnforceClientSize) + availableSize = PlatformImpl?.ClientSize ?? default(Size); + return base.MeasureOverride(availableSize); } private readonly NameScope _nameScope = new NameScope(); diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 7be6b7e800..b74358ec4d 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -35,10 +35,16 @@ namespace Avalonia.Win32.Interop.Wpf public class CustomControlRoot : EmbeddableControlRoot { + public CustomControlRoot() + { + EnforceClientSize = false; + + } + public override void InvalidateMeasure() { - base.InvalidateMeasure(); ((FrameworkElement)PlatformImpl)?.InvalidateMeasure(); + base.InvalidateMeasure(); } } @@ -95,10 +101,16 @@ namespace Avalonia.Win32.Interop.Wpf return base.ArrangeOverride(finalSize); } - protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) => ControlRoot.MeasureBase(availableSize.ToAvaloniaSize()).ToWpfSize(); + protected override System.Windows.Size MeasureOverride(System.Windows.Size availableSize) + { + ControlRoot.Measure(availableSize.ToAvaloniaSize()); + return ControlRoot.DesiredSize.ToWpfSize(); + } protected override void OnRender(DrawingContext drawingContext) { + if(ActualHeight == 0 || ActualWidth == 0) + return; _ttl.Paint?.Invoke(new Rect(0, 0, ActualWidth, ActualHeight)); if (ImageSource != null) drawingContext.DrawImage(ImageSource, new System.Windows.Rect(0, 0, ActualWidth, ActualHeight)); From b84e9e1123943013cf85412b89e8c67911fcb99a Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 19:15:42 +0300 Subject: [PATCH 073/132] Use correct control root --- src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index b74358ec4d..927c975399 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -35,15 +35,14 @@ namespace Avalonia.Win32.Interop.Wpf public class CustomControlRoot : EmbeddableControlRoot { - public CustomControlRoot() + public CustomControlRoot(WpfTopLevelImpl impl) : base(impl) { EnforceClientSize = false; - } public override void InvalidateMeasure() { - ((FrameworkElement)PlatformImpl)?.InvalidateMeasure(); + ((FrameworkElement) PlatformImpl)?.InvalidateMeasure(); base.InvalidateMeasure(); } } @@ -57,7 +56,7 @@ namespace Avalonia.Win32.Interop.Wpf _mouse = new WpfMouseDevice(this); _keyboard = AvaloniaLocator.Current.GetService(); - ControlRoot = new EmbeddableControlRoot(this); + ControlRoot = new CustomControlRoot(this); SnapsToDevicePixels = true; Focusable = true; DataContextChanged += delegate From 317b0f7034ebfa00e69371a8e2d7d5378b169c3b Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 19:34:04 +0300 Subject: [PATCH 074/132] testtesttest --- src/Avalonia.Layout/Layoutable.cs | 2 +- .../Wpf/WpfTopLevelImpl.cs | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Layout/Layoutable.cs b/src/Avalonia.Layout/Layoutable.cs index 3f6d789877..778a869003 100644 --- a/src/Avalonia.Layout/Layoutable.cs +++ b/src/Avalonia.Layout/Layoutable.cs @@ -399,7 +399,7 @@ namespace Avalonia.Layout } /// - void ILayoutable.ChildDesiredSizeChanged(ILayoutable control) + public virtual void ChildDesiredSizeChanged(ILayoutable control) { if (!_measuring) { diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 927c975399..1aa09853ab 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -40,10 +40,23 @@ namespace Avalonia.Win32.Interop.Wpf EnforceClientSize = false; } - public override void InvalidateMeasure() + public override void ChildDesiredSizeChanged(ILayoutable control) { - ((FrameworkElement) PlatformImpl)?.InvalidateMeasure(); - base.InvalidateMeasure(); + ((FrameworkElement)PlatformImpl)?.InvalidateMeasure(); + base.ChildDesiredSizeChanged(control); + } + + protected override void HandleResized(Size clientSize) + { + ClientSize = clientSize; + LayoutManager.Instance.ExecuteLayoutPass(); + Renderer?.Resized(clientSize); + } + + protected override void ArrangeCore(Rect finalRect) + { + base.ArrangeOverride(finalRect.Size); + Bounds = finalRect; } } From 09c9d7b7d516d30192e1fdefe45125023499cac0 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 20:03:27 +0300 Subject: [PATCH 075/132] Layout integration seems to be working now --- src/Avalonia.Layout/LayoutManager.cs | 2 +- src/Avalonia.Layout/Layoutable.cs | 2 +- .../Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs | 10 ++-------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Avalonia.Layout/LayoutManager.cs b/src/Avalonia.Layout/LayoutManager.cs index b7b83bf852..93c2227cab 100644 --- a/src/Avalonia.Layout/LayoutManager.cs +++ b/src/Avalonia.Layout/LayoutManager.cs @@ -151,7 +151,7 @@ namespace Avalonia.Layout if (root != null) { - root.Arrange(new Rect(root.DesiredSize)); + root.Arrange(new Rect(root.ClientSize)); } else if (parent != null) { diff --git a/src/Avalonia.Layout/Layoutable.cs b/src/Avalonia.Layout/Layoutable.cs index 778a869003..3f6d789877 100644 --- a/src/Avalonia.Layout/Layoutable.cs +++ b/src/Avalonia.Layout/Layoutable.cs @@ -399,7 +399,7 @@ namespace Avalonia.Layout } /// - public virtual void ChildDesiredSizeChanged(ILayoutable control) + void ILayoutable.ChildDesiredSizeChanged(ILayoutable control) { if (!_measuring) { diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 1aa09853ab..c990bb708e 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -40,10 +40,10 @@ namespace Avalonia.Win32.Interop.Wpf EnforceClientSize = false; } - public override void ChildDesiredSizeChanged(ILayoutable control) + public override void InvalidateMeasure() { ((FrameworkElement)PlatformImpl)?.InvalidateMeasure(); - base.ChildDesiredSizeChanged(control); + base.InvalidateMeasure(); } protected override void HandleResized(Size clientSize) @@ -52,12 +52,6 @@ namespace Avalonia.Win32.Interop.Wpf LayoutManager.Instance.ExecuteLayoutPass(); Renderer?.Resized(clientSize); } - - protected override void ArrangeCore(Rect finalRect) - { - base.ArrangeOverride(finalRect.Size); - Bounds = finalRect; - } } public WpfTopLevelImpl() From a2c46aceea16a9f9aced2292f0491999fa4fa5ec Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 7 Jun 2017 20:08:39 +0300 Subject: [PATCH 076/132] Removed old wpf control host and added new nuget package --- packages.cake | 15 ++++++ .../Embedding/WpfAvaloniaControlHost.cs | 52 ------------------- 2 files changed, 15 insertions(+), 52 deletions(-) delete mode 100644 src/Windows/Avalonia.Win32/Embedding/WpfAvaloniaControlHost.cs diff --git a/packages.cake b/packages.cake index 1e8e356694..bc1aeef416 100644 --- a/packages.cake +++ b/packages.cake @@ -465,6 +465,21 @@ 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 }, + }, + 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 /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Windows/Avalonia.Win32/Embedding/WpfAvaloniaControlHost.cs b/src/Windows/Avalonia.Win32/Embedding/WpfAvaloniaControlHost.cs deleted file mode 100644 index 663f6906ed..0000000000 --- a/src/Windows/Avalonia.Win32/Embedding/WpfAvaloniaControlHost.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Forms.Integration; -using System.Windows.Interop; -using Avalonia.Controls; -using Avalonia.Win32.Interop; - -namespace Avalonia.Win32.Embedding -{ - public class WpfAvaloniaControlHost : HwndHost - { - private WinFormsAvaloniaControlHost _host; - private Avalonia.Controls.Control _content; - - public Avalonia.Controls.Control Content - { - get { return _content; } - set - { - if (_host != null) - _host.Content = value; - _content = value; - - } - } - - void DestroyHost() - { - _host?.Dispose(); - _host = null; - } - - protected override HandleRef BuildWindowCore(HandleRef hwndParent) - { - DestroyHost(); - _host = new WinFormsAvaloniaControlHost {Content = _content}; - UnmanagedMethods.SetParent(_host.Handle, hwndParent.Handle); - return new HandleRef(this, _host.Handle); - } - - protected override void DestroyWindowCore(HandleRef hwnd) - { - DestroyHost(); - } - } -} From 1d44d3f7afde95c613164b1f56ac6a95b2fa48d0 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Thu, 8 Jun 2017 22:07:28 +0300 Subject: [PATCH 077/132] Removed reference to the old host --- src/Windows/Avalonia.Win32/Avalonia.Win32.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj b/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj index b134f4666e..198bb7ce0d 100644 --- a/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj +++ b/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj @@ -57,7 +57,6 @@ Component - From 1150af791c384447b583d5e0295b339efcdd36ef Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Thu, 22 Jun 2017 23:58:46 +0200 Subject: [PATCH 078/132] Reworked how ContentPresenter child is updated. Update immediately when attached to a logical tree. Also separate tests for different scenarios. --- .../Presenters/ContentPresenter.cs | 37 ++- .../Avalonia.Controls.UnitTests.csproj | 3 + .../ContentPresenterTests_InTemplate.cs | 265 ++++++++++++++++++ ...cs => ContentPresenterTests_Standalone.cs} | 190 +------------ .../ContentPresenterTests_Unrooted.cs | 102 +++++++ 5 files changed, 404 insertions(+), 193 deletions(-) create mode 100644 tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs rename tests/Avalonia.Controls.UnitTests/Presenters/{ContentPresenterTests.cs => ContentPresenterTests_Standalone.cs} (52%) create mode 100644 tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Unrooted.cs diff --git a/src/Avalonia.Controls/Presenters/ContentPresenter.cs b/src/Avalonia.Controls/Presenters/ContentPresenter.cs index 40fc2f302c..07a087365d 100644 --- a/src/Avalonia.Controls/Presenters/ContentPresenter.cs +++ b/src/Avalonia.Controls/Presenters/ContentPresenter.cs @@ -8,6 +8,7 @@ using Avalonia.Controls.Templates; using Avalonia.Layout; using Avalonia.LogicalTree; using Avalonia.Media; +using Avalonia.VisualTree; namespace Avalonia.Controls.Presenters { @@ -313,27 +314,22 @@ namespace Avalonia.Controls.Presenters if (content != null && newChild == null) { - // We have content and it isn't a control, so first try to recycle the existing - // child control to display the new data by querying if the template that created - // the child can recycle items and that it also matches the new data. - if (oldChild != null && - _dataTemplate != null && - _dataTemplate.SupportsRecycling && - _dataTemplate.Match(content)) + var dataTemplate = this.FindDataTemplate(content, ContentTemplate) ?? FuncDataTemplate.Default; + + // We have content and it isn't a control, so if the new data template is the same + // as the old data template, try to recycle the existing child control to display + // the new data. + if (dataTemplate == _dataTemplate && dataTemplate.SupportsRecycling) { newChild = oldChild; } else { - // We couldn't recycle an existing control so find a data template for the data - // and use it to create a control. - _dataTemplate = this.FindDataTemplate(content, ContentTemplate) ?? FuncDataTemplate.Default; + _dataTemplate = dataTemplate; newChild = _dataTemplate.Build(content); - // Try to give the new control its own name scope. - var controlResult = newChild as Control; - - if (controlResult != null) + // Give the new control its own name scope. + if (newChild is Control controlResult) { NameScope.SetNameScope(controlResult, new NameScope()); } @@ -424,6 +420,19 @@ namespace Avalonia.Controls.Presenters private void ContentChanged(AvaloniaPropertyChangedEventArgs e) { _createdChild = false; + + if (((ILogical)this).IsAttachedToLogicalTree) + { + UpdateChild(); + } + else if (Child != null) + { + VisualChildren.Remove(Child); + LogicalChildren.Remove(Child); + Child = null; + _dataTemplate = null; + } + InvalidateMeasure(); } diff --git a/tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj b/tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj index f7b63cdb75..957cdd7036 100644 --- a/tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj +++ b/tests/Avalonia.Controls.UnitTests/Avalonia.Controls.UnitTests.csproj @@ -8,6 +8,9 @@ + + + diff --git a/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs new file mode 100644 index 0000000000..9ea03587ed --- /dev/null +++ b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs @@ -0,0 +1,265 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System.Linq; +using Avalonia.Controls.Presenters; +using Avalonia.Controls.Templates; +using Avalonia.LogicalTree; +using Avalonia.UnitTests; +using Avalonia.VisualTree; +using Moq; +using Xunit; + +namespace Avalonia.Controls.UnitTests.Presenters +{ + /// + /// Tests for ContentControls that are hosted in a control template. + /// + public class ContentPresenterTests_InTemplate + { + [Fact] + public void Should_Register_With_Host_When_TemplatedParent_Set() + { + var host = new Mock(); + var target = new ContentPresenter(); + + target.SetValue(Control.TemplatedParentProperty, host.Object); + + host.Verify(x => x.RegisterContentPresenter(target)); + } + + [Fact] + public void Setting_Content_To_Control_Should_Set_Child() + { + var (target, _) = CreateTarget(); + var child = new Border(); + + target.Content = child; + + Assert.Equal(child, target.Child); + } + + [Fact] + public void Setting_Content_To_Control_Should_Update_Logical_Tree() + { + var (target, parent) = CreateTarget(); + var child = new Border(); + + target.Content = child; + + Assert.Equal(parent, child.GetLogicalParent()); + Assert.Equal(new[] { child }, parent.GetLogicalChildren()); + } + + [Fact] + public void Setting_Content_To_Control_Should_Update_Visual_Tree() + { + var (target, _) = CreateTarget(); + var child = new Border(); + + target.Content = child; + + Assert.Equal(target, child.GetVisualParent()); + Assert.Equal(new[] { child }, target.GetVisualChildren()); + } + + [Fact] + public void Setting_Content_To_String_Should_Create_TextBlock() + { + var (target, _) = CreateTarget(); + + target.Content = "Foo"; + + Assert.IsType(target.Child); + Assert.Equal("Foo", ((TextBlock)target.Child).Text); + } + + [Fact] + public void Setting_Content_To_String_Should_Update_Logical_Tree() + { + var (target, parent) = CreateTarget(); + + target.Content = "Foo"; + + var child = target.Child; + Assert.Equal(parent, child.GetLogicalParent()); + Assert.Equal(new[] { child }, parent.GetLogicalChildren()); + } + + [Fact] + public void Setting_Content_To_String_Should_Update_Visual_Tree() + { + var (target, _) = CreateTarget(); + + target.Content = "Foo"; + + var child = target.Child; + Assert.Equal(target, child.GetVisualParent()); + Assert.Equal(new[] { child }, target.GetVisualChildren()); + } + + [Fact] + public void Clearing_Control_Content_Should_Update_Logical_Tree() + { + var (target, _) = CreateTarget(); + var child = new Border(); + + target.Content = child; + target.Content = null; + + Assert.Equal(null, child.GetLogicalParent()); + Assert.Empty(target.GetLogicalChildren()); + } + + [Fact] + public void Clearing_Control_Content_Should_Update_Visual_Tree() + { + var (target, _) = CreateTarget(); + var child = new Border(); + + target.Content = child; + target.Content = null; + + Assert.Equal(null, child.GetVisualParent()); + Assert.Empty(target.GetVisualChildren()); + } + + [Fact] + public void Control_Content_Should_Not_Be_NameScope() + { + var (target, _) = CreateTarget(); + + target.Content = new TextBlock(); + + Assert.IsType(target.Child); + Assert.Null(NameScope.GetNameScope((Control)target.Child)); + } + + [Fact] + public void DataTemplate_Created_Control_Should_Be_NameScope() + { + var (target, _) = CreateTarget(); + + target.Content = "Foo"; + + Assert.IsType(target.Child); + Assert.NotNull(NameScope.GetNameScope((Control)target.Child)); + } + + [Fact] + public void Assigning_Control_To_Content_Should_Not_Set_DataContext() + { + var (target, _) = CreateTarget(); + target.Content = new Border(); + + Assert.False(target.IsSet(Control.DataContextProperty)); + } + + [Fact] + public void Assigning_NonControl_To_Content_Should_Set_DataContext_On_UpdateChild() + { + var (target, _) = CreateTarget(); + target.Content = "foo"; + + Assert.Equal("foo", target.DataContext); + } + + [Fact] + public void Assigning_Control_To_Content_After_NonControl_Should_Clear_DataContext() + { + var (target, _) = CreateTarget(); + + target.Content = "foo"; + + Assert.True(target.IsSet(Control.DataContextProperty)); + + target.Content = new Border(); + + Assert.False(target.IsSet(Control.DataContextProperty)); + } + + [Fact] + public void Recycles_DataTemplate() + { + var (target, _) = CreateTarget(); + target.DataTemplates.Add(new FuncDataTemplate(_ => new Border(), true)); + + target.Content = "foo"; + + var control = target.Child; + Assert.IsType(control); + + target.Content = "bar"; + Assert.Same(control, target.Child); + } + + [Fact] + public void Detects_DataTemplate_Doesnt_Match_And_Doesnt_Recycle() + { + var (target, _) = CreateTarget(); + target.DataTemplates.Add(new FuncDataTemplate(x => x == "foo", _ => new Border(), true)); + + target.Content = "foo"; + + var control = target.Child; + Assert.IsType(control); + + target.Content = "bar"; + Assert.IsType(target.Child); + } + + [Fact] + public void Detects_DataTemplate_Doesnt_Support_Recycling() + { + var (target, _) = CreateTarget(); + target.DataTemplates.Add(new FuncDataTemplate(_ => new Border(), false)); + + target.Content = "foo"; + + var control = target.Child; + Assert.IsType(control); + + target.Content = "bar"; + Assert.NotSame(control, target.Child); + } + + [Fact] + public void Reevaluates_DataTemplates_When_Recycling() + { + var (target, _) = CreateTarget(); + + target.DataTemplates.Add(new FuncDataTemplate(x => x == "bar", _ => new Canvas(), true)); + target.DataTemplates.Add(new FuncDataTemplate(_ => new Border(), true)); + + target.Content = "foo"; + + var control = target.Child; + Assert.IsType(control); + + target.Content = "bar"; + Assert.IsType(target.Child); + } + + (ContentPresenter presenter, ContentControl templatedParent) CreateTarget() + { + var templatedParent = new ContentControl + { + Template = new FuncControlTemplate(x => + new ContentPresenter + { + Name = "PART_ContentPresenter", + }), + }; + var root = new TestRoot { Child = templatedParent }; + + templatedParent.ApplyTemplate(); + + return ((ContentPresenter)templatedParent.Presenter, templatedParent); + } + + private class TestContentControl : ContentControl + { + public IControl Child { get; set; } + } + } +} \ No newline at end of file diff --git a/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests.cs b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Standalone.cs similarity index 52% rename from tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests.cs rename to tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Standalone.cs index 88d26334ed..589b1d67d2 100644 --- a/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests.cs +++ b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Standalone.cs @@ -15,91 +15,13 @@ using Xunit; namespace Avalonia.Controls.UnitTests.Presenters { - public class ContentPresenterTests + /// + /// Tests for ContentControls that aren't hosted in a control template. + /// + public class ContentPresenterTests_Standalone { [Fact] - public void Should_Register_With_Host_When_TemplatedParent_Set() - { - var host = new Mock(); - var target = new ContentPresenter(); - - target.SetValue(Control.TemplatedParentProperty, host.Object); - - host.Verify(x => x.RegisterContentPresenter(target)); - } - - [Fact] - public void Setting_Content_To_Control_Should_Set_Child() - { - var target = new ContentPresenter(); - var child = new Border(); - - target.Content = child; - - Assert.Null(target.Child); - target.UpdateChild(); - Assert.Equal(child, target.Child); - } - - [Fact] - public void Setting_Content_To_String_Should_Create_TextBlock() - { - var target = new ContentPresenter(); - - target.Content = "Foo"; - - Assert.Null(target.Child); - target.UpdateChild(); - Assert.IsType(target.Child); - Assert.Equal("Foo", ((TextBlock)target.Child).Text); - } - - [Fact] - public void Control_Content_Should_Not_Be_NameScope() - { - var target = new ContentPresenter(); - - target.Content = new TextBlock(); - - Assert.Null(target.Child); - target.UpdateChild(); - Assert.IsType(target.Child); - Assert.Null(NameScope.GetNameScope((Control)target.Child)); - } - - [Fact] - public void DataTemplate_Created_Control_Should_Be_NameScope() - { - var target = new ContentPresenter(); - - target.Content = "Foo"; - - Assert.Null(target.Child); - target.UpdateChild(); - Assert.IsType(target.Child); - Assert.NotNull(NameScope.GetNameScope((Control)target.Child)); - } - - [Fact] - public void Should_Set_Childs_Parent_To_TemplatedParent() - { - var content = new Border(); - var target = new TestContentControl - { - Template = new FuncControlTemplate(parent => - new ContentPresenter { Content = parent.Child }), - Child = content, - }; - - target.ApplyTemplate(); - var presenter = ((ContentPresenter)target.GetVisualChildren().Single()); - presenter.UpdateChild(); - - Assert.Same(target, content.Parent); - } - - [Fact] - public void Should_Set_Childs_Parent_To_Itself_Outside_Template() + public void Should_Set_Childs_Parent_To_Itself_Standalone() { var content = new Border(); var target = new ContentPresenter { Content = content }; @@ -110,7 +32,7 @@ namespace Avalonia.Controls.UnitTests.Presenters } [Fact] - public void Should_Add_Child_To_Own_LogicalChildren_Outside_Template() + public void Should_Add_Child_To_Own_LogicalChildren_Standalone() { var content = new Border(); var target = new ContentPresenter { Content = content }; @@ -124,94 +46,7 @@ namespace Avalonia.Controls.UnitTests.Presenters } [Fact] - public void Adding_To_Logical_Tree_Should_Reevaluate_DataTemplates() - { - var target = new ContentPresenter - { - Content = "Foo", - }; - - target.UpdateChild(); - Assert.IsType(target.Child); - - var root = new TestRoot - { - DataTemplates = new DataTemplates - { - new FuncDataTemplate(x => new Decorator()), - }, - }; - - root.Child = target; - target.ApplyTemplate(); - Assert.IsType(target.Child); - } - - [Fact] - public void Assigning_Control_To_Content_Should_Not_Set_DataContext() - { - var target = new ContentPresenter - { - Content = new Border(), - }; - - Assert.False(target.IsSet(Control.DataContextProperty)); - } - - [Fact] - public void Assigning_NonControl_To_Content_Should_Set_DataContext_On_UpdateChild() - { - var target = new ContentPresenter - { - Content = "foo", - }; - - target.UpdateChild(); - - Assert.Equal("foo", target.DataContext); - } - - [Fact] - public void Assigning_Control_To_Content_After_NonControl_Should_Clear_DataContext() - { - var target = new ContentPresenter(); - - target.Content = "foo"; - target.UpdateChild(); - - Assert.True(target.IsSet(Control.DataContextProperty)); - - target.Content = new Border(); - target.UpdateChild(); - - Assert.False(target.IsSet(Control.DataContextProperty)); - } - - [Fact] - public void Tries_To_Recycle_DataTemplate() - { - var target = new ContentPresenter - { - DataTemplates = new DataTemplates - { - new FuncDataTemplate(_ => new Border(), true), - }, - Content = "foo", - }; - - target.UpdateChild(); - var control = target.Child; - - Assert.IsType(control); - - target.Content = "bar"; - target.UpdateChild(); - - Assert.Same(control, target.Child); - } - - [Fact] - public void Should_Raise_DetachedFromLogicalTree_On_Content_Changed_OutsideTemplate() + public void Should_Raise_DetachedFromLogicalTree_On_Content_Changed_Standalone() { var target = new ContentPresenter { @@ -250,7 +85,7 @@ namespace Avalonia.Controls.UnitTests.Presenters } [Fact] - public void Should_Raise_DetachedFromLogicalTree_In_ContentControl_On_Content_Changed_OutsideTemplate() + public void Should_Raise_DetachedFromLogicalTree_In_ContentControl_On_Content_Changed_Standalone() { var contentControl = new ContentControl { @@ -292,13 +127,14 @@ namespace Avalonia.Controls.UnitTests.Presenters var tbbar = target.Child as ContentControl; Assert.NotNull(tbbar); + Assert.True(tbbar != tbfoo); Assert.False((tbfoo as IControl).IsAttachedToLogicalTree); Assert.True(foodetached); } [Fact] - public void Should_Raise_DetachedFromLogicalTree_On_Detached_OutsideTemplate() + public void Should_Raise_DetachedFromLogicalTree_On_Detached_Standalone() { var target = new ContentPresenter { @@ -332,7 +168,7 @@ namespace Avalonia.Controls.UnitTests.Presenters } [Fact] - public void Should_Remove_Old_Child_From_LogicalChildren_On_ContentChanged_OutsideTemplate() + public void Should_Remove_Old_Child_From_LogicalChildren_On_ContentChanged_Standalone() { var target = new ContentPresenter { @@ -363,9 +199,5 @@ namespace Avalonia.Controls.UnitTests.Presenters Assert.NotEqual(foo, logicalChildren.First()); } - private class TestContentControl : ContentControl - { - public IControl Child { get; set; } - } } } \ No newline at end of file diff --git a/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Unrooted.cs b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Unrooted.cs new file mode 100644 index 0000000000..3585109dee --- /dev/null +++ b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_Unrooted.cs @@ -0,0 +1,102 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using Avalonia.Controls.Presenters; +using Avalonia.Controls.Templates; +using Avalonia.UnitTests; +using Xunit; + +namespace Avalonia.Controls.UnitTests.Presenters +{ + /// + /// Tests for ContentControls that are not attached to a logical tree. + /// + public class ContentPresenterTests_Unrooted + { + [Fact] + public void Setting_Content_To_Control_Should_Not_Set_Child_Unless_UpdateChild_Called() + { + var target = new ContentPresenter(); + var child = new Border(); + + target.Content = child; + Assert.Null(target.Child); + + target.ApplyTemplate(); + Assert.Null(target.Child); + + target.UpdateChild(); + Assert.Equal(child, target.Child); + } + + [Fact] + public void Setting_Content_To_String_Should_Not_Create_TextBlock_Unless_UpdateChild_Called() + { + var target = new ContentPresenter(); + + target.Content = "Foo"; + Assert.Null(target.Child); + + target.ApplyTemplate(); + Assert.Null(target.Child); + + target.UpdateChild(); + Assert.IsType(target.Child); + Assert.Equal("Foo", ((TextBlock)target.Child).Text); + } + + [Fact] + public void Clearing_Control_Content_Should_Remove_Child_Immediately() + { + var target = new ContentPresenter(); + var child = new Border(); + + target.Content = child; + target.UpdateChild(); + Assert.Equal(child, target.Child); + + target.Content = null; + Assert.Null(target.Child); + } + + [Fact] + public void Clearing_String_Content_Should_Remove_Child_Immediately() + { + var target = new ContentPresenter(); + + target.Content = "Foo"; + target.UpdateChild(); + Assert.IsType(target.Child); + + target.Content = null; + Assert.Null(target.Child); + } + + [Fact] + public void Adding_To_Logical_Tree_Should_Reevaluate_DataTemplates() + { + var root = new TestRoot(); + var target = new ContentPresenter(); + + target.Content = "Foo"; + Assert.Null(target.Child); + + root.Child = target; + target.ApplyTemplate(); + Assert.IsType(target.Child); + + root.Child = null; + root = new TestRoot + { + DataTemplates = new DataTemplates + { + new FuncDataTemplate(x => new Decorator()), + }, + }; + + root.Child = target; + target.ApplyTemplate(); + Assert.IsType(target.Child); + } + } +} \ No newline at end of file From 0d492ca16a4dff35148190cbd3da049c03f58f43 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 23 Jun 2017 21:46:23 +0200 Subject: [PATCH 079/132] Update ContentPresenter when ContentTemplate changed. --- .../Presenters/ContentPresenter.cs | 1 + .../ContentPresenterTests_InTemplate.cs | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/Avalonia.Controls/Presenters/ContentPresenter.cs b/src/Avalonia.Controls/Presenters/ContentPresenter.cs index 07a087365d..c1adff402a 100644 --- a/src/Avalonia.Controls/Presenters/ContentPresenter.cs +++ b/src/Avalonia.Controls/Presenters/ContentPresenter.cs @@ -89,6 +89,7 @@ namespace Avalonia.Controls.Presenters static ContentPresenter() { ContentProperty.Changed.AddClassHandler(x => x.ContentChanged); + ContentTemplateProperty.Changed.AddClassHandler(x => x.ContentChanged); TemplatedParentProperty.Changed.AddClassHandler(x => x.TemplatedParentChanged); } diff --git a/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs index 9ea03587ed..e32c703409 100644 --- a/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs +++ b/tests/Avalonia.Controls.UnitTests/Presenters/ContentPresenterTests_InTemplate.cs @@ -164,6 +164,32 @@ namespace Avalonia.Controls.UnitTests.Presenters Assert.Equal("foo", target.DataContext); } + [Fact] + public void Should_Use_ContentTemplate_If_Specified() + { + var (target, _) = CreateTarget(); + + target.ContentTemplate = new FuncDataTemplate(_ => new Canvas()); + target.Content = "Foo"; + + Assert.IsType(target.Child); + } + + [Fact] + public void Should_Update_If_ContentTemplate_Changed() + { + var (target, _) = CreateTarget(); + + target.Content = "Foo"; + Assert.IsType(target.Child); + + target.ContentTemplate = new FuncDataTemplate(_ => new Canvas()); + Assert.IsType(target.Child); + + target.ContentTemplate = null; + Assert.IsType(target.Child); + } + [Fact] public void Assigning_Control_To_Content_After_NonControl_Should_Clear_DataContext() { From abf866cf610025a6b8431e5ba2cdc527efcd4a71 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 7 Jul 2017 23:46:58 +0300 Subject: [PATCH 080/132] Fixes to get it working again after merge --- .../interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs | 3 ++- src/Avalonia.Diagnostics/DevTools.xaml.cs | 4 +--- src/Avalonia.Layout/IEmbeddedLayoutRoot.cs | 10 ++++++++++ src/Avalonia.Layout/LayoutManager.cs | 10 ++++------ .../Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs | 4 +++- 5 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 src/Avalonia.Layout/IEmbeddedLayoutRoot.cs diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs index 636d89dc70..5ca2768d9e 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs @@ -27,11 +27,12 @@ namespace WindowsInteropTest { InitializeComponent(); var view = new MainView(); - Host.Content = view; + view.AttachedToVisualTree += delegate { view.AttachDevTools(); }; + Host.Content = view; var btn = (Avalonia.Controls.Button) RightBtn.Content; btn.Click += delegate { diff --git a/src/Avalonia.Diagnostics/DevTools.xaml.cs b/src/Avalonia.Diagnostics/DevTools.xaml.cs index e48cdf5681..85c3cfddd8 100644 --- a/src/Avalonia.Diagnostics/DevTools.xaml.cs +++ b/src/Avalonia.Diagnostics/DevTools.xaml.cs @@ -88,9 +88,7 @@ namespace Avalonia.Diagnostics { var devToolsWindow = (Window)sender; var devTools = (DevTools)devToolsWindow.Content; - var window = (Window)devTools.Root; - - s_open.Remove(window); + s_open.Remove((TopLevel)devTools.Root); _keySubscription.Dispose(); devToolsWindow.Closed -= DevToolsClosed; } diff --git a/src/Avalonia.Layout/IEmbeddedLayoutRoot.cs b/src/Avalonia.Layout/IEmbeddedLayoutRoot.cs new file mode 100644 index 0000000000..24f0ccd82e --- /dev/null +++ b/src/Avalonia.Layout/IEmbeddedLayoutRoot.cs @@ -0,0 +1,10 @@ +namespace Avalonia.Layout +{ + /// + /// A special layout root with enforced size for Arrange pass + /// + public interface IEmbeddedLayoutRoot : ILayoutRoot + { + Size AllocatedSize { get; } + } +} \ No newline at end of file diff --git a/src/Avalonia.Layout/LayoutManager.cs b/src/Avalonia.Layout/LayoutManager.cs index 0ff417e791..108922b5b9 100644 --- a/src/Avalonia.Layout/LayoutManager.cs +++ b/src/Avalonia.Layout/LayoutManager.cs @@ -186,14 +186,12 @@ namespace Avalonia.Layout if (!control.IsArrangeValid && control.IsAttachedToVisualTree) { - if (control is ILayoutRoot root) - { - root.Arrange(new Rect(root.ClientSize)); - } + if (control is IEmbeddedLayoutRoot embeddedRoot) + control.Arrange(new Rect(embeddedRoot.AllocatedSize)); + else if (control is ILayoutRoot root) + control.Arrange(new Rect(root.DesiredSize)); else - { control.Arrange(control.PreviousArrange.Value); - } } } diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index c990bb708e..229e330a33 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -33,7 +33,7 @@ namespace Avalonia.Win32.Interop.Wpf public EmbeddableControlRoot ControlRoot { get; } internal ImageSource ImageSource { get; set; } - public class CustomControlRoot : EmbeddableControlRoot + public class CustomControlRoot : EmbeddableControlRoot, IEmbeddedLayoutRoot { public CustomControlRoot(WpfTopLevelImpl impl) : base(impl) { @@ -52,6 +52,8 @@ namespace Avalonia.Win32.Interop.Wpf LayoutManager.Instance.ExecuteLayoutPass(); Renderer?.Resized(clientSize); } + + public Size AllocatedSize => ClientSize; } public WpfTopLevelImpl() From 85e40b9c0bc1fd8117b0798cd18fd7344b2a57c0 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 8 Jul 2017 17:26:00 +0200 Subject: [PATCH 081/132] Set e.Handled on command execution. Otherwise the `Click` event bubbles upwards causing #566. Fixes #566 --- src/Avalonia.Controls/Button.cs | 6 +++++- src/Avalonia.Controls/MenuItem.cs | 11 ++++++++++- src/Avalonia.Styling/Styling/Style.cs | 4 ++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Controls/Button.cs b/src/Avalonia.Controls/Button.cs index 2b3bbc8ad2..e6866b8142 100644 --- a/src/Avalonia.Controls/Button.cs +++ b/src/Avalonia.Controls/Button.cs @@ -207,7 +207,11 @@ namespace Avalonia.Controls /// The event args. protected virtual void OnClick(RoutedEventArgs e) { - Command?.Execute(CommandParameter); + if (Command != null) + { + Command.Execute(CommandParameter); + e.Handled = true; + } } /// diff --git a/src/Avalonia.Controls/MenuItem.cs b/src/Avalonia.Controls/MenuItem.cs index 3d15ed99e7..3d66fbc51b 100644 --- a/src/Avalonia.Controls/MenuItem.cs +++ b/src/Avalonia.Controls/MenuItem.cs @@ -102,6 +102,11 @@ namespace Avalonia.Controls AccessKeyHandler.AccessKeyPressedEvent.AddClassHandler(x => x.AccessKeyPressed); } + public MenuItem() + { + + } + /// /// Occurs when a without a submenu is clicked. /// @@ -192,7 +197,11 @@ namespace Avalonia.Controls /// The click event args. protected virtual void OnClick(RoutedEventArgs e) { - Command?.Execute(CommandParameter); + if (Command != null) + { + Command.Execute(CommandParameter); + e.Handled = true; + } } /// diff --git a/src/Avalonia.Styling/Styling/Style.cs b/src/Avalonia.Styling/Styling/Style.cs index be4282cdc0..c050ff0e75 100644 --- a/src/Avalonia.Styling/Styling/Style.cs +++ b/src/Avalonia.Styling/Styling/Style.cs @@ -61,12 +61,12 @@ namespace Avalonia.Styling } /// - /// Gets or sets style's selector. + /// Gets or sets the style's selector. /// public Selector Selector { get; set; } /// - /// Gets or sets style's setters. + /// Gets or sets the style's setters. /// [Content] public IEnumerable Setters { get; set; } = new List(); From 075cd4b9a42a10beafda8a9adead55b4f51f32da Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 8 Jul 2017 19:56:57 +0200 Subject: [PATCH 082/132] Ensure menu gets closed. If there's a `Command` binding for a `MenuItem` it will now swallow the `Click` event, meaning that the menu won't get closed. Listen for handled events too. --- src/Avalonia.Controls/Menu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/Menu.cs b/src/Avalonia.Controls/Menu.cs index e919275d4f..994af9dab8 100644 --- a/src/Avalonia.Controls/Menu.cs +++ b/src/Avalonia.Controls/Menu.cs @@ -47,7 +47,7 @@ namespace Avalonia.Controls static Menu() { ItemsPanelProperty.OverrideDefaultValue(typeof(Menu), DefaultPanel); - MenuItem.ClickEvent.AddClassHandler(x => x.OnMenuClick); + MenuItem.ClickEvent.AddClassHandler(x => x.OnMenuClick, handledEventsToo: true); MenuItem.SubmenuOpenedEvent.AddClassHandler(x => x.OnSubmenuOpened); } From 3bee9e555722190b2b29f8a98b9ec08ed4963fd4 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 8 Jul 2017 20:04:44 +0200 Subject: [PATCH 083/132] Only respond to left click in Button. Fixes #854. --- src/Avalonia.Controls/Button.cs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/Avalonia.Controls/Button.cs b/src/Avalonia.Controls/Button.cs index 2b3bbc8ad2..7f118c370b 100644 --- a/src/Avalonia.Controls/Button.cs +++ b/src/Avalonia.Controls/Button.cs @@ -215,13 +215,16 @@ namespace Avalonia.Controls { base.OnPointerPressed(e); - PseudoClasses.Add(":pressed"); - e.Device.Capture(this); - e.Handled = true; - - if (ClickMode == ClickMode.Press) + if (e.MouseButton == MouseButton.Left) { - RaiseClickEvent(); + PseudoClasses.Add(":pressed"); + e.Device.Capture(this); + e.Handled = true; + + if (ClickMode == ClickMode.Press) + { + RaiseClickEvent(); + } } } @@ -230,13 +233,16 @@ namespace Avalonia.Controls { base.OnPointerReleased(e); - e.Device.Capture(null); - PseudoClasses.Remove(":pressed"); - e.Handled = true; - - if (ClickMode == ClickMode.Release && new Rect(Bounds.Size).Contains(e.GetPosition(this))) + if (e.MouseButton == MouseButton.Left) { - RaiseClickEvent(); + e.Device.Capture(null); + PseudoClasses.Remove(":pressed"); + e.Handled = true; + + if (ClickMode == ClickMode.Release && new Rect(Bounds.Size).Contains(e.GetPosition(this))) + { + RaiseClickEvent(); + } } } From bb11b302b8cc37b13f2495c2cbf9a87e832ed405 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 8 Jul 2017 20:59:49 +0200 Subject: [PATCH 084/132] Added failing unit test for #277. --- .../TreeViewTests.cs | 43 +++++++++++++++++++ tests/Avalonia.UnitTests/TestServices.cs | 6 +++ .../Avalonia.UnitTests/UnitTestApplication.cs | 1 + 3 files changed, 50 insertions(+) diff --git a/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs b/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs index 52d36a33fa..5557f616c3 100644 --- a/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs +++ b/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs @@ -315,6 +315,49 @@ namespace Avalonia.Controls.UnitTests Assert.Equal(new[] { "NewChild1" }, ExtractItemHeader(target, 1)); } + [Fact] + public void Keyboard_Navigation_Should_Move_To_Last_Selected_Node() + { + using (UnitTestApplication.Start(TestServices.RealFocus)) + { + var focus = FocusManager.Instance; + var navigation = AvaloniaLocator.Current.GetService(); + var data = CreateTestTreeData(); + + var target = new TreeView + { + Template = CreateTreeViewTemplate(), + Items = data, + DataTemplates = CreateNodeDataTemplate(), + }; + + var button = new Button(); + + var root = new TestRoot + { + Child = new StackPanel + { + Children = { target, button }, + } + }; + + ApplyTemplates(target); + + var item = data[0].Children[0]; + var node = target.ItemContainerGenerator.Index.ContainerFromItem(item); + Assert.NotNull(node); + + node.Focus(); + Assert.Same(node, focus.Current); + + navigation.Move(focus.Current, NavigationDirection.Next); + Assert.Same(button, focus.Current); + + navigation.Move(focus.Current, NavigationDirection.Next); + Assert.Same(node, focus.Current); + } + } + private void ApplyTemplates(TreeView tree) { tree.ApplyTemplate(); diff --git a/tests/Avalonia.UnitTests/TestServices.cs b/tests/Avalonia.UnitTests/TestServices.cs index 0cd8d4295b..f66adec1eb 100644 --- a/tests/Avalonia.UnitTests/TestServices.cs +++ b/tests/Avalonia.UnitTests/TestServices.cs @@ -50,6 +50,7 @@ namespace Avalonia.UnitTests public static readonly TestServices RealFocus = new TestServices( focusManager: new FocusManager(), keyboardDevice: () => new KeyboardDevice(), + keyboardNavigation: new KeyboardNavigationHandler(), inputManager: new InputManager()); public static readonly TestServices RealLayoutManager = new TestServices( @@ -63,6 +64,7 @@ namespace Avalonia.UnitTests IFocusManager focusManager = null, IInputManager inputManager = null, Func keyboardDevice = null, + IKeyboardNavigationHandler keyboardNavigation = null, ILayoutManager layoutManager = null, IRuntimePlatform platform = null, Func renderer = null, @@ -79,6 +81,7 @@ namespace Avalonia.UnitTests FocusManager = focusManager; InputManager = inputManager; KeyboardDevice = keyboardDevice; + KeyboardNavigation = keyboardNavigation; LayoutManager = layoutManager; Platform = platform; Renderer = renderer; @@ -96,6 +99,7 @@ namespace Avalonia.UnitTests public IInputManager InputManager { get; } public IFocusManager FocusManager { get; } public Func KeyboardDevice { get; } + public IKeyboardNavigationHandler KeyboardNavigation { get; } public ILayoutManager LayoutManager { get; } public IRuntimePlatform Platform { get; } public Func Renderer { get; } @@ -113,6 +117,7 @@ namespace Avalonia.UnitTests IFocusManager focusManager = null, IInputManager inputManager = null, Func keyboardDevice = null, + IKeyboardNavigationHandler keyboardNavigation = null, ILayoutManager layoutManager = null, IRuntimePlatform platform = null, Func renderer = null, @@ -131,6 +136,7 @@ namespace Avalonia.UnitTests focusManager: focusManager ?? FocusManager, inputManager: inputManager ?? InputManager, keyboardDevice: keyboardDevice ?? KeyboardDevice, + keyboardNavigation: keyboardNavigation ?? KeyboardNavigation, layoutManager: layoutManager ?? LayoutManager, platform: platform ?? Platform, renderer: renderer ?? Renderer, diff --git a/tests/Avalonia.UnitTests/UnitTestApplication.cs b/tests/Avalonia.UnitTests/UnitTestApplication.cs index c5d533486b..28577e9670 100644 --- a/tests/Avalonia.UnitTests/UnitTestApplication.cs +++ b/tests/Avalonia.UnitTests/UnitTestApplication.cs @@ -49,6 +49,7 @@ namespace Avalonia.UnitTests .BindToSelf(this) .Bind().ToConstant(Services.InputManager) .Bind().ToConstant(Services.KeyboardDevice?.Invoke()) + .Bind().ToConstant(Services.KeyboardNavigation) .Bind().ToConstant(Services.LayoutManager) .Bind().ToConstant(Services.Platform) .Bind().ToConstant(new RendererFactory(Services.Renderer)) From a1d6406ce919dd21cdbe58b1967d09415c422032 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sat, 8 Jul 2017 21:54:33 +0200 Subject: [PATCH 085/132] Only set focus on left button click. --- src/Avalonia.Input/FocusManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Input/FocusManager.cs b/src/Avalonia.Input/FocusManager.cs index e5cc5a8557..102da6efc4 100644 --- a/src/Avalonia.Input/FocusManager.cs +++ b/src/Avalonia.Input/FocusManager.cs @@ -176,9 +176,10 @@ namespace Avalonia.Input /// The event args. private void OnPreviewPointerPressed(object sender, RoutedEventArgs e) { - if (sender == e.Source) + var ev = (PointerPressedEventArgs)e; + + if (sender == e.Source && ev.MouseButton == MouseButton.Left) { - var ev = (PointerPressedEventArgs)e; var element = (ev.Device?.Captured as IInputElement) ?? (e.Source as IInputElement); if (element == null || !CanFocus(element)) From c4aa2197b21f2f9770cc443d763d3c8207afbf2a Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sun, 9 Jul 2017 01:41:46 +0200 Subject: [PATCH 086/132] Fixed TreeView navigation. Fixes #277. --- src/Avalonia.Controls/TreeView.cs | 22 +- src/Avalonia.Input/Avalonia.Input.csproj | 3 + .../ICustomKeyboardNavigation.cs | 15 ++ .../KeyboardNavigationHandler.cs | 27 +++ .../Navigation/DirectionalNavigation.cs | 16 +- .../Navigation/TabNavigation.cs | 86 +++++-- .../TreeViewTests.cs | 1 + .../KeyboardNavigationTests_Custom.cs | 214 ++++++++++++++++++ 8 files changed, 356 insertions(+), 28 deletions(-) create mode 100644 src/Avalonia.Input/ICustomKeyboardNavigation.cs create mode 100644 tests/Avalonia.Input.UnitTests/KeyboardNavigationTests_Custom.cs diff --git a/src/Avalonia.Controls/TreeView.cs b/src/Avalonia.Controls/TreeView.cs index b966d09b1f..5d1b9a1462 100644 --- a/src/Avalonia.Controls/TreeView.cs +++ b/src/Avalonia.Controls/TreeView.cs @@ -16,7 +16,7 @@ namespace Avalonia.Controls /// /// Displays a hierachical tree of data. /// - public class TreeView : ItemsControl + public class TreeView : ItemsControl, ICustomKeyboardNavigation { /// /// Defines the property. @@ -90,6 +90,26 @@ namespace Avalonia.Controls } } + (bool handled, IInputElement next) ICustomKeyboardNavigation.GetNext(IInputElement element, NavigationDirection direction) + { + if (direction == NavigationDirection.Next || direction == NavigationDirection.Previous) + { + if (!this.IsVisualAncestorOf(element)) + { + IControl result = _selectedItem != null ? + ItemContainerGenerator.Index.ContainerFromItem(_selectedItem) : + ItemContainerGenerator.ContainerFromIndex(0); + return (true, result); + } + else + { + return (true, null); + } + } + + return (false, null); + } + /// protected override IItemContainerGenerator CreateItemContainerGenerator() { diff --git a/src/Avalonia.Input/Avalonia.Input.csproj b/src/Avalonia.Input/Avalonia.Input.csproj index e9e74e24fe..0411cf77a5 100644 --- a/src/Avalonia.Input/Avalonia.Input.csproj +++ b/src/Avalonia.Input/Avalonia.Input.csproj @@ -37,5 +37,8 @@ Properties\SharedAssemblyInfo.cs + + + \ No newline at end of file diff --git a/src/Avalonia.Input/ICustomKeyboardNavigation.cs b/src/Avalonia.Input/ICustomKeyboardNavigation.cs new file mode 100644 index 0000000000..de5f98e04b --- /dev/null +++ b/src/Avalonia.Input/ICustomKeyboardNavigation.cs @@ -0,0 +1,15 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using System; + +namespace Avalonia.Input +{ + /// + /// Designates a control as handling its own keyboard navigation. + /// + public interface ICustomKeyboardNavigation + { + (bool handled, IInputElement next) GetNext(IInputElement element, NavigationDirection direction); + } +} diff --git a/src/Avalonia.Input/KeyboardNavigationHandler.cs b/src/Avalonia.Input/KeyboardNavigationHandler.cs index 57da49fa03..bf2b61d08b 100644 --- a/src/Avalonia.Input/KeyboardNavigationHandler.cs +++ b/src/Avalonia.Input/KeyboardNavigationHandler.cs @@ -2,7 +2,9 @@ // Licensed under the MIT license. See licence.md file in the project root for full license information. using System; +using System.Linq; using Avalonia.Input.Navigation; +using Avalonia.VisualTree; namespace Avalonia.Input { @@ -52,6 +54,31 @@ namespace Avalonia.Input { Contract.Requires(element != null); + var customHandler = element.GetSelfAndVisualAncestors() + .OfType() + .FirstOrDefault(); + + if (customHandler != null) + { + var (handled, next) = customHandler.GetNext(element, direction); + + if (handled) + { + if (next != null) + { + return next; + } + else if (direction == NavigationDirection.Next || direction == NavigationDirection.Previous) + { + return TabNavigation.GetNextInTabOrder((IInputElement)customHandler, direction, true); + } + else + { + return null; + } + } + } + if (direction == NavigationDirection.Next || direction == NavigationDirection.Previous) { return TabNavigation.GetNextInTabOrder(element, direction); diff --git a/src/Avalonia.Input/Navigation/DirectionalNavigation.cs b/src/Avalonia.Input/Navigation/DirectionalNavigation.cs index a88ed1e8aa..75cb3a39e8 100644 --- a/src/Avalonia.Input/Navigation/DirectionalNavigation.cs +++ b/src/Avalonia.Input/Navigation/DirectionalNavigation.cs @@ -41,7 +41,7 @@ namespace Avalonia.Input.Navigation { case KeyboardNavigationMode.Continue: return GetNextInContainer(element, container, direction) ?? - GetFirstInNextContainer(element, direction); + GetFirstInNextContainer(element, element, direction); case KeyboardNavigationMode.Cycle: return GetNextInContainer(element, container, direction) ?? GetFocusableDescendant(container, direction); @@ -173,10 +173,12 @@ namespace Avalonia.Input.Navigation /// /// Gets the first item that should be focused in the next container. /// + /// The element being navigated away from. /// The container. /// The direction of the search. /// The first element, or null if there are no more elements. private static IInputElement GetFirstInNextContainer( + IInputElement element, IInputElement container, NavigationDirection direction) { @@ -200,6 +202,16 @@ namespace Avalonia.Input.Navigation if (sibling != null) { + if (sibling is ICustomKeyboardNavigation custom) + { + var (handled, customNext) = custom.GetNext(element, direction); + + if (handled) + { + return customNext; + } + } + if (sibling.CanFocus()) { next = sibling; @@ -214,7 +226,7 @@ namespace Avalonia.Input.Navigation if (next == null) { - next = GetFirstInNextContainer(parent, direction); + next = GetFirstInNextContainer(element, parent, direction); } } else diff --git a/src/Avalonia.Input/Navigation/TabNavigation.cs b/src/Avalonia.Input/Navigation/TabNavigation.cs index 6ba7ab1a0c..bc2b69a785 100644 --- a/src/Avalonia.Input/Navigation/TabNavigation.cs +++ b/src/Avalonia.Input/Navigation/TabNavigation.cs @@ -18,13 +18,17 @@ namespace Avalonia.Input.Navigation /// /// The element. /// The tab direction. Must be Next or Previous. + /// + /// If true will not descend into to find next control. + /// /// /// The next element in the specified direction, or null if /// was the last in the requested direction. /// public static IInputElement GetNextInTabOrder( IInputElement element, - NavigationDirection direction) + NavigationDirection direction, + bool outsideElement = false) { Contract.Requires(element != null); Contract.Requires( @@ -40,20 +44,20 @@ namespace Avalonia.Input.Navigation switch (mode) { case KeyboardNavigationMode.Continue: - return GetNextInContainer(element, container, direction) ?? - GetFirstInNextContainer(element, direction); + return GetNextInContainer(element, container, direction, outsideElement) ?? + GetFirstInNextContainer(element, element, direction); case KeyboardNavigationMode.Cycle: - return GetNextInContainer(element, container, direction) ?? + return GetNextInContainer(element, container, direction, outsideElement) ?? GetFocusableDescendant(container, direction); case KeyboardNavigationMode.Contained: - return GetNextInContainer(element, container, direction); + return GetNextInContainer(element, container, direction, outsideElement); default: - return GetFirstInNextContainer(container, direction); + return GetFirstInNextContainer(element, container, direction); } } else { - return GetFocusableDescendants(element).FirstOrDefault(); + return GetFocusableDescendants(element, direction).FirstOrDefault(); } } @@ -66,8 +70,8 @@ namespace Avalonia.Input.Navigation private static IInputElement GetFocusableDescendant(IInputElement container, NavigationDirection direction) { return direction == NavigationDirection.Next ? - GetFocusableDescendants(container).FirstOrDefault() : - GetFocusableDescendants(container).LastOrDefault(); + GetFocusableDescendants(container, direction).FirstOrDefault() : + GetFocusableDescendants(container, direction).LastOrDefault(); } /// @@ -75,7 +79,7 @@ namespace Avalonia.Input.Navigation /// /// The element. /// The element's focusable descendants. - private static IEnumerable GetFocusableDescendants(IInputElement element) + private static IEnumerable GetFocusableDescendants(IInputElement element, NavigationDirection direction) { var mode = KeyboardNavigation.GetTabNavigation((InputElement)element); @@ -103,16 +107,25 @@ namespace Avalonia.Input.Navigation foreach (var child in children) { - if (child.CanFocus()) + var customNext = GetCustomNext(child, direction); + + if (customNext.handled) { - yield return child; + yield return customNext.next; } - - if (child.CanFocusDescendants()) + else { - foreach (var descendant in GetFocusableDescendants(child)) + if (child.CanFocus()) { - yield return descendant; + yield return child; + } + + if (child.CanFocusDescendants()) + { + foreach (var descendant in GetFocusableDescendants(child, direction)) + { + yield return descendant; + } } } } @@ -124,15 +137,19 @@ namespace Avalonia.Input.Navigation /// The starting element/ /// The container. /// The direction. + /// + /// If true will not descend into to find next control. + /// /// The next element, or null if the element is the last. private static IInputElement GetNextInContainer( IInputElement element, IInputElement container, - NavigationDirection direction) + NavigationDirection direction, + bool outsideElement) { - if (direction == NavigationDirection.Next) + if (direction == NavigationDirection.Next && !outsideElement) { - var descendant = GetFocusableDescendants(element).FirstOrDefault(); + var descendant = GetFocusableDescendants(element, direction).FirstOrDefault(); if (descendant != null) { @@ -167,7 +184,7 @@ namespace Avalonia.Input.Navigation if (element != null && direction == NavigationDirection.Previous) { - var descendant = GetFocusableDescendants(element).LastOrDefault(); + var descendant = GetFocusableDescendants(element, direction).LastOrDefault(); if (descendant != null) { @@ -184,10 +201,12 @@ namespace Avalonia.Input.Navigation /// /// Gets the first item that should be focused in the next container. /// + /// The element being navigated away from. /// The container. /// The direction of the search. /// The first element, or null if there are no more elements. private static IInputElement GetFirstInNextContainer( + IInputElement element, IInputElement container, NavigationDirection direction) { @@ -210,6 +229,13 @@ namespace Avalonia.Input.Navigation if (sibling != null) { + var customNext = GetCustomNext(sibling, direction); + + if (customNext.handled) + { + return customNext.next; + } + if (sibling.CanFocus()) { next = sibling; @@ -217,24 +243,34 @@ namespace Avalonia.Input.Navigation else { next = direction == NavigationDirection.Next ? - GetFocusableDescendants(sibling).FirstOrDefault() : - GetFocusableDescendants(sibling).LastOrDefault(); + GetFocusableDescendants(sibling, direction).FirstOrDefault() : + GetFocusableDescendants(sibling, direction).LastOrDefault(); } } if (next == null) { - next = GetFirstInNextContainer(parent, direction); + next = GetFirstInNextContainer(element, parent, direction); } } else { next = direction == NavigationDirection.Next ? - GetFocusableDescendants(container).FirstOrDefault() : - GetFocusableDescendants(container).LastOrDefault(); + GetFocusableDescendants(container, direction).FirstOrDefault() : + GetFocusableDescendants(container, direction).LastOrDefault(); } return next; } + + private static (bool handled, IInputElement next) GetCustomNext(IInputElement element, NavigationDirection direction) + { + if (element is ICustomKeyboardNavigation custom) + { + return custom.GetNext(element, direction); + } + + return (false, null); + } } } diff --git a/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs b/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs index 5557f616c3..44ef7192ff 100644 --- a/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs +++ b/tests/Avalonia.Controls.UnitTests/TreeViewTests.cs @@ -347,6 +347,7 @@ namespace Avalonia.Controls.UnitTests var node = target.ItemContainerGenerator.Index.ContainerFromItem(item); Assert.NotNull(node); + target.SelectedItem = item; node.Focus(); Assert.Same(node, focus.Current); diff --git a/tests/Avalonia.Input.UnitTests/KeyboardNavigationTests_Custom.cs b/tests/Avalonia.Input.UnitTests/KeyboardNavigationTests_Custom.cs new file mode 100644 index 0000000000..a090dcd18d --- /dev/null +++ b/tests/Avalonia.Input.UnitTests/KeyboardNavigationTests_Custom.cs @@ -0,0 +1,214 @@ +// Copyright (c) The Avalonia Project. All rights reserved. +// Licensed under the MIT license. See licence.md file in the project root for full license information. + +using Avalonia.Controls; +using Xunit; + +namespace Avalonia.Input.UnitTests +{ + public class KeyboardNavigationTests_Custom + { + [Fact] + public void Tab_Should_Custom_Navigate_Within_Children() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + (current = new Button { Content = "Button 1" }), + new Button { Content = "Button 2" }, + (next = new Button { Content = "Button 3" }), + }, + NextControl = next, + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Next); + + Assert.Same(next, result); + } + + [Fact] + public void Right_Should_Custom_Navigate_Within_Children() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + (current = new Button { Content = "Button 1" }), + new Button { Content = "Button 2" }, + (next = new Button { Content = "Button 3" }), + }, + NextControl = next, + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Right); + + Assert.Same(next, result); + } + + [Fact] + public void Tab_Should_Custom_Navigate_From_Outside() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + new Button { Content = "Button 1" }, + new Button { Content = "Button 2" }, + (next = new Button { Content = "Button 3" }), + }, + NextControl = next, + }; + + var root = new StackPanel + { + Children = + { + (current = new Button { Content = "Outside" }), + target, + } + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Next); + + Assert.Same(next, result); + } + + [Fact] + public void Tab_Should_Custom_Navigate_From_Outside_When_Wrapping() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + new Button { Content = "Button 1" }, + new Button { Content = "Button 2" }, + (next = new Button { Content = "Button 3" }), + }, + NextControl = next, + }; + + var root = new StackPanel + { + Children = + { + target, + (current = new Button { Content = "Outside" }), + } + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Next); + + Assert.Same(next, result); + } + + [Fact] + public void ShiftTab_Should_Custom_Navigate_From_Outside() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + new Button { Content = "Button 1" }, + new Button { Content = "Button 2" }, + (next = new Button { Content = "Button 3" }), + }, + NextControl = next, + }; + + var root = new StackPanel + { + Children = + { + (current = new Button { Content = "Outside" }), + target, + } + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Previous); + + Assert.Same(next, result); + } + + [Fact] + public void Right_Should_Custom_Navigate_From_Outside() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + new Button { Content = "Button 1" }, + new Button { Content = "Button 2" }, + (next = new Button { Content = "Button 3" }), + }, + NextControl = next, + }; + + var root = new StackPanel + { + Children = + { + (current = new Button { Content = "Outside" }), + target, + }, + [KeyboardNavigation.DirectionalNavigationProperty] = KeyboardNavigationMode.Continue, + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Right); + + Assert.Same(next, result); + } + + [Fact] + public void Tab_Should_Navigate_Outside_When_Null_Returned_As_Next() + { + Button current; + Button next; + var target = new CustomNavigatingStackPanel + { + Children = + { + new Button { Content = "Button 1" }, + (current = new Button { Content = "Button 2" }), + new Button { Content = "Button 3" }, + }, + }; + + var root = new StackPanel + { + Children = + { + target, + (next = new Button { Content = "Outside" }), + } + }; + + var result = KeyboardNavigationHandler.GetNext(current, NavigationDirection.Next); + + Assert.Same(next, result); + } + + private class CustomNavigatingStackPanel : StackPanel, ICustomKeyboardNavigation + { + public bool CustomNavigates { get; set; } = true; + public IInputElement NextControl { get; set; } + + public (bool handled, IInputElement next) GetNext(IInputElement element, NavigationDirection direction) + { + return (CustomNavigates, NextControl); + } + } + } +} From 04dc48afef18472c23dc8ee5e10cfe16ffe88926 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sun, 9 Jul 2017 02:07:31 +0200 Subject: [PATCH 087/132] Added missing doc comments. --- src/Avalonia.Input/Navigation/TabNavigation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Avalonia.Input/Navigation/TabNavigation.cs b/src/Avalonia.Input/Navigation/TabNavigation.cs index bc2b69a785..6e077e887f 100644 --- a/src/Avalonia.Input/Navigation/TabNavigation.cs +++ b/src/Avalonia.Input/Navigation/TabNavigation.cs @@ -78,6 +78,7 @@ namespace Avalonia.Input.Navigation /// Gets the focusable descendants of the specified element. /// /// The element. + /// The tab direction. Must be Next or Previous. /// The element's focusable descendants. private static IEnumerable GetFocusableDescendants(IInputElement element, NavigationDirection direction) { From 730911fc0db6d0dcad2fc7e6a5a5075da3f98979 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sun, 9 Jul 2017 19:11:50 +0200 Subject: [PATCH 088/132] Added a couple more passing tile tests. --- .../Media/ImageBrushTests.cs | 48 ++++++++++++++++++ .../ImageBrush_Tile_Fill.expected.png | Bin 0 -> 3945 bytes ...ImageBrush_Tile_UniformToFill.expected.png | Bin 0 -> 2340 bytes .../ImageBrush_Tile_Fill.expected.png | Bin 0 -> 3945 bytes ...ImageBrush_Tile_UniformToFill.expected.png | Bin 0 -> 3651 bytes .../ImageBrush_Tile_Fill.expected.png | Bin 0 -> 6146 bytes ...ImageBrush_Tile_UniformToFill.expected.png | Bin 0 -> 5720 bytes 7 files changed, 48 insertions(+) create mode 100644 tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png create mode 100644 tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_UniformToFill.expected.png create mode 100644 tests/TestFiles/Direct2D1/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png create mode 100644 tests/TestFiles/Direct2D1/Media/ImageBrush/ImageBrush_Tile_UniformToFill.expected.png create mode 100644 tests/TestFiles/Skia/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png create mode 100644 tests/TestFiles/Skia/Media/ImageBrush/ImageBrush_Tile_UniformToFill.expected.png diff --git a/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs b/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs index cbf11504c1..5f0b1f50e6 100644 --- a/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs +++ b/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs @@ -28,6 +28,54 @@ namespace Avalonia.Direct2D1.RenderTests.Media get { return System.IO.Path.Combine(OutputPath, "github_icon.png"); } } + [Fact] + public void ImageBrush_Tile_Fill() + { + Decorator target = new Decorator + { + Width = 200, + Height = 200, + Child = new Rectangle + { + Margin = new Thickness(8), + Fill = new ImageBrush + { + Stretch = Stretch.Fill, + TileMode = TileMode.Tile, + DestinationRect = new RelativeRect(0, 0, 25, 30, RelativeUnit.Absolute), + Source = new Bitmap(BitmapPath), + } + } + }; + + RenderToFile(target); + CompareImages(); + } + + [Fact] + public void ImageBrush_Tile_UniformToFill() + { + Decorator target = new Decorator + { + Width = 200, + Height = 200, + Child = new Rectangle + { + Margin = new Thickness(8), + Fill = new ImageBrush + { + Stretch = Stretch.Uniform, + TileMode = TileMode.Tile, + DestinationRect = new RelativeRect(0, 0, 25, 30, RelativeUnit.Absolute), + Source = new Bitmap(BitmapPath), + } + } + }; + + RenderToFile(target); + CompareImages(); + } + [Fact] public void ImageBrush_NoStretch_NoTile_Alignment_TopLeft() { diff --git a/tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png b/tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png new file mode 100644 index 0000000000000000000000000000000000000000..c38dcfbcfde254168cbc928634d40cd7617347c6 GIT binary patch literal 3945 zcmeHKcTkhr7N;1&_$U!k)I>s9K`FYpFeD$Slt?HN7eoOAqTq^1ha`Xyil78tKbokE z5ztU%5qLZ)Vq?`HC@UmHP(uk|kc3bKX;S3fxU28YyqTSO|Gs%M$@!AGb8~af`IU3i zek7ArkQnL^gA2FAf=mtJ>6?h}gOxm8Rml&PCm|aNi}w z3nb3tgZf+Vbr0l?bZm~TvXsA2plte!23ZbgPeuQ zh8o=zbsJ@!Z=v38W-?);n)aB*uiYITIV@kv_Z8oXj?Nt3lF5E*FA{&hhVXWr{=37A zrh4&jCb&;nzgXwJN-&DL&kn>Z(yN0NOF;_vd$*+`tFKS=KaB_>47Faj$ZfGv!Z_h^ z0}4sqp;jU9ZC5qehi+8LDtjG6*0%3Vx*s(@wtKNJnMYefW2j<%U8&{lE42Kh-7hIK z8s=}#RK`nk)mE!WJiXHVKJz5WGRIbV0 z+Pbk)f`R~9*tBCre@@I!ul8LiIPD)|j=;o-oB2`1LZk?>@Tp}eU$``r<32KS&RiH5 zIs1bJ{n7kzSx^4x-8SvK7`udEr6bXgql%N^{AZ|4DOPWBAxb#MT-w-h2s&-S?yhdrG=IqPGi!_mi<;rm_288u?Mj}*FMaqr!L1J zd|02iW-T15H%o|_3!5#e6L!)V@k;|2=I_jEQMtUTLfrxJICf7%Lc(lv-1Em*ik9E3 z*IU|geQrnI%+Z7#rRQ;|+%vExRV1;%36Pww?CR>}_~oUs&#~h)f+bO#p%s|mI4;<3 zZWoHdP+8q5^>xkN>rNhsPW){9DtL$Q4s!>RDl~Za%4C@_}oX~u6VE3SgHD4f+qLCh(AG?4qu~DjovX&4r6;O zf)-BPOXVgs-C$dh@(w_`$Q5yk69zVA&DuA;cBx^g$335zTyQ%gpMXt2kfy&suK<0Y z`+!eTnwREzkV`waQK{BVQxMlDYEvr5=p|-F!KuB0{zbS_C(m!T zA?20hRkwPl@j1JO10`4Cc|jz#dFW1|PZeGgi-sm|^HA&T8@#9cO(%4yxA`dE)Ru>V zZn*cR;n2$0Go9rxP~1b_Opc(-IBs` z@tD?5G>Vj<1bz)b)Kh@s9m4kJ6&8hqrE6g;QV=`q5Q4Rv3zpSsT^HW8IJaje!T z;=Sas+&Mf|L?DrfURc+(L_VjCcA3rg4Z1$q+K$Q?#-4QVYu9JI2KrJC7w?cz@~51e zbSP0o4#KxQAatBAxb(nVzVycjEwZBmsYFwndZ>FXVOM!0NHjFbu0q@L$ zjVR&2<8s`8({6s}c81R>c@2;eKBk)HnQNhJ)p5SF)p0MbL}xtqbO=GIjAC#_#YCg<;3Z-&}H z_4}lJugSttfOunkE|Pf4HGrYqRB1zDoq-iVN5b~ux{f)G{CdL!mVw8k%69UODJ>(A ztf6hyG><`*Doo699E7$&`!!{{9G-iZ^oI(^!m6L*E>9V*(`TgHlJd-;KcttXw>t%< zLAcyUg;5tBIRIQueS+S52fqlaQc2p-4c)eOnCX^uX`+Fp*P99l<8cufP6|u!NCY*g z8I@rGic|9RZSEHxW9j7qNpborRi02P)SUDFytb^E#ePPZqd;EGu>iu9T<9N!3l+X0};kY+!U;EzjX znswW3bhL+jEvwEDt9d?(AUo<#W_zg5ZP?xe!e0eTQzzNsr_u`Ei=# zsh7Yoa0Y%3;>{kD7MDtoHyx*bOsf6iCau3af-JqSjiDO#gVa|$aTt_QUQHLkPal-I~$a%_0JtVdEvkpY_EYGj#~t!d7G{Mg8z+%bo=#g+eaDXEfnB0^ zr1Ckb+$!={ue}PurRCK{sWTv1QIe+mzS29>AY}fNChC-5iq|)bpR-(gcnI8pnHO{lNR}%uA};jb+%D1jt)L zHPuw^12XrIpvG^uv5Ksbf24%VYpl2U?nJ;CR_>tTVGBdeG}gHXa9qf$rr@gJmROcw z{bcxdDC}pgx9RX24Bn1wvH`?uixY%l&DHl0s~B+UcGcTil-2;oEIS$Af(EHujhSQ3 zpMn&=jC!E@iIw{!pJzXk2Yu{2X`o)}P&BQBZa@ZyBW2hI2ACFqQr>M{T#q&0IS!Z-^>u3k#~EnuJnYT>z<)V4eYr}lI%x; z0Jw)_gGc%P`QmpOYlNVc z*?Bgyg-|{oPvusn$Wm`!S}8gqE9BDgApY>#O-2e!5j?To;gl~(UgdFOt^ zm~2gYTzOOXStV5TuTlU16T<)Sgkb$|w^DFFjmR9KFDsezRdvokr?J6xS6vo^oYcaFDpkZ_&ZL<(vCsWrPNlh}*Xfw-IyfmqqTPWdW)h{(o11u?X z)3mm{bU~BSE*c*s21=!=yODWelQKzx3@?Ew``PqMGy4zhO!Llr&JSnKdCvR1&zU&| zLB#FGi>(*KU@&8XpEn8eZS&U%4%ym}x(dj_qx`pf!}Rm#GPmX|3})0z@b>y8<)WfL zkRG}RB^-a}cA@&*sTGk;^y~)kI5sr43;)P6qU3w?d*&N$C`E;4ZejUD#Bv|XYV86s zRbm>ZU2qQ1$tFF@rDLmUEfk9Wjcrm=X7ccG2UC-QUVpc}UBfuK#KrD`+V8|tywU2f zjg=h-{+&D9JtEzxJ!GyFoS}at|poRPpnBWxG z3y)OsF}oZHr#4wa(USqJ4B1B!-e_^}+f9UJlfl6oM3E8HD5UFib4-yltKsh5;EYr{ z#&7>wXKUt_=9PxgMF_RlEKjhC;5ntg zhU;e3DzIlEZ|(;ANdNN(GLfAyDgxCwK2&pQrOso&Yp>6Z6niAT&EeNSB`S$_d7dEX zKw4dQIuf}(A!L;IB9uLp(P!WQ++lT+KulDG4$YX2bxZnm2)CX_u4r=SN>r-f6%sUX zQTcuhVhM|gpDo*aW@cLD&l+q_n_Su#Pa9NJkstMo_#qKjI}FzOZP-eBq86xlqtA}; ziYp5Q-PB+gmzcr}a~rJLuP9FT2hinTwtXJ<>nn5ca~{?)&M# zAsBUt_;HC_rO6HeP)x*?yU}*4CTvwCs{ro7_;~-&Dga0vJwJG#O1L=-($uL7WfvTA zO-`k@2zU z*2WqWn8AJfd~b8Q#?F8VDC!Mxpnuxx*yDJ$;IFAE8lOKRu7APPSd1o4No%>>j7|?S zS)v{Y3)6oPScfJ!k)_8)D4Uteo zyznK=F1Kbb{ALsW{CD?pZova+W^HU5}Aubkk9Hd|^&r|DnME{Wv0<)81$4j26 zS4==1$rGGB-%;-2K8}J5cdcNW$a_wr36amXV4kHNPDn^dZ>OW`akxULSA7;pLae?f z8I|Aa@+&y>Fw1@&Pgm>r3OLZh57{Z>^Ui`U)=a77EzcRP8F=koMQ$l+aEV62eeLp! zw%sc|5u~k3t#WrIu*|R?w%4Z|+M*#DMpku%vgz``P);A~fX?usdy;I($2gg0yK?uQ z$6|&C!tVY6MHB*(SZ;6K|jT?B>9;@qrr!Vc joaUI^{(7+(a?%@YHNAut^#W{Y?ST<|h~9Phi0pp>yVkMF literal 0 HcmV?d00001 diff --git a/tests/TestFiles/Direct2D1/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png b/tests/TestFiles/Direct2D1/Media/ImageBrush/ImageBrush_Tile_Fill.expected.png new file mode 100644 index 0000000000000000000000000000000000000000..c38dcfbcfde254168cbc928634d40cd7617347c6 GIT binary patch literal 3945 zcmeHKcTkhr7N;1&_$U!k)I>s9K`FYpFeD$Slt?HN7eoOAqTq^1ha`Xyil78tKbokE z5ztU%5qLZ)Vq?`HC@UmHP(uk|kc3bKX;S3fxU28YyqTSO|Gs%M$@!AGb8~af`IU3i zek7ArkQnL^gA2FAf=mtJ>6?h}gOxm8Rml&PCm|aNi}w z3nb3tgZf+Vbr0l?bZm~TvXsA2plte!23ZbgPeuQ zh8o=zbsJ@!Z=v38W-?);n)aB*uiYITIV@kv_Z8oXj?Nt3lF5E*FA{&hhVXWr{=37A zrh4&jCb&;nzgXwJN-&DL&kn>Z(yN0NOF;_vd$*+`tFKS=KaB_>47Faj$ZfGv!Z_h^ z0}4sqp;jU9ZC5qehi+8LDtjG6*0%3Vx*s(@wtKNJnMYefW2j<%U8&{lE42Kh-7hIK z8s=}#RK`nk)mE!WJiXHVKJz5WGRIbV0 z+Pbk)f`R~9*tBCre@@I!ul8LiIPD)|j=;o-oB2`1LZk?>@Tp}eU$``r<32KS&RiH5 zIs1bJ{n7kzSx^4x-8SvK7`udEr6bXgql%N^{AZ|4DOPWBAxb#MT-w-h2s&-S?yhdrG=IqPGi!_mi<;rm_288u?Mj}*FMaqr!L1J zd|02iW-T15H%o|_3!5#e6L!)V@k;|2=I_jEQMtUTLfrxJICf7%Lc(lv-1Em*ik9E3 z*IU|geQrnI%+Z7#rRQ;|+%vExRV1;%36Pww?CR>}_~oUs&#~h)f+bO#p%s|mI4;<3 zZWoHdP+8q5^>xkN>rNhsPW){9DtL$Q4s!>RDl~Za%4C@_}oX~u6VE3SgHD4f+qLCh(AG?4qu~DjovX&4r6;O zf)-BPOXVgs-C$dh@(w_`$Q5yk69zVA&DuA;cBx^g$335zTyQ%gpMXt2kfy&suK<0Y z`+!eTnwREzkV`waQK{BVQxMlDYEvr5=p|-F!KuB0{zbS_C(m!T zA?20hRkwPl@j1JO10`4Cc|jz#dFW1|PZeGgi-sm|^HA&T8@#9cO(%4yxA`dE)Ru>V zZn*cR;n2$0Go9rxP~1b_Opc(-IBs` z@tD?5G>Vj<1bz)b)Kh@s9m4kJ6&8hqrE6g;QV=`q5Q4Rv3zpSsT^HW8IJaje!T z;=Sas+&Mf|L?DrfURc+(L_VjCcA3rg4Z1$q+K$Q?#-4QVYu9JI2KrJC7w?cz@~51e zbSP0o4#KxQAatBAxb(nVzVycjEwZBmsYFwndZ>FXVOM!0NHjFbu0q@L$ zjVR&2<8s`8({6s}c81R>c@2;eKBk)HnQNhJ)p5SF)p0MbL}xtqbO=GIjAC#_#YCg<;3Z-&}H z_4}lJugSttfOunkE|Pf4HGrYqRB1zDoq-iVN5b~ux{f)G{CdL!mVw8k%69UODJ>(A ztf6hyG><`*Doo699E7$&`!!{{9G-iZ^oI(^!m6L*E>9V*(`TgHlJd-;KcttXw>t%< zLAcyUg;5tBIRIQueS+S52fqlaQc2p-4c)eOnCX^uX`+Fp*P99l<8cufP6|u!NCY*g z8I@rGic|9RZSEHxW9j7qNpborRi02P)SUDFytb^E#ePPZqd;EGu>iu9T<9N!3l+X0};kY+!U;EzjX znswW3bhL+jEvwEDt9d?(AUo<#W_zg5ZP?xe!e0eTQzzNsr_u`Ei=# zsh7Yoa0Y%3;>{kD7MDtoHyx*bOsf6iCau3af-JqSjiDO#gVa|$aTt_QUQHLkPal-I~$a%_0JtVdEvkpY_EYGj#~t!d7G{Mg8z+%bo=#g+eaDXEfnB0^ zr1Ckb+$!={ue}PurRCK{sWTv1QIe+mzS29>AY}fNChC-5iq|)bpR-(gcnI8pnHO{lNR}%uA};jb+%D1jt)L zHPuw^12XrIpvG^uv5Ksbf24%VYpl2U?nJ;CR_>tTVGBdeG}gHXa9qf$rr@gJmROcw z{bcxdDC}pgx9RX24Bn1wvH`?uixY%l&DHl0s~B+UcGcTil-2;oEIS$Af(EHujhSQ3 zpMn&=jC!E@iIw{!pJzXk2Yu{2X`o)}P&BQBZa@ZyBW2hI2ACFqQr>M{T#q&0IS!Z-^>u3k#~EnuJnYT>z<)V4eYr}lI%x; z0Jw)_gGc%P`QmpOYlNVc z*?Bgyg-|{oPvusn$Wm`!S}8gqE9BDgApY>#O-2e!5j?To;gl~(UgdFOt^ zm~2gYTzOOXStV5TuTlU16T<)Sgkb$|w^DFFjmR9KFDsezRdvokr?J6xS%b3elcqF&qnfm^I&!4}&Ugw+A+X>TbZ!AOx>^pS*qG>JZH=^Wub znQi%0!$vlCT-UHQ7B&%(pK>YS&zM-0jr1PE*9{TdKi)7tGWt;UN5+mBo@L)H-o`x} zmnD464v%tF4ycyy(b+QLqgU5{K>D+-zb!Gq%`M&)*YOt7IhZ#?*_7BW$tcyvly1m?ZrV39F_uf^XuLeX< zo4qzf#X0IE!YwEa&*C~M&@%A3e|BCTY2|?$mZw->tyI5rYthTpNs>xTNbZt=Dj4kX zzTmBpG`%oYW1M2K{MPFtVfKb}7HX=}&&__ix#z6$rG92l)XG1f+6;T1pFVhf9f_dT zcqheN`{SSTMX+LH-LwO1<(c?N&kr4YPItA@-OT|cab|dYHxqlz4D$hn&|{=t+YpgK zM6)>3;1w9Z*Gl$+;1=8A#HSP0tasPVTwjg|zw}0r>Yr%ZkVK!l~R;J^^ zP7<+c3E@JWIc2JCoEKH<;l=#8*pOj>s_}D}Uz}!BKZTVnE-lSb6}+Pu<=SlX7rnwD z>Q0mtm|=}9#H-c0$Gb+i&o(MEf6!cgWyjl1qX&}Qi*o`m=T=tU9H@<}Hz}|d_!oIv zUYj3QF#R-CbE)dX;t0R~WR+*bzLiw%sw+!ZrrCKh%8Q81a}DChX)L<2Fgf(zqUOrt zFr}^L+JbJjsrAYlhaf{bFOhe?k8Uk+_*C%a?jk<10~p(eAv~WJHLJ~)ZMX2{mJUu%i^BG~ey44a&Z?=NFSHpeUusa`M~r{e1thWE zh9C7a-HEPA=0LICt>UMq#l*dtBOyZ*-lq|<)(*Id7PYxj=Zl@1UPy;!n})A7I^=34 z@EW$eOd9pgr1;>GWz`l=naZ`^sKxG6ZR2`1favl(IV5UX7t_-+CpvVtrPAEIJfg<)GNP+N??yh%?O<zLs%>?e~2o6p*wnR^6wa7NDI?qU`Wc)OPSqZZGQrB*81# zZt~&dqwk#uF7Z#GE8>$Ux~KAvtV9vQ=0cHYExP6m*3G}JjkE5hsAv2VhFaXoep-_) zTy#^Ld9KU;Os(V6O1aT%y~a&k?j5UNYtE?7=IX1XGB7K!hnF9JvDbNWnVLBGs^Q*O zrPpqvjo9uRwA^k--x)n2QLbkjSRJWMO{dj9-f@&XZgIq;coYuOT4jM>>w7130GX|6 z657G#zKB9%N52BHY^Pb777U``%bHwGFIn6S^fqhc>r_@&X6S%X1$#hInH!kG5!1kJ z+u`VucaCg8Y0~qc-D89KN`?JEMbaByufGGVg4rUo0X%d?w>~d@!Q+XM@KKm^Xs10u zVr*}89)<7cB_i6?2&K-&szkX)KBCQWpp#0pF+RSWMwGksPQR65;xBq>f0)a{tq<|e zx|$RImw1(b$lMAYh{SdiZiCINhh@iS_~!#WL%g^_bkk>GtsLg z+agAQ69v`f*dhxIuf5Ci(fV#cl%rsFB43Y0+AU|Ni1F00u_?8SpZ;39N6NYZZO4iH zCyQ3=2q}{jYLi#y@eZyMs-+HKbpMij@Wz0$jgbLvuXEoaYUsdPun*}lDhl218*Rc| zhq^sGJOS=BDLwNud|R>gQmCh6@u#D}bKSz5Q!lFUs92gZFk1l1(qhn$sBaUnGi}qo z&sKStb!J7_9Bc#C9+1IPY(IaD9v`v_Xfy7HNR%*KA7@P(NsY*OlH%^|tF{FDiV&tH z(o}$1ppFr*@v)UC_l6TK-}rUZ{OavrTG=5qg?bQ-p6_|+W0l@KQibJr*jGw6!U^~e zt`~^JKI2^2x%{l3?eq$5@rs5gLlnAAM;2Nc`N>^5Qc$V>53PXP<~rYcBTiD(6o9OJ0JIQ72Z5=q?3M7?8_gN}U)QSQrnl)ngU zrV=4PdG|u20aKAQctG2?QIzT~MgSDhs7TN=gQumCr~$LSOUb9c{og%~`hV>4b&&|^ zDKAK*i=%~v1Qysnr&W44$u$3cNgq*80o(c)&MG{d_Agg%ZMr+$S##sO(pY#`@^4Sp zj3P~@o2~_Bd5`yAzNff^fmnX%Chbyg-s~5 z!vfLZZeqAGLInmKHY2ghAQk&ADf1ZN{m)PAMh!b| zI(&ha#t?;K%5Rl>VrM=TFGUI+&_x<$k|CDhS#f@Myj#8o4qwZ7V*j&9DV+*Y$OqA& zzoQ~a3b_YEXv#*o=xl^`5s4w(dpiU7;@nBA(crR9W491OV40>D$qo<$*H9?}?~xpa zwJ31kHP%CF1VmbZ=4ZedeI^@?^vsk$?H2ASbTDA|HT6}!c9$S!5A;&3MFB;B7ho!| z*^9T5`7v(rXj5@3fhynt!87Pe0rdwQxrY#L_qhOb`TW)d&3)ct5pk3;4g0T-t3Y*i zm##;Z|EYmfOs?F*Weq$10Zv9LlPyLD#dx9}?;=j|%_^TY)t$u2o+9Q}3ABEzq?KEt zEHS*1Q+fb}IJ7#`*ue*HQFrgy^>1x{Wc^=65W+uS_q*>$XzCB55+Md|?5#XFcX;Zy z65ayyOO}y zW=hqQ^ppGYq34?ypFdX8LA_iv{FSeAXPQYL<=EG)4ih=e{Ky!Z;+KosX(nA}6lLzVn>T1sG zf+$!kpqKYV22P|dcqFSZM&Y^8a2iMN+aV4=J*on_7B+nRkmFiGZY3Du!=CHP*Qz~2 z{xh6bH4}E`pNk@NyiCgI-(SBsRW+@Bd)lm5A|9AKjtB5lT{?-Aaq}Gk*s{m-&X2a^ z?N8YlSsy>2?jmk+?z*0{2vZ)qn8-J}!exf9BXW~D7)W2IVStnV|yzw!_ z_2kTS(JM7JwcdTGw%@I56<*dpbWrpJ)gW|le7F3O*~*8x(g@q37JB6s6Rb?Eq7nV= zuRlQVvXIvk(eDxM6rHD<5F=kxUe|OyV3jhE2!7aQL*Dlh56~p<+S9po>cqf=-{=yh zNKJ)OFs*K=n%9<&t>#UV>%X_vMpN^X$9rDbll!bE)%2Z`#H7j1J&XseT<8>uD2ZRN zIN&^Vq5O$a6;F28L}YQiTR41z#gv`HIo?jJlJEGq6dtV@d9tXdhKIe@b`}e}#xD+n zyF7Qek~+90mb&tR=>KDye!F=AKVO?+iY;YfTpTiqPNTx5`Is(WIi+%GMEVLn&uKK4 zWfA<$qB+z9x{U>YfS-xnJSXL?b%=#mai-Pv=wAI+O8xrUvVMA2GV$HOc#l4-wh!DM zafyDSv%Qsa^ZoaSVMeW#4$S-O5hODhhBaE*f{)8K>qs~ne3CX-95nld*%B^#6HTwxu<9iH8i|-zbD2ZqE`DGd(x{F?8Ijjct-efG{nfqb#=T;sT;`{IM4tdQ9 zqE~{%2nyn+nqqnR%Y*sRPi_uIExVp89{J!(dpcdfJM;N!;80ErOU#@gLFKGoOc?gDf7qrE!X+vZr@AFz2L_*X-_A>xBRcu zLfqor_tFtD*<0H3WNWwdt7av4jziyX*DN-0dfV{2q$Ilc%#O;EAh_tj@ni+w2WdeX zE1I*nX2O*g%0RI&S5HXf3Wf^!>BJaHbQ@Qj{)&%LWtZnC zcTN^msi|nrH74Q~<`VpO4|6n3Ij>D$WhZ}dC1~|;82Es*b5w6eIcG&Vg}3avyPIJ@+_SWH4?Gs zrV5vLSB?9)NVw1ET}kcMl2VF1sfT?{VK!PaHI%3)B&P8`S>kK6GSqdNO%D!*BsY=M#aA$IP*z2Fey+pTLeGd*wH^x_hPU)EkR}bqCL=i0nmVK2C28mCV8V zzBwUI)q?#OF&L$0?AkZL_&!d~1_4;uvnvQb2jfBuGvvWxkGO^IBH{6muaR;i+T1!# zVF@^apPc)Z{uG2zA{LT4rtBSStjhyQM^n zPS@teyx~GfcWW@gy3QHlbx9I9LFz7nG}*})0c|4Sm)gy{D3)JIg%kQ_``WHw!aD;35uRvb;WfYGy) zTc1urfNJ^Xt_wmwVDy=4Wl4N>R(A5o{#<}iv~N=nlmXQFDM(W|o9jx$SY^#tC2}qj z8GSzOS6#2d>z;ylRnFfo{of+yYB)gNGv}g)?~MJljV4~!fWwPnaO^Syoa=tkj*ySe z$QhPJp@n*xg%GTnvq!dgf zp&;{3>;eg3uDE#{hcyl1Tt|m@@M6#y-J+sN!C&xC&<##xro|zipG)J<&^7jJl9OA#_xGcLF|@c^HhMym7ZaRR1vbgxdZmvG2>jy$nOi;O0-Y|6{2aJJF z&gRj?SGEem;km6e&zB=8Z#}5!%vX0P#(`pEmqIt!_!kZg?-EA8ut}QP=Zu_r%O&kb zWXkNKF5pKKiAY;<@@ihqFtRtbF|-DC@j?WWe0 zN?ePTwP3PZcXK@ZCn64bfK`Fy!vIBd#V+1+ztP{Ro*UE~;vVOx;-2sh&O-cp!}v63 zkF&zflg3W~I|tF(sZzC$ za`4@wKr#lj*@uNOs6$HRKK0cxR7K9k37H;-Dr-w?KjsztuLbwn zISgZP`F^xP_RFKu;eh=%-ONAu{}iB-D}86Mgy?X9S0wB`-%-S#rMML$QZt93T~{MeY#Kr2-k~A$ z^mga6!tCa>+?20jtGr7~d;R;j^6x zLPf53tr?72kxk!_C+9O7`T{QapJT&JUh!Nc3R##}wI#rvshTn&8dkd{~bWSD66-p{nNY2M&^oBaCE}PB)Nxe8 zMj|8pj}sv3IjD$|k;w>P>|1FHy}CLpKLRIsvoLxb4h1wQY;8P4m*3v7dTACcG{yfK zzJqD4wBgY|0Qx(?{jUJ%;^7WgiAMa7!-JF#%(ITlo5*H0S`mI~xX{ zKt})&yg*6?L3;GsE6dCmV>$JQVNBt`XPqiP(9S?@B`CivvY>bSG=65lyY+92csHSL zQ|~*l!6B_?d}taEG2=(tcq?JAI499UwznzH|O{keN z{0!<%#c^~Tl9nzd;@i)>0ScMh7`UR!oiRu;qYS{qP6Q|`|*YW z%iubnV=!(Pq%`f`$II}iK1kIcYJ$x7AmsjGAj4%Hs_{=DQk;Wqd^zy9j7i-V#z}L%g0a1wUSD;w&D$l&f=i`FuRxdx7LUhZMXLpg+rd) z6B6q#1h*NeD-jr|as+r#cFXcD!FKrh0b7rT{h(8dLR@B`p!Vpe=Dhmj6B95#qo0Z^+XT1AP1Fl02C1<~528pi_yA_+yW0tT>%dZ`s5$gqeYt0-Irt1YWQphyySB^8Wpf`SV{u!m_q3(mq| zyy}>#Eg6OSq5}B{RQlXHib6>ao9!|D?xf>zLVc8COH}w&&T07#7mZfuye>BSMl|w- z;1|xu-)t3oq_9;8M~OVg*+dDjDQjdsc{Sl|dxCONH@#hFeacFsMFUZVv#X6hI#l_; zz>kMGZX~r-&Hq#S$htcHx?Nm*-&_-c#TA(o@F$&u`>3RTd$wa;$?4t6@QL;x{CBmu zH9j4%PdE2ZCnst?O|1R!AN9XZhTF~dw7jgK^9D8UhoHZNJV+a(#d zMwjVqYGHM;7&KR1Tzv)1!CJydQi3HEk_*c4nk$uT+Y1~Lx$L$S| z9?&S)NIUKZi{5yejvXJuH_vMTby%Qp;&J>csi}3y_=hh(+w#rQN!}Dr~DnjmHqVU_h zJz!CF@}YT0Y-(a|7;KMb+s*xW#ctx~z|Q^k?%LUwgA+-lvmxEUY^HNoB;F=o9E zCPA~0#_cH9&U^6`Ys!xR)LDXQla%v_<`v#E4t2i^`w^cnYg5&It)~nthz}EjH*0Wb zsq0GU<<#)0Y&fQ`veRfr<2d28zHx-EK2NNuQ};kosm&JndB+`!bv+IC* zqct*IkoI5I;I2Uxxq7Geb)TFTGz4!`9rJkMLyk<@(KCUp4L)kA?ss4!PWnZg z8S+-*c{Day$=;2_dYl*{k@iH))@yC*)XSAc6ndI!g=jH6(~7C*s%C^2EHGv|Ue zi;M0CMPRg(k83-SB7G+V5`ot){0g8U!Im(XF6tOnt45At6iHMLFoP z8GuP|K|`LeobKC+|ly_+4nT1Ews&^r76!LXA9P4M&CQdTq+FcUDgMRSGXE^UC+2Nd~sFL zlK9peC$)+^Q{diZIq4%f1D(M><6p?D%IK7MgS4Ng_aZ8#EnEv&mTj9BmDKpEIhC3= zAdwn$SJurs6q%_$=?WmOI52{94hlYgmYpXp%9tCE?1hirjqa+~N-8y|O9G+_H68Fl zSm8@x2_I8i$*2vD3%%hd{TfC%(3>>vv>iPSv^A#12ay~^$Tza;I7`|+Yv}Em_BE{f zPzBP{G@gWD_n(wmic6Z6RBkd*#4r8m6hpFz3`@})qfS`AVt9-39Mn0)sYAC5{#LsL zKas;yCUgybUpBxHK=ucqeV}-Dow2)Iv<1B)e?WWGh}4XH_ZMON4~yy(+7%@#jF`J1 zL9q>7B6ig2ZL3(Kt$k-}UpDrz7Ar#pMB6pSgC9SV5}uSm@U{0mWUy=iZuKdrz`Zuh z?25~kR>wJUzxu6z{n*rkbb`q%jk$(jOJsYicqA(r*Ane5q}x;Fc6V16{5{fsg|hb* zKd+j(;}zX!4#xg87TFsRg$*UBxOXcVGa;)Ox<|Rqe!TBtk1uJ_0bif0ec+aew*~_V zXbus(GIx-QZ?&DsC?9j}&d`wXMC_Fb_b@-GRfQkq$8wL*)#(|(ia$1^F=k1L!_HS1 zhx~#Vv-dU?$Fgx$8r=r>gTp~&>vv-=v~Pl+5*p-6=)kJo=kI%-*eagr5gcje0IkvI z22VTrau@Q!I zBt?5g6n?Fihzvyizj2qqksz*eJxM;+IRswyu9h4h80%i@VWEVEWhkuAvy<wBqtX=I(=3($QXrE+vh+9Qj+N;sD6^JkH$;cR0Bvle>7I19jjCY=R4iKiPOHVApuvGuG>v~%B;-> zWWndKL5SGlH9%T!8hY^L+04CBP(Ky~Ou(h7#M}HJ&p3WiF$hXZJWi>`?F1@tr=*4& z)caKbd!QV~oS_17`gdKHO>y|`*|GkTgvnU{*sqYS?-Q}dYYopEa{HnSzOPQONA|ru zIb4W*Hd9(XP!S%`Iy{lUH7!S=uvzAVqb7{c9)rpp)K!dQCCZSD+7esFKQOOQm`UMIkAX ziM$oJOCWKm6NDO&n%FPGHZ$glrh?tU;F$P0H!+BsQ$vmB0L1d_NZ>zbaezG~o)3;V z=Rk0*O9*}M!*m|UEMc?)pvka;zgDvSq3q#?sl9?DpsN9@xIe4p-ug``|C_Zomkc^K zJ$=}Iul%0QlRq(%A5C)tYgMx&6}Nc2H_Fk~Ir_Z!y_?y|8K31bJSxmDss#Ueof>e* zw?72;Iv-K%3S2X~b>i{wG-`eoIz+uIJaIRATYjM{oI{#6%Rxa0-FVF9gRWJx)S3aK zBUi8Y&9_>8dT-_f;67;M*e@bAy{6f4%^vaP+iL2;xq;a`HrK%>!vU`6{n%n^Waaf9 z1N$vN`(@%d&V*~Ll{qnp3_$q>G>>bIY!{7UZ;hR0Ljn1`(BUp!a(2J%9ez-UD-zT? zVvQ6r_DSRDFIb9Y+eXz~@RT>vG=3pe>}9M7n49XAuJPz~2*(EXI`o=>oy&_?ICSJ} zQO5zs87)X93Mo*z!C;QSLvni zglg~f_m@@A`DE}MOqLZ->q9gFeq*OCV*8DjjX} zcgE7j_R0sB{UrG_RHP1s;FnAPXzr8VN74-lO}P!UxfWA7*S{eM5x-&NfsHwnfDaZ& zIgCx^#`9^ltZ&`H!8@KOeucahABGF)ECDCMoL2{_$k|HiXukRR<}30qd9I9yn9W0K zJuaX?MhyQrQXIlF3mC-6=n@2y-RsL#6A^CT%^)1>lxGD+#1^rwVaSY literal 0 HcmV?d00001 From 7a5e9010a30e6f92e9105774f8436ad13ee790fd Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sun, 9 Jul 2017 19:49:10 +0200 Subject: [PATCH 089/132] Added another passing ImageBrush test. This tests what I though was a bug in #874 but comparing with WPF, it seems this is correct behavior. --- .../Media/ImageBrushTests.cs | 28 ++++++++++++++++++ .../ImageBrush_Tile_Small_Image.expected.png | Bin 0 -> 1483 bytes .../Media/ImageBrush/github_icon_small.png | Bin 0 -> 928 bytes .../ImageBrush_Tile_Small_Image.expected.png | Bin 0 -> 1483 bytes .../Media/ImageBrush/github_icon_small.png | Bin 0 -> 928 bytes .../ImageBrush_Tile_Small_Image.expected.png | Bin 0 -> 1483 bytes .../Media/ImageBrush/github_icon_small.png | Bin 0 -> 928 bytes 7 files changed, 28 insertions(+) create mode 100644 tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_Small_Image.expected.png create mode 100644 tests/TestFiles/Cairo/Media/ImageBrush/github_icon_small.png create mode 100644 tests/TestFiles/Direct2D1/Media/ImageBrush/ImageBrush_Tile_Small_Image.expected.png create mode 100644 tests/TestFiles/Direct2D1/Media/ImageBrush/github_icon_small.png create mode 100644 tests/TestFiles/Skia/Media/ImageBrush/ImageBrush_Tile_Small_Image.expected.png create mode 100644 tests/TestFiles/Skia/Media/ImageBrush/github_icon_small.png diff --git a/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs b/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs index 5f0b1f50e6..f4e44a81f0 100644 --- a/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs +++ b/tests/Avalonia.RenderTests/Media/ImageBrushTests.cs @@ -28,6 +28,11 @@ namespace Avalonia.Direct2D1.RenderTests.Media get { return System.IO.Path.Combine(OutputPath, "github_icon.png"); } } + private string SmallBitmapPath + { + get { return System.IO.Path.Combine(OutputPath, "github_icon_small.png"); } + } + [Fact] public void ImageBrush_Tile_Fill() { @@ -76,6 +81,29 @@ namespace Avalonia.Direct2D1.RenderTests.Media CompareImages(); } + [Fact] + public void ImageBrush_Tile_Small_Image() + { + Decorator target = new Decorator + { + Width = 200, + Height = 200, + Child = new Rectangle + { + Margin = new Thickness(8), + Fill = new ImageBrush + { + Stretch = Stretch.None, + TileMode = TileMode.Tile, + Source = new Bitmap(SmallBitmapPath), + } + } + }; + + RenderToFile(target); + CompareImages(); + } + [Fact] public void ImageBrush_NoStretch_NoTile_Alignment_TopLeft() { diff --git a/tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_Small_Image.expected.png b/tests/TestFiles/Cairo/Media/ImageBrush/ImageBrush_Tile_Small_Image.expected.png new file mode 100644 index 0000000000000000000000000000000000000000..669da6ca1a2d08955074eabcfd7e66c09f297091 GIT binary patch literal 1483 zcmbtU`!^E`9G{C6Ejp=03+djtd7MJZ`!S&|ip={JHne%xfzUO?u=lj#A=(>*wP+eCY0002JJi&en zAN;}n`xM$5)K;f3r8GYeS3n!%BwrC!U@qP+000rIu@kMT$Olq9gVO+jLw!G}G?4r} z764F<@&dcu%!*i@9WMa|g4EV=mNsPTQb_xm(9$bz;DdZ&A@et~*DRah=;^EyNw6q3 z-dZTx(tI%HzV5E2A_~^RCnr8cT=dd2Wx<;?bz5DQF9L7+A^bX#+$^3@1g)SJS=YXD zT--p%(O^(>Wf&I;W7Oh4DE|35{E2ZZZ+IECHamwnVz)`P7rk%X%aTZXDV0#0g&~|Y z=7>H=Qc`PoO3qqdUJj}8?h{+pt5$Sspn!%PTupF5Wa$KC}PmT^Z zQSR^s3upZ+3Qfw6d4n8vF&QbNP4y+$8viD6bH$7JG3xb2x`>Pn7VL(H*+x5&zyqZC z*MSBmhXVTVaG5xI)iMPIjSdWcU!)TgK~Gsl!hHAst?NY!`9(zWz2*#BRh%kQ7xejI zz8a5bTbuH`b!Y%xJUEP_*H02$480SA_KP%3NNr8;21%0k8wO@WF*FSa<_>shvDF{wmkl|V1&4K(NT4c*6jAuD?6)93Ag! z+@bTeAgF()sUxKIGxa<;zxJQ$px)SFw?WtO(C%V+%Zyp`@}`6$JAmI<)lPU|#|M&U zHUhhr>W_rxR0wlc-U{qe(mlqDk`L;A%`$J!W*7j;$kZ_X74L2O`OBT_6Wf61^Wf{Oq!wEF!W)zWNaW;i0Mu~X$7BmjISoM;oSKE#GPcF5+rew5 z7qar=5UshkbhK7jthG1Vs>PHn_e^~{Oq!#49JWD?tz~m@Z$mM15o_0y>_Y->7NFL@U+LFt+AGlYyaTq@&5Pmr=v z+Maz7M%{Kqv9h}$&xzh*T$nCBx1zjN+7|XooTQkh%204^ci2QGgz@+!90N5jJN7Mk z2chMfcZS|V&Rijzd|#60?-54}?>>LjJx!~)wFZ7P{nT?TIyc`iEIdDs>;09K{7HlG?pA0ES<{D!NzPZj(&G~@i;e4{AQ=BuX26EN=7P! zjacmU)8J?y#Q3-Qf;pSrb@R3-%}uYDG|rct9Z8ZV)(zM+QF_KBAq5_GU)dlL`&Q)1 z5p2={x+u|;D3LH+M_@jmux8^#vrnC{u`N=OFI*RHlOW|vh|%}*YVgiio;pE$W=?!j znu>X-(HIWt`e2Z+Qt2zV?L8{*YDV5{yu9WsfZ81$i2rXC)Rre6{G*)#UhY2N JHrJ@T{{zDJ###UX literal 0 HcmV?d00001 diff --git a/tests/TestFiles/Cairo/Media/ImageBrush/github_icon_small.png b/tests/TestFiles/Cairo/Media/ImageBrush/github_icon_small.png new file mode 100644 index 0000000000000000000000000000000000000000..5799bdfdce9e4bd1a897b946186a043369d5a1e0 GIT binary patch literal 928 zcmV;R17G}!P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^MlX|MGF00R(7L_t(oN6l8hYZO5gp2A;&Ca}eyKG0H5>*axsg`+LB{;NgnD*kH@Z*(cv$-FK^5DMu zP!E!RMh*ceZ5l$VSJs^GQOZLYMw23lU!rBh;4)gO2a1?0>7ykN+iY`MMlM>JbuDUc98u;X2)h$t+7Y-P-KNY%u;!^-n05r=tH+eN5K8q3 z(~cly@`5xMK)4ytG3^LK#t$iT5rnJw0Mm{Dt0K)sQ0Kz51Jq^mnKBkisXk%)f8YP2 zm?jsU_%0>>4?^ADVU6w_DQ462~(T)7O-gCZx93{xp`(tVu$s-VM_Y%hG4*7G9 zZr@=8S~I;OP(M&&RjIC++CYZ|P=!)$wN7FjGm9-FN;%j*9g7k>+YV3Ly3+-n%lMlu zOtrcW#*s%)lY%?jLxX9D|EysP_zrxb~s<_1ia!#WzA|^2@!_# zd?sFi!dhyKd6<;z^buArm-muE+sJi~FavdFTcueO8$w0OQ&bn+427Fa;Ix~=WV3k) z8p$Hmz%!_U6*$LLl7U(V&r|M2i_k3(V)#x5V}Ai{Q!>aK4CsRZ0000xfzUO?u=lj#A=(>*wP+eCY0002JJi&en zAN;}n`xM$5)K;f3r8GYeS3n!%BwrC!U@qP+000rIu@kMT$Olq9gVO+jLw!G}G?4r} z764F<@&dcu%!*i@9WMa|g4EV=mNsPTQb_xm(9$bz;DdZ&A@et~*DRah=;^EyNw6q3 z-dZTx(tI%HzV5E2A_~^RCnr8cT=dd2Wx<;?bz5DQF9L7+A^bX#+$^3@1g)SJS=YXD zT--p%(O^(>Wf&I;W7Oh4DE|35{E2ZZZ+IECHamwnVz)`P7rk%X%aTZXDV0#0g&~|Y z=7>H=Qc`PoO3qqdUJj}8?h{+pt5$Sspn!%PTupF5Wa$KC}PmT^Z zQSR^s3upZ+3Qfw6d4n8vF&QbNP4y+$8viD6bH$7JG3xb2x`>Pn7VL(H*+x5&zyqZC z*MSBmhXVTVaG5xI)iMPIjSdWcU!)TgK~Gsl!hHAst?NY!`9(zWz2*#BRh%kQ7xejI zz8a5bTbuH`b!Y%xJUEP_*H02$480SA_KP%3NNr8;21%0k8wO@WF*FSa<_>shvDF{wmkl|V1&4K(NT4c*6jAuD?6)93Ag! z+@bTeAgF()sUxKIGxa<;zxJQ$px)SFw?WtO(C%V+%Zyp`@}`6$JAmI<)lPU|#|M&U zHUhhr>W_rxR0wlc-U{qe(mlqDk`L;A%`$J!W*7j;$kZ_X74L2O`OBT_6Wf61^Wf{Oq!wEF!W)zWNaW;i0Mu~X$7BmjISoM;oSKE#GPcF5+rew5 z7qar=5UshkbhK7jthG1Vs>PHn_e^~{Oq!#49JWD?tz~m@Z$mM15o_0y>_Y->7NFL@U+LFt+AGlYyaTq@&5Pmr=v z+Maz7M%{Kqv9h}$&xzh*T$nCBx1zjN+7|XooTQkh%204^ci2QGgz@+!90N5jJN7Mk z2chMfcZS|V&Rijzd|#60?-54}?>>LjJx!~)wFZ7P{nT?TIyc`iEIdDs>;09K{7HlG?pA0ES<{D!NzPZj(&G~@i;e4{AQ=BuX26EN=7P! zjacmU)8J?y#Q3-Qf;pSrb@R3-%}uYDG|rct9Z8ZV)(zM+QF_KBAq5_GU)dlL`&Q)1 z5p2={x+u|;D3LH+M_@jmux8^#vrnC{u`N=OFI*RHlOW|vh|%}*YVgiio;pE$W=?!j znu>X-(HIWt`e2Z+Qt2zV?L8{*YDV5{yu9WsfZ81$i2rXC)Rre6{G*)#UhY2N JHrJ@T{{zDJ###UX literal 0 HcmV?d00001 diff --git a/tests/TestFiles/Direct2D1/Media/ImageBrush/github_icon_small.png b/tests/TestFiles/Direct2D1/Media/ImageBrush/github_icon_small.png new file mode 100644 index 0000000000000000000000000000000000000000..5799bdfdce9e4bd1a897b946186a043369d5a1e0 GIT binary patch literal 928 zcmV;R17G}!P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^MlX|MGF00R(7L_t(oN6l8hYZO5gp2A;&Ca}eyKG0H5>*axsg`+LB{;NgnD*kH@Z*(cv$-FK^5DMu zP!E!RMh*ceZ5l$VSJs^GQOZLYMw23lU!rBh;4)gO2a1?0>7ykN+iY`MMlM>JbuDUc98u;X2)h$t+7Y-P-KNY%u;!^-n05r=tH+eN5K8q3 z(~cly@`5xMK)4ytG3^LK#t$iT5rnJw0Mm{Dt0K)sQ0Kz51Jq^mnKBkisXk%)f8YP2 zm?jsU_%0>>4?^ADVU6w_DQ462~(T)7O-gCZx93{xp`(tVu$s-VM_Y%hG4*7G9 zZr@=8S~I;OP(M&&RjIC++CYZ|P=!)$wN7FjGm9-FN;%j*9g7k>+YV3Ly3+-n%lMlu zOtrcW#*s%)lY%?jLxX9D|EysP_zrxb~s<_1ia!#WzA|^2@!_# zd?sFi!dhyKd6<;z^buArm-muE+sJi~FavdFTcueO8$w0OQ&bn+427Fa;Ix~=WV3k) z8p$Hmz%!_U6*$LLl7U(V&r|M2i_k3(V)#x5V}Ai{Q!>aK4CsRZ0000xfzUO?u=lj#A=(>*wP+eCY0002JJi&en zAN;}n`xM$5)K;f3r8GYeS3n!%BwrC!U@qP+000rIu@kMT$Olq9gVO+jLw!G}G?4r} z764F<@&dcu%!*i@9WMa|g4EV=mNsPTQb_xm(9$bz;DdZ&A@et~*DRah=;^EyNw6q3 z-dZTx(tI%HzV5E2A_~^RCnr8cT=dd2Wx<;?bz5DQF9L7+A^bX#+$^3@1g)SJS=YXD zT--p%(O^(>Wf&I;W7Oh4DE|35{E2ZZZ+IECHamwnVz)`P7rk%X%aTZXDV0#0g&~|Y z=7>H=Qc`PoO3qqdUJj}8?h{+pt5$Sspn!%PTupF5Wa$KC}PmT^Z zQSR^s3upZ+3Qfw6d4n8vF&QbNP4y+$8viD6bH$7JG3xb2x`>Pn7VL(H*+x5&zyqZC z*MSBmhXVTVaG5xI)iMPIjSdWcU!)TgK~Gsl!hHAst?NY!`9(zWz2*#BRh%kQ7xejI zz8a5bTbuH`b!Y%xJUEP_*H02$480SA_KP%3NNr8;21%0k8wO@WF*FSa<_>shvDF{wmkl|V1&4K(NT4c*6jAuD?6)93Ag! z+@bTeAgF()sUxKIGxa<;zxJQ$px)SFw?WtO(C%V+%Zyp`@}`6$JAmI<)lPU|#|M&U zHUhhr>W_rxR0wlc-U{qe(mlqDk`L;A%`$J!W*7j;$kZ_X74L2O`OBT_6Wf61^Wf{Oq!wEF!W)zWNaW;i0Mu~X$7BmjISoM;oSKE#GPcF5+rew5 z7qar=5UshkbhK7jthG1Vs>PHn_e^~{Oq!#49JWD?tz~m@Z$mM15o_0y>_Y->7NFL@U+LFt+AGlYyaTq@&5Pmr=v z+Maz7M%{Kqv9h}$&xzh*T$nCBx1zjN+7|XooTQkh%204^ci2QGgz@+!90N5jJN7Mk z2chMfcZS|V&Rijzd|#60?-54}?>>LjJx!~)wFZ7P{nT?TIyc`iEIdDs>;09K{7HlG?pA0ES<{D!NzPZj(&G~@i;e4{AQ=BuX26EN=7P! zjacmU)8J?y#Q3-Qf;pSrb@R3-%}uYDG|rct9Z8ZV)(zM+QF_KBAq5_GU)dlL`&Q)1 z5p2={x+u|;D3LH+M_@jmux8^#vrnC{u`N=OFI*RHlOW|vh|%}*YVgiio;pE$W=?!j znu>X-(HIWt`e2Z+Qt2zV?L8{*YDV5{yu9WsfZ81$i2rXC)Rre6{G*)#UhY2N JHrJ@T{{zDJ###UX literal 0 HcmV?d00001 diff --git a/tests/TestFiles/Skia/Media/ImageBrush/github_icon_small.png b/tests/TestFiles/Skia/Media/ImageBrush/github_icon_small.png new file mode 100644 index 0000000000000000000000000000000000000000..5799bdfdce9e4bd1a897b946186a043369d5a1e0 GIT binary patch literal 928 zcmV;R17G}!P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E-^MlX|MGF00R(7L_t(oN6l8hYZO5gp2A;&Ca}eyKG0H5>*axsg`+LB{;NgnD*kH@Z*(cv$-FK^5DMu zP!E!RMh*ceZ5l$VSJs^GQOZLYMw23lU!rBh;4)gO2a1?0>7ykN+iY`MMlM>JbuDUc98u;X2)h$t+7Y-P-KNY%u;!^-n05r=tH+eN5K8q3 z(~cly@`5xMK)4ytG3^LK#t$iT5rnJw0Mm{Dt0K)sQ0Kz51Jq^mnKBkisXk%)f8YP2 zm?jsU_%0>>4?^ADVU6w_DQ462~(T)7O-gCZx93{xp`(tVu$s-VM_Y%hG4*7G9 zZr@=8S~I;OP(M&&RjIC++CYZ|P=!)$wN7FjGm9-FN;%j*9g7k>+YV3Ly3+-n%lMlu zOtrcW#*s%)lY%?jLxX9D|EysP_zrxb~s<_1ia!#WzA|^2@!_# zd?sFi!dhyKd6<;z^buArm-muE+sJi~FavdFTcueO8$w0OQ&bn+427Fa;Ix~=WV3k) z8p$Hmz%!_U6*$LLl7U(V&r|M2i_k3(V)#x5V}Ai{Q!>aK4CsRZ0000 Date: Mon, 10 Jul 2017 17:13:52 +0300 Subject: [PATCH 090/132] Focus embedded toplevel on click --- src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 229e330a33..094929deda 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -169,6 +169,7 @@ namespace Avalonia.Win32.Interop.Wpf else return; MouseEvent(type, e); + Focus(); } protected override void OnMouseUp(MouseButtonEventArgs e) @@ -183,6 +184,7 @@ namespace Avalonia.Win32.Interop.Wpf else return; MouseEvent(type, e); + Focus(); } protected override void OnMouseMove(MouseEventArgs e) From 2d23cab586507c64d2eff5e97c684c85082d0df9 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 10 Jul 2017 17:25:53 +0300 Subject: [PATCH 091/132] Fixed Skia framebuffer bitmap test --- tests/Avalonia.RenderTests/Media/BitmapTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Avalonia.RenderTests/Media/BitmapTests.cs b/tests/Avalonia.RenderTests/Media/BitmapTests.cs index 9e0ac5cf14..57f1e40d12 100644 --- a/tests/Avalonia.RenderTests/Media/BitmapTests.cs +++ b/tests/Avalonia.RenderTests/Media/BitmapTests.cs @@ -81,6 +81,7 @@ namespace Avalonia.Direct2D1.RenderTests.Media using (var target = r.CreateRenderTarget(new object[] { fb })) using (var ctx = target.CreateDrawingContext(null)) { + ctx.Clear(Colors.Transparent); ctx.PushOpacity(0.8); ctx.FillRectangle(Brushes.Chartreuse, new Rect(0, 0, 20, 100)); ctx.FillRectangle(Brushes.Crimson, new Rect(20, 0, 20, 100)); From f926d7886c3d3fa56f94f860c8fc446da11807c8 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 12 Jul 2017 12:40:14 +0300 Subject: [PATCH 092/132] Fixed include condition for linux skia binaries --- build/SkiaSharp.props | 2 +- .../Avalonia.Skia.Desktop.NetStandard.csproj | 3 ++- src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build/SkiaSharp.props b/build/SkiaSharp.props index 77407f9996..04e8a3ad4f 100644 --- a/build/SkiaSharp.props +++ b/build/SkiaSharp.props @@ -1,6 +1,6 @@  - + diff --git a/src/Skia/Avalonia.Skia.Desktop.NetStandard/Avalonia.Skia.Desktop.NetStandard.csproj b/src/Skia/Avalonia.Skia.Desktop.NetStandard/Avalonia.Skia.Desktop.NetStandard.csproj index ca9f6c76e1..311abce88f 100644 --- a/src/Skia/Avalonia.Skia.Desktop.NetStandard/Avalonia.Skia.Desktop.NetStandard.csproj +++ b/src/Skia/Avalonia.Skia.Desktop.NetStandard/Avalonia.Skia.Desktop.NetStandard.csproj @@ -5,6 +5,7 @@ false Avalonia.Skia.Desktop Avalonia.Skia.Desktop + true true @@ -42,4 +43,4 @@ - \ No newline at end of file + diff --git a/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj b/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj index b8dd79eca9..e2a2ac6146 100644 --- a/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj +++ b/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj @@ -54,6 +54,9 @@ prompt MinimumRecommendedRules.ruleset + + true + @@ -107,4 +110,4 @@ - \ No newline at end of file + From 644708bb7c932fc1146528d94426ab58f71ce430 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 12 Jul 2017 13:03:01 +0300 Subject: [PATCH 093/132] Implemented mouse leave event for GTK3 backend --- src/Gtk/Avalonia.Gtk3/Interop/Native.cs | 18 ++++++++++++++++++ src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs | 13 +++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/Gtk/Avalonia.Gtk3/Interop/Native.cs b/src/Gtk/Avalonia.Gtk3/Interop/Native.cs index 9f38861b07..fb1a9955e3 100644 --- a/src/Gtk/Avalonia.Gtk3/Interop/Native.cs +++ b/src/Gtk/Avalonia.Gtk3/Interop/Native.cs @@ -500,6 +500,24 @@ namespace Avalonia.Gtk3.Interop public gdouble delta_y; } + [StructLayout(LayoutKind.Sequential)] + unsafe struct GdkEventCrossing + { + public GdkEventType type; + public IntPtr window; + public gint8 send_event; + public IntPtr subwindow; + public guint32 time; + public gdouble x; + public gdouble y; + public gdouble x_root; + public gdouble y_root; + public int mode; + public int detail; + public bool focus; + public GdkModifierType state; + }; + [StructLayout(LayoutKind.Sequential)] unsafe struct GdkEventWindowState { diff --git a/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs b/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs index 00130346e8..39304940d2 100644 --- a/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs +++ b/src/Gtk/Avalonia.Gtk3/WindowBaseImpl.cs @@ -45,6 +45,7 @@ namespace Avalonia.Gtk3 ConnectEvent("window-state-event", OnStateChanged); ConnectEvent("key-press-event", OnKeyEvent); ConnectEvent("key-release-event", OnKeyEvent); + ConnectEvent("leave-notify-event", OnLeaveNotifyEvent); Connect("destroy", OnDestroy); Native.GtkWidgetRealize(gtkWidget); _lastSize = ClientSize; @@ -194,6 +195,18 @@ namespace Avalonia.Gtk3 return true; } + private unsafe bool OnLeaveNotifyEvent(IntPtr w, IntPtr pev, IntPtr userData) + { + var evnt = (GdkEventCrossing*) pev; + var position = new Point(evnt->x, evnt->y); + Input(new RawMouseEventArgs(Gtk3Platform.Mouse, + evnt->time, + _inputRoot, + RawMouseEventType.Move, + position, GetModifierKeys(evnt->state))); + return true; + } + private unsafe bool OnCommit(IntPtr gtkwidget, IntPtr utf8string, IntPtr userdata) { Input(new RawTextInputEventArgs(Gtk3Platform.Keyboard, _lastKbdEvent, Utf8Buffer.StringFromPtr(utf8string))); From 35f353c2db2cd3d93bb6dbe325ccdc8556f3d0c9 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 12 Jul 2017 19:31:02 +0300 Subject: [PATCH 094/132] Use OnMeasureInvalidated instead of virtual InvalidateMeasure --- src/Avalonia.Layout/Layoutable.cs | 11 ++++++++++- .../Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Layout/Layoutable.cs b/src/Avalonia.Layout/Layoutable.cs index a08ab77d70..523c720e2f 100644 --- a/src/Avalonia.Layout/Layoutable.cs +++ b/src/Avalonia.Layout/Layoutable.cs @@ -367,10 +367,18 @@ namespace Avalonia.Layout } } + + /// + /// Called by InvalidateMeasure + /// + protected virtual void OnMeasureInvalidated() + { + } + /// /// Invalidates the measurement of the control and queues a new layout pass. /// - public virtual void InvalidateMeasure() + public void InvalidateMeasure() { if (IsMeasureValid) { @@ -384,6 +392,7 @@ namespace Avalonia.Layout LayoutManager.Instance?.InvalidateMeasure(this); InvalidateVisual(); } + OnMeasureInvalidated(); } } diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 094929deda..0620c6cc57 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -40,10 +40,9 @@ namespace Avalonia.Win32.Interop.Wpf EnforceClientSize = false; } - public override void InvalidateMeasure() + protected override void OnMeasureInvalidated() { ((FrameworkElement)PlatformImpl)?.InvalidateMeasure(); - base.InvalidateMeasure(); } protected override void HandleResized(Size clientSize) From 76bc7aaafb8c76ab7612ef98a2fc3f6fd56b27a5 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 12 Jul 2017 19:57:25 +0300 Subject: [PATCH 095/132] Fixed issues from PR comments #1016 --- .../WindowsInteropTest/EmbedToWpfDemo.xaml.cs | 5 +---- src/Avalonia.Diagnostics/DevTools.xaml.cs | 15 ++++++++++++--- .../Avalonia.Win32.Interop.csproj | 2 +- .../Wpf/{Helpers.cs => WpfInteropExtensions.cs} | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) rename src/Windows/Avalonia.Win32.Interop/Wpf/{Helpers.cs => WpfInteropExtensions.cs} (94%) diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs index 5ca2768d9e..1a91d67b49 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs @@ -28,10 +28,7 @@ namespace WindowsInteropTest InitializeComponent(); var view = new MainView(); - view.AttachedToVisualTree += delegate - { - view.AttachDevTools(); - }; + view.AttachDevToolsToTopLevelOnVisualTreeAttachment(); Host.Content = view; var btn = (Avalonia.Controls.Button) RightBtn.Content; btn.Click += delegate diff --git a/src/Avalonia.Diagnostics/DevTools.xaml.cs b/src/Avalonia.Diagnostics/DevTools.xaml.cs index 85c3cfddd8..06965ece89 100644 --- a/src/Avalonia.Diagnostics/DevTools.xaml.cs +++ b/src/Avalonia.Diagnostics/DevTools.xaml.cs @@ -14,12 +14,21 @@ using Avalonia.VisualTree; namespace Avalonia { - public static class WindowExtensions + public static class DevToolsExtensions { - public static void AttachDevTools(this Control control) + public static void AttachDevTools(this TopLevel control) { - Avalonia.Diagnostics.DevTools.Attach((TopLevel)control.GetVisualRoot()); + Avalonia.Diagnostics.DevTools.Attach(control); } + + public static void AttachDevToolsToTopLevelOnVisualTreeAttachment(this Control control) + { + (control.GetVisualRoot() as TopLevel)?.AttachDevTools(); + control.AttachedToVisualTree += delegate + { + (control.GetVisualRoot() as TopLevel)?.AttachDevTools(); + }; + } } } diff --git a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj index e2d764c62c..c5cd2ab64d 100644 --- a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj +++ b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj @@ -49,7 +49,7 @@ - + diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfInteropExtensions.cs similarity index 94% rename from src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs rename to src/Windows/Avalonia.Win32.Interop/Wpf/WpfInteropExtensions.cs index 9c1f39e86b..6433ff05e0 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/Helpers.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfInteropExtensions.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace Avalonia.Win32.Interop.Wpf { - static class Helpers + static class WpfInteropExtensions { public static System.Windows.Point ToWpfPoint(this Point pt) => new System.Windows.Point(pt.X, pt.Y); public static Point ToAvaloniaPoint(this System.Windows.Point pt) => new Point(pt.X, pt.Y); From 33fd46c7890b8941f991a15cd5e048fbd727d899 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Thu, 13 Jul 2017 00:37:37 +0200 Subject: [PATCH 096/132] Quick and dirty hack to fix #1054 This fixes the problem decribed in #1054 but I think there's something wrong with the way we handle top level layout anyway and it's going to need refactoring soon. (cherry picked from commit 7337a90fc1eb92467c8f3052b6108dbad57d1d1b) --- src/Avalonia.Controls/WindowBase.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/WindowBase.cs b/src/Avalonia.Controls/WindowBase.cs index 1f484fd6cb..fbdf64b14a 100644 --- a/src/Avalonia.Controls/WindowBase.cs +++ b/src/Avalonia.Controls/WindowBase.cs @@ -29,6 +29,7 @@ namespace Avalonia.Controls public static readonly DirectProperty IsActiveProperty = AvaloniaProperty.RegisterDirect(nameof(IsActive), o => o.IsActive); + private bool _hasExecutedInitialLayoutPass; private bool _isActive; private bool _ignoreVisibilityChange; @@ -136,7 +137,13 @@ namespace Avalonia.Controls { EnsureInitialized(); IsVisible = true; - LayoutManager.Instance.ExecuteInitialLayoutPass(this); + + if (!_hasExecutedInitialLayoutPass) + { + LayoutManager.Instance.ExecuteInitialLayoutPass(this); + _hasExecutedInitialLayoutPass = true; + } + PlatformImpl?.Show(); } finally From 71dff48a7a1f0bf88ae8ab4592c3c977e550190d Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Thu, 13 Jul 2017 15:11:48 +0100 Subject: [PATCH 097/132] add fix for null reference exception when arranging. added comments explaining the conditions that the bug occurs in. (cherry picked from commit fa1f5bc8f9f5e3b91b6a97801910d79e6af41cc5) --- src/Avalonia.Layout/LayoutManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Layout/LayoutManager.cs b/src/Avalonia.Layout/LayoutManager.cs index 965ab3eee6..1ce55e2afa 100644 --- a/src/Avalonia.Layout/LayoutManager.cs +++ b/src/Avalonia.Layout/LayoutManager.cs @@ -190,8 +190,10 @@ namespace Avalonia.Layout { root.Arrange(new Rect(control.DesiredSize)); } - else + else if(control.PreviousArrange != null) { + // Has been observed that PreviousArrange sometimes is null, probably a bug somewhere else. + // Condition observed: control.VisualParent is Scrollbar, control is Border. control.Arrange(control.PreviousArrange.Value); } } From 6c96f690618cd9a25ac42c8b7f9d8015a784110e Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 14 Jul 2017 10:02:26 +0200 Subject: [PATCH 098/132] Only show tooltip when pointer still over control. Make sure the pointer is still over the control when the timer fires to show a tooltip. --- src/Avalonia.Controls/ToolTip.cs | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/Avalonia.Controls/ToolTip.cs b/src/Avalonia.Controls/ToolTip.cs index 22bc589a36..e1b69637af 100644 --- a/src/Avalonia.Controls/ToolTip.cs +++ b/src/Avalonia.Controls/ToolTip.cs @@ -106,24 +106,28 @@ namespace Avalonia.Controls if (control != null && control.IsVisible && control.GetVisualRoot() != null) { var cp = (control.GetVisualRoot() as IInputRoot)?.MouseDevice?.GetPosition(control); - var position = control.PointToScreen(cp ?? new Point(0, 0)) + new Vector(0, 22); - if (s_popup == null) + if (cp.HasValue && control.IsVisible && new Rect(control.Bounds.Size).Contains(cp.Value)) { - s_popup = new PopupRoot(); - s_popup.Content = new ToolTip(); - } - else - { - ((ISetLogicalParent)s_popup).SetParent(null); - } + var position = control.PointToScreen(cp.Value) + new Vector(0, 22); + + if (s_popup == null) + { + s_popup = new PopupRoot(); + s_popup.Content = new ToolTip(); + } + else + { + ((ISetLogicalParent)s_popup).SetParent(null); + } ((ISetLogicalParent)s_popup).SetParent(control); - ((ToolTip)s_popup.Content).Content = GetTip(control); - s_popup.Position = position; - s_popup.Show(); + ((ToolTip)s_popup.Content).Content = GetTip(control); + s_popup.Position = position; + s_popup.Show(); - s_current = control; + s_current = control; + } } } From e5289146d99cff3f8be3a96af5f878fc787c0d73 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 14 Jul 2017 11:20:02 +0300 Subject: [PATCH 099/132] Remove AttachDevToolsToTopLevelOnVisualTreeAttachment since @grokys doesn't like it --- .../interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs | 7 +++++-- src/Avalonia.Diagnostics/DevTools.xaml.cs | 9 --------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs index 1a91d67b49..c7a23c22fc 100644 --- a/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs +++ b/samples/interop/WindowsInteropTest/EmbedToWpfDemo.xaml.cs @@ -13,6 +13,7 @@ using System.Windows.Navigation; using System.Windows.Shapes; using Avalonia; using Avalonia.Controls; +using Avalonia.VisualTree; using ControlCatalog; using Window = System.Windows.Window; @@ -27,8 +28,10 @@ namespace WindowsInteropTest { InitializeComponent(); var view = new MainView(); - - view.AttachDevToolsToTopLevelOnVisualTreeAttachment(); + view.AttachedToVisualTree += delegate + { + ((TopLevel) view.GetVisualRoot()).AttachDevTools(); + }; Host.Content = view; var btn = (Avalonia.Controls.Button) RightBtn.Content; btn.Click += delegate diff --git a/src/Avalonia.Diagnostics/DevTools.xaml.cs b/src/Avalonia.Diagnostics/DevTools.xaml.cs index 06965ece89..6593a8cd42 100644 --- a/src/Avalonia.Diagnostics/DevTools.xaml.cs +++ b/src/Avalonia.Diagnostics/DevTools.xaml.cs @@ -20,15 +20,6 @@ namespace Avalonia { Avalonia.Diagnostics.DevTools.Attach(control); } - - public static void AttachDevToolsToTopLevelOnVisualTreeAttachment(this Control control) - { - (control.GetVisualRoot() as TopLevel)?.AttachDevTools(); - control.AttachedToVisualTree += delegate - { - (control.GetVisualRoot() as TopLevel)?.AttachDevTools(); - }; - } } } From d6cca364697d451b07398c4483a33b0d7770ebdc Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 14 Jul 2017 09:46:03 +0100 Subject: [PATCH 100/132] add nuget cache replace scripts. --- scripts/ReplaceNugetCache.ps1 | 5 +++++ scripts/ReplaceNugetCache.sh | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 scripts/ReplaceNugetCache.ps1 create mode 100644 scripts/ReplaceNugetCache.sh diff --git a/scripts/ReplaceNugetCache.ps1 b/scripts/ReplaceNugetCache.ps1 new file mode 100644 index 0000000000..854442eb09 --- /dev/null +++ b/scripts/ReplaceNugetCache.ps1 @@ -0,0 +1,5 @@ +copy ..\samples\ControlCatalog.NetCore\bin\Debug\netcoreapp1.1\Avalonia**.dll ~\.nuget\packages\avalonia\$args\lib\netcoreapp1.0\ +copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp1.1\Avalonia**.dll ~\.nuget\packages\avalonia\$args\lib\netstandard1.1\ +copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp1.1\Avalonia**.dll ~\.nuget\packages\avalonia.gtk3\$args\lib\netstandard1.1\ +copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp1.1\Avalonia**.dll ~\.nuget\packages\avalonia.skia.desktop\$args\lib\netstandard1.3\ +copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp1.1\Avalonia**.dll ~\.nuget\packages\avalonia.win32\$args\lib\netstandard1.1\ diff --git a/scripts/ReplaceNugetCache.sh b/scripts/ReplaceNugetCache.sh new file mode 100644 index 0000000000..3878e9e138 --- /dev/null +++ b/scripts/ReplaceNugetCache.sh @@ -0,0 +1,7 @@ + #!/usr/bin/env bash + + cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia/$1/lib/netcoreapp1.0/ + cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia/$1/lib/netstandard1.1/ + cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia.gtk3/$1/lib/netstandard1.1/ + cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia.skia.desktop/$1/lib/netstandard1.3/ + From ccb400c8512c99bcb3884966ca908984b4dc61f9 Mon Sep 17 00:00:00 2001 From: danwalmsley Date: Thu, 13 Jul 2017 23:09:06 +0100 Subject: [PATCH 101/132] fix linux script. --- scripts/ReplaceNugetCache.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ReplaceNugetCache.sh b/scripts/ReplaceNugetCache.sh index 3878e9e138..2ce3e7648d 100644 --- a/scripts/ReplaceNugetCache.sh +++ b/scripts/ReplaceNugetCache.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash - cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia/$1/lib/netcoreapp1.0/ - cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia/$1/lib/netstandard1.1/ - cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia.gtk3/$1/lib/netstandard1.1/ - cp ./bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia.skia.desktop/$1/lib/netstandard1.3/ + cp ../samples/ControlCatalog.NetCore/bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia/$1/lib/netcoreapp1.0/ + cp ../samples/ControlCatalog.NetCore/bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia/$1/lib/netstandard1.1/ + cp ../samples/ControlCatalog.NetCore/bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia.gtk3/$1/lib/netstandard1.1/ + cp ../samples/ControlCatalog.NetCore/bin/Debug/netcoreapp1.1/Avalonia**.dll ~/.nuget/packages/avalonia.skia.desktop/$1/lib/netstandard1.3/ From a1b5e43e184c4b685837395cb77fcf0d6a34b0b8 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 14 Jul 2017 11:40:24 +0100 Subject: [PATCH 102/132] add a context menu to the control catalog. --- samples/ControlCatalog/Pages/MenuPage.xaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/samples/ControlCatalog/Pages/MenuPage.xaml b/samples/ControlCatalog/Pages/MenuPage.xaml index 98171f29d6..9c5591c849 100644 --- a/samples/ControlCatalog/Pages/MenuPage.xaml +++ b/samples/ControlCatalog/Pages/MenuPage.xaml @@ -31,5 +31,28 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From f953e4c3a40ae6552972b6160a7a2f472bb06012 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 14 Jul 2017 15:20:27 +0100 Subject: [PATCH 103/132] chmod linux replace script --- scripts/ReplaceNugetCache.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/ReplaceNugetCache.sh diff --git a/scripts/ReplaceNugetCache.sh b/scripts/ReplaceNugetCache.sh old mode 100644 new mode 100755 From e3992ef4ad46850b98d31f6be20815ab06511f44 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 14 Jul 2017 15:53:56 +0100 Subject: [PATCH 104/132] fix context menu not closing when an item is clicked. --- src/Avalonia.Controls/ContextMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/ContextMenu.cs b/src/Avalonia.Controls/ContextMenu.cs index 0a69a5277f..fdb04f4ade 100644 --- a/src/Avalonia.Controls/ContextMenu.cs +++ b/src/Avalonia.Controls/ContextMenu.cs @@ -19,7 +19,7 @@ namespace Avalonia.Controls { ContextMenuProperty.Changed.Subscribe(ContextMenuChanged); - MenuItem.ClickEvent.AddClassHandler(x => x.OnContextMenuClick); + MenuItem.ClickEvent.AddClassHandler(x => x.OnContextMenuClick, handledEventsToo: true); } /// From 76c90df2da048f46327d26ead6f5d0db1a76c53f Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 04:12:40 +0300 Subject: [PATCH 105/132] Initial implementation for Direct2D rendering for WPF integration --- build/SharpDX.props | 1 + samples/interop/WindowsInteropTest/Program.cs | 2 +- .../ExternalRenderTarget.cs | 11 +- .../IExternalDirect2DRenderTargetSurface.cs | 3 +- .../Avalonia.Win32.Interop.csproj | 9 + .../Wpf/Direct2DImageSurface.cs | 206 ++++++++++++++++++ .../Wpf/WpfTopLevelImpl.cs | 11 +- .../Wpf/WritableBitmapSurface.cs | 10 +- 8 files changed, 233 insertions(+), 20 deletions(-) create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs diff --git a/build/SharpDX.props b/build/SharpDX.props index e381bc03e6..0eb910e71e 100644 --- a/build/SharpDX.props +++ b/build/SharpDX.props @@ -3,6 +3,7 @@ + diff --git a/samples/interop/WindowsInteropTest/Program.cs b/samples/interop/WindowsInteropTest/Program.cs index 4770688ecf..fac06d74b0 100644 --- a/samples/interop/WindowsInteropTest/Program.cs +++ b/samples/interop/WindowsInteropTest/Program.cs @@ -15,7 +15,7 @@ namespace WindowsInteropTest { System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); - AppBuilder.Configure().UseWin32().UseSkia().SetupWithoutStarting(); + AppBuilder.Configure().UseWin32().UseDirect2D1().SetupWithoutStarting(); System.Windows.Forms.Application.Run(new SelectorForm()); } } diff --git a/src/Windows/Avalonia.Direct2D1/ExternalRenderTarget.cs b/src/Windows/Avalonia.Direct2D1/ExternalRenderTarget.cs index b1c0e7e30a..307048f7b4 100644 --- a/src/Windows/Avalonia.Direct2D1/ExternalRenderTarget.cs +++ b/src/Windows/Avalonia.Direct2D1/ExternalRenderTarget.cs @@ -15,7 +15,6 @@ namespace Avalonia.Direct2D1 { private readonly IExternalDirect2DRenderTargetSurface _externalRenderTargetProvider; private readonly DirectWriteFactory _dwFactory; - private SharpDX.Direct2D1.RenderTarget _target; public ExternalRenderTarget(IExternalDirect2DRenderTargetSurface externalRenderTargetProvider, DirectWriteFactory dwFactory) { @@ -25,15 +24,14 @@ namespace Avalonia.Direct2D1 public void Dispose() { - _target?.Dispose(); - _target = null; + _externalRenderTargetProvider.DestroyRenderTarget(); } public IDrawingContextImpl CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer) { - _target = _target ?? _externalRenderTargetProvider.CreateRenderTarget(); + var target = _externalRenderTargetProvider.GetOrCreateRenderTarget(); _externalRenderTargetProvider.BeforeDrawing(); - return new DrawingContextImpl(visualBrushRenderer, _target, _dwFactory, null, () => + return new DrawingContextImpl(visualBrushRenderer, target, _dwFactory, null, () => { try { @@ -41,8 +39,7 @@ namespace Avalonia.Direct2D1 } catch (SharpDXException ex) when ((uint) ex.HResult == 0x8899000C) // D2DERR_RECREATE_TARGET { - _target?.Dispose(); - _target = null; + _externalRenderTargetProvider.DestroyRenderTarget(); } }); } diff --git a/src/Windows/Avalonia.Direct2D1/IExternalDirect2DRenderTargetSurface.cs b/src/Windows/Avalonia.Direct2D1/IExternalDirect2DRenderTargetSurface.cs index 0774c25937..aad51f46d5 100644 --- a/src/Windows/Avalonia.Direct2D1/IExternalDirect2DRenderTargetSurface.cs +++ b/src/Windows/Avalonia.Direct2D1/IExternalDirect2DRenderTargetSurface.cs @@ -8,7 +8,8 @@ namespace Avalonia.Direct2D1 { public interface IExternalDirect2DRenderTargetSurface { - SharpDX.Direct2D1.RenderTarget CreateRenderTarget(); + SharpDX.Direct2D1.RenderTarget GetOrCreateRenderTarget(); + void DestroyRenderTarget(); void BeforeDrawing(); void AfterDrawing(); } diff --git a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj index c5cd2ab64d..099a7f4074 100644 --- a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj +++ b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj @@ -49,6 +49,7 @@ + @@ -104,10 +105,18 @@ {6417e941-21bc-467b-a771-0de389353ce6} Avalonia.Markup + + {3e908f67-5543-4879-a1dc-08eace79b3cd} + Avalonia.Direct2D1 + {811a76cf-1cf6-440f-963b-bbe31bd72a82} Avalonia.Win32 + + true + + \ No newline at end of file diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs new file mode 100644 index 0000000000..303e0850aa --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs @@ -0,0 +1,206 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Interop; +using Avalonia.Direct2D1; +using SharpDX; +using SharpDX.Direct2D1; +using SharpDX.Direct3D11; +using SharpDX.Direct3D9; +using SharpDX.DXGI; +using AlphaMode = SharpDX.Direct2D1.AlphaMode; +using Device = SharpDX.Direct3D11.Device; +using Format = SharpDX.DXGI.Format; +using MapFlags = SharpDX.Direct3D11.MapFlags; +using PresentParameters = SharpDX.DXGI.PresentParameters; +using RenderTarget = SharpDX.Direct2D1.RenderTarget; +using Surface = SharpDX.DXGI.Surface; +using SwapEffect = SharpDX.DXGI.SwapEffect; +using Usage = SharpDX.Direct3D9.Usage; + +namespace Avalonia.Win32.Interop.Wpf +{ + class Direct2DImageSurface : IExternalDirect2DRenderTargetSurface + { + class Pair: IDisposable + { + public SharpDX.Direct3D9.Surface Texture { get; } + public SharpDX.Direct3D11.Resource D3D11Resource { get; } + public SharpDX.Direct3D11.Resource StagingResource { get; } + public RenderTarget Target { get;} + public Size Size { get; } + + public Pair(Size size, Vector dpi) + { + int width = (int) size.Width; + int height = (int) size.Height; + using (var texture = new Texture2D(s_dxDevice, new Texture2DDescription + { + Width = width, + Height = height, + ArraySize = 1, + MipLevels = 1, + Format = Format.B8G8R8A8_UNorm, + Usage = ResourceUsage.Default, + SampleDescription = new SampleDescription(1, 0), + BindFlags = BindFlags.RenderTarget | BindFlags.ShaderResource, + OptionFlags = ResourceOptionFlags.Shared + })) + using (var surface = texture.QueryInterface()) + using (var resource = texture.QueryInterface()) + { + D3D11Resource = texture.QueryInterface(); + var handle = resource.SharedHandle; + using (var texture9 = new Texture(s_d3DDevice, texture.Description.Width, + texture.Description.Height, 1, + Usage.RenderTarget, SharpDX.Direct3D9.Format.A8R8G8B8, Pool.Default, ref handle)) + Texture = texture9.GetSurfaceLevel(0); + Target = new RenderTarget(AvaloniaLocator.Current.GetService(), surface, + new RenderTargetProperties + { + DpiX = (float) dpi.X, + DpiY = (float) dpi.Y, + MinLevel = FeatureLevel.Level_10, + PixelFormat = new PixelFormat(Format.B8G8R8A8_UNorm, AlphaMode.Premultiplied), + + }); + } + using (var texture = new Texture2D(s_dxDevice, new Texture2DDescription + { + Width = Math.Min(width, 16), + Height = Math.Min(height, 16), + ArraySize = 1, + MipLevels = 1, + Format = Format.B8G8R8A8_UNorm, + Usage = ResourceUsage.Staging, + SampleDescription = new SampleDescription(1, 0), + CpuAccessFlags = CpuAccessFlags.Read + })) + StagingResource = texture.QueryInterface(); + Size = size; + } + + public void Dispose() + { + Texture?.Dispose(); + Target?.Dispose(); + D3D11Resource?.Dispose(); + StagingResource?.Dispose(); + } + + public void Flush() + { + + s_dxDevice.ImmediateContext.CopySubresourceRegion(D3D11Resource, 0, + new ResourceRegion(0, 0, 0, 1, 1, 1), StagingResource, 0, 0, 0, 0); + s_dxDevice.ImmediateContext.MapSubresource(StagingResource, 0, MapMode.Read, MapFlags.None); + s_dxDevice.ImmediateContext.UnmapSubresource(StagingResource, 0); + + } + } + + private D3DImage _image; + private Pair _backBuffer; + private Pair _frontBuffer; + private readonly WpfTopLevelImpl _impl; + private static Device s_dxDevice; + private static Direct3DEx s_d3DContext; + private static DeviceEx s_d3DDevice; + + + [DllImport("user32.dll", SetLastError = false)] + private static extern IntPtr GetDesktopWindow(); + void EnsureDirectX() + { + if(s_d3DDevice != null) + return; + s_d3DContext = new Direct3DEx(); + + SharpDX.Direct3D9.PresentParameters presentparams = new SharpDX.Direct3D9.PresentParameters + { + Windowed = true, + SwapEffect = SharpDX.Direct3D9.SwapEffect.Discard, + DeviceWindowHandle = GetDesktopWindow(), + PresentationInterval = PresentInterval.Default + }; + s_dxDevice = s_dxDevice ?? AvaloniaLocator.Current.GetService() + .QueryInterface(); + s_d3DDevice = new DeviceEx(s_d3DContext, 0, DeviceType.Hardware, IntPtr.Zero, CreateFlags.HardwareVertexProcessing | CreateFlags.Multithreaded | CreateFlags.FpuPreserve, presentparams); + + } + + public Direct2DImageSurface(WpfTopLevelImpl impl) + { + _impl = impl; + } + + public RenderTarget GetOrCreateRenderTarget() + { + EnsureDirectX(); + var scale = _impl.GetScaling(); + var size = new Size(_impl.ActualWidth * scale.X, _impl.ActualHeight * scale.Y); + var dpi = scale * 96; + + if (_backBuffer!=null && _backBuffer.Size == size) + return _backBuffer.Target; + + if (_image == null) + _image = new DX11Image(); + _impl.ImageSource = _image; + + + + RemoveAndDispose(ref _backBuffer); + if (size == default(Size)) + { + RemoveAndDispose(ref _frontBuffer); + _image.Lock(); + _image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, IntPtr.Zero); + _image.Unlock(); + return null; + } + _backBuffer = new Pair(size, dpi); + + return _backBuffer.Target; + } + + void RemoveAndDispose(ref T d) where T : IDisposable + { + d?.Dispose(); + d = default(T); + } + + void DoSwap() + { + + } + + void Swap() + { + var oldFront = _frontBuffer; + _frontBuffer = _backBuffer; + _backBuffer = oldFront; + _frontBuffer.Flush(); + _image.Lock(); + _image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, _frontBuffer?.Texture?.NativePointer ?? IntPtr.Zero, true); + _image.AddDirtyRect(new Int32Rect(0, 0, _image.PixelWidth, _image.PixelHeight)); + _image.Unlock(); + } + + public void DestroyRenderTarget() + { + //? + } + + public void BeforeDrawing() + { + + } + + public void AfterDrawing() => Swap(); + } +} diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index 0620c6cc57..b5715d43d5 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -60,7 +60,7 @@ namespace Avalonia.Win32.Interop.Wpf PresentationSource.AddSourceChangedHandler(this, OnSourceChanged); _hook = WndProc; _ttl = this; - _surfaces = new object[] {new WritableBitmapSurface(this)}; + _surfaces = new object[] {new WritableBitmapSurface(this), new Direct2DImageSurface(this)}; _mouse = new WpfMouseDevice(this); _keyboard = AvaloniaLocator.Current.GetService(); @@ -224,6 +224,13 @@ namespace Avalonia.Win32.Interop.Wpf Action ITopLevelImpl.ScalingChanged { get; set; } Action ITopLevelImpl.Closed { get; set; } public new event Action LostFocus; - + + internal Vector GetScaling() + { + var src = PresentationSource.FromVisual(this)?.CompositionTarget; + if (src == null) + return new Vector(1, 1); + return new Vector(src.TransformToDevice.M11, src.TransformToDevice.M22); + } } } diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs index 1dd1cb983a..0f8752fb8d 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WritableBitmapSurface.cs @@ -24,7 +24,7 @@ namespace Avalonia.Win32.Interop.Wpf public ILockedFramebuffer Lock() { - var scale = GetScaling(); + var scale = _impl.GetScaling(); var size = new Size(_impl.ActualWidth * scale.X, _impl.ActualHeight * scale.Y); var dpi = scale * 96; if (_bitmap == null || _bitmap.PixelWidth != (int) size.Width || _bitmap.PixelHeight != (int) size.Height) @@ -69,13 +69,5 @@ namespace Avalonia.Win32.Interop.Wpf public Vector Dpi { get; } public PixelFormat Format => PixelFormat.Bgra8888; } - - Vector GetScaling() - { - var src = PresentationSource.FromVisual(_impl)?.CompositionTarget; - if (src == null) - return new Vector(1, 1); - return new Vector(src.TransformToDevice.M11, src.TransformToDevice.M22); - } } } From 1cc13484c020190c5c03ede643b1c8defc6dade6 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 04:32:01 +0300 Subject: [PATCH 106/132] Cleanup --- .../Wpf/Direct2DImageSurface.cs | 51 +++++++++---------- .../Wpf/WpfAvaloniaHost.cs | 20 +++++++- .../Wpf/WpfTopLevelImpl.cs | 7 ++- 3 files changed, 49 insertions(+), 29 deletions(-) diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs index 303e0850aa..57efe700dd 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs @@ -24,17 +24,18 @@ using Usage = SharpDX.Direct3D9.Usage; namespace Avalonia.Win32.Interop.Wpf { - class Direct2DImageSurface : IExternalDirect2DRenderTargetSurface + class Direct2DImageSurface : IExternalDirect2DRenderTargetSurface, IDisposable { - class Pair: IDisposable + class SwapBuffer: IDisposable { + + private readonly SharpDX.Direct3D11.Resource _resource; + private readonly SharpDX.Direct3D11.Resource _stagingResource; public SharpDX.Direct3D9.Surface Texture { get; } - public SharpDX.Direct3D11.Resource D3D11Resource { get; } - public SharpDX.Direct3D11.Resource StagingResource { get; } public RenderTarget Target { get;} public Size Size { get; } - public Pair(Size size, Vector dpi) + public SwapBuffer(Size size, Vector dpi) { int width = (int) size.Width; int height = (int) size.Height; @@ -53,7 +54,7 @@ namespace Avalonia.Win32.Interop.Wpf using (var surface = texture.QueryInterface()) using (var resource = texture.QueryInterface()) { - D3D11Resource = texture.QueryInterface(); + _resource = texture.QueryInterface(); var handle = resource.SharedHandle; using (var texture9 = new Texture(s_d3DDevice, texture.Description.Width, texture.Description.Height, 1, @@ -80,7 +81,7 @@ namespace Avalonia.Win32.Interop.Wpf SampleDescription = new SampleDescription(1, 0), CpuAccessFlags = CpuAccessFlags.Read })) - StagingResource = texture.QueryInterface(); + _stagingResource = texture.QueryInterface(); Size = size; } @@ -88,24 +89,22 @@ namespace Avalonia.Win32.Interop.Wpf { Texture?.Dispose(); Target?.Dispose(); - D3D11Resource?.Dispose(); - StagingResource?.Dispose(); + _resource?.Dispose(); + _stagingResource?.Dispose(); } public void Flush() { - - s_dxDevice.ImmediateContext.CopySubresourceRegion(D3D11Resource, 0, - new ResourceRegion(0, 0, 0, 1, 1, 1), StagingResource, 0, 0, 0, 0); - s_dxDevice.ImmediateContext.MapSubresource(StagingResource, 0, MapMode.Read, MapFlags.None); - s_dxDevice.ImmediateContext.UnmapSubresource(StagingResource, 0); - + s_dxDevice.ImmediateContext.CopySubresourceRegion(_resource, 0, + new ResourceRegion(0, 0, 0, 1, 1, 1), _stagingResource, 0, 0, 0, 0); + s_dxDevice.ImmediateContext.MapSubresource(_stagingResource, 0, MapMode.Read, MapFlags.None); + s_dxDevice.ImmediateContext.UnmapSubresource(_stagingResource, 0); } } private D3DImage _image; - private Pair _backBuffer; - private Pair _frontBuffer; + private SwapBuffer _backBuffer; + private SwapBuffer _frontBuffer; private readonly WpfTopLevelImpl _impl; private static Device s_dxDevice; private static Direct3DEx s_d3DContext; @@ -149,11 +148,9 @@ namespace Avalonia.Win32.Interop.Wpf return _backBuffer.Target; if (_image == null) - _image = new DX11Image(); + _image = new D3DImage(); _impl.ImageSource = _image; - - RemoveAndDispose(ref _backBuffer); if (size == default(Size)) { @@ -163,7 +160,7 @@ namespace Avalonia.Win32.Interop.Wpf _image.Unlock(); return null; } - _backBuffer = new Pair(size, dpi); + _backBuffer = new SwapBuffer(size, dpi); return _backBuffer.Target; } @@ -174,11 +171,6 @@ namespace Avalonia.Win32.Interop.Wpf d = default(T); } - void DoSwap() - { - - } - void Swap() { var oldFront = _frontBuffer; @@ -193,6 +185,8 @@ namespace Avalonia.Win32.Interop.Wpf public void DestroyRenderTarget() { + RemoveAndDispose(ref _backBuffer); + RemoveAndDispose(ref _frontBuffer); //? } @@ -202,5 +196,10 @@ namespace Avalonia.Win32.Interop.Wpf } public void AfterDrawing() => Swap(); + public void Dispose() + { + RemoveAndDispose(ref _frontBuffer); + RemoveAndDispose(ref _backBuffer); + } } } diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs index e36b53199a..0a15bc26d2 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs @@ -21,15 +21,31 @@ namespace Avalonia.Win32.Interop.Wpf { private WpfTopLevelImpl _impl; private readonly SynchronizationContext _sync; + private bool _hasChildren; public WpfAvaloniaHost() { _sync = SynchronizationContext.Current; _impl = new WpfTopLevelImpl(); _impl.ControlRoot.Prepare(); _impl.Visibility = Visibility.Visible; - AddLogicalChild(_impl); - AddVisualChild(_impl); SnapsToDevicePixels = true; + PresentationSource.AddSourceChangedHandler(this, OnSourceChanged); + } + + private void OnSourceChanged(object sender, SourceChangedEventArgs e) + { + if (e.NewSource != null && !_hasChildren) + { + AddLogicalChild(_impl); + AddVisualChild(_impl); + _hasChildren = true; + } + else + { + RemoveVisualChild(_impl); + RemoveLogicalChild(_impl); + _hasChildren = false; + } } public object Content diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs index b5715d43d5..fbed2f621c 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfTopLevelImpl.cs @@ -88,7 +88,12 @@ namespace Avalonia.Win32.Interop.Wpf _ttl.ScalingChanged?.Invoke(_ttl.Scaling); } - public void Dispose() => _ttl.Closed?.Invoke(); + public void Dispose() + { + _ttl.Closed?.Invoke(); + foreach(var d in _surfaces.OfType()) + d.Dispose(); + } Size ITopLevelImpl.ClientSize => _finalSize; IMouseDevice ITopLevelImpl.MouseDevice => _mouse; From e0f481ae9fcb91aa3d03ef796a87bac4c73e905b Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 06:02:23 +0300 Subject: [PATCH 107/132] Move data between two Texture2D instances manually --- .../Wpf/Direct2DImageSurface.cs | 61 +++++++++---------- 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs index 57efe700dd..9bb9c014b7 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs @@ -17,6 +17,8 @@ using Device = SharpDX.Direct3D11.Device; using Format = SharpDX.DXGI.Format; using MapFlags = SharpDX.Direct3D11.MapFlags; using PresentParameters = SharpDX.DXGI.PresentParameters; +using Query = SharpDX.Direct3D11.Query; +using QueryType = SharpDX.Direct3D11.QueryType; using RenderTarget = SharpDX.Direct2D1.RenderTarget; using Surface = SharpDX.DXGI.Surface; using SwapEffect = SharpDX.DXGI.SwapEffect; @@ -28,9 +30,9 @@ namespace Avalonia.Win32.Interop.Wpf { class SwapBuffer: IDisposable { - + private Query _event; private readonly SharpDX.Direct3D11.Resource _resource; - private readonly SharpDX.Direct3D11.Resource _stagingResource; + private readonly SharpDX.Direct3D11.Resource _sharedResource; public SharpDX.Direct3D9.Surface Texture { get; } public RenderTarget Target { get;} public Size Size { get; } @@ -39,6 +41,7 @@ namespace Avalonia.Win32.Interop.Wpf { int width = (int) size.Width; int height = (int) size.Height; + _event = new Query(s_dxDevice, new QueryDescription {Type = QueryType.Event}); using (var texture = new Texture2D(s_dxDevice, new Texture2DDescription { Width = width, @@ -47,19 +50,14 @@ namespace Avalonia.Win32.Interop.Wpf MipLevels = 1, Format = Format.B8G8R8A8_UNorm, Usage = ResourceUsage.Default, - SampleDescription = new SampleDescription(1, 0), - BindFlags = BindFlags.RenderTarget | BindFlags.ShaderResource, - OptionFlags = ResourceOptionFlags.Shared + SampleDescription = new SampleDescription(2, 0), + BindFlags = BindFlags.RenderTarget, })) using (var surface = texture.QueryInterface()) - using (var resource = texture.QueryInterface()) + { _resource = texture.QueryInterface(); - var handle = resource.SharedHandle; - using (var texture9 = new Texture(s_d3DDevice, texture.Description.Width, - texture.Description.Height, 1, - Usage.RenderTarget, SharpDX.Direct3D9.Format.A8R8G8B8, Pool.Default, ref handle)) - Texture = texture9.GetSurfaceLevel(0); + Target = new RenderTarget(AvaloniaLocator.Current.GetService(), surface, new RenderTargetProperties { @@ -72,16 +70,25 @@ namespace Avalonia.Win32.Interop.Wpf } using (var texture = new Texture2D(s_dxDevice, new Texture2DDescription { - Width = Math.Min(width, 16), - Height = Math.Min(height, 16), + Width = width, + Height = height, ArraySize = 1, MipLevels = 1, Format = Format.B8G8R8A8_UNorm, - Usage = ResourceUsage.Staging, + Usage = ResourceUsage.Default, SampleDescription = new SampleDescription(1, 0), - CpuAccessFlags = CpuAccessFlags.Read + BindFlags = BindFlags.RenderTarget|BindFlags.ShaderResource, + OptionFlags = ResourceOptionFlags.Shared, })) - _stagingResource = texture.QueryInterface(); + using (var resource = texture.QueryInterface()) + { + _sharedResource = texture.QueryInterface(); + var handle = resource.SharedHandle; + using (var texture9 = new Texture(s_d3DDevice, texture.Description.Width, + texture.Description.Height, 1, + Usage.RenderTarget, SharpDX.Direct3D9.Format.A8R8G8B8, Pool.Default, ref handle)) + Texture = texture9.GetSurfaceLevel(0); + } Size = size; } @@ -90,21 +97,20 @@ namespace Avalonia.Win32.Interop.Wpf Texture?.Dispose(); Target?.Dispose(); _resource?.Dispose(); - _stagingResource?.Dispose(); + _sharedResource?.Dispose(); } public void Flush() { - s_dxDevice.ImmediateContext.CopySubresourceRegion(_resource, 0, - new ResourceRegion(0, 0, 0, 1, 1, 1), _stagingResource, 0, 0, 0, 0); - s_dxDevice.ImmediateContext.MapSubresource(_stagingResource, 0, MapMode.Read, MapFlags.None); - s_dxDevice.ImmediateContext.UnmapSubresource(_stagingResource, 0); + s_dxDevice.ImmediateContext.ResolveSubresource(_resource, 0, _sharedResource, 0, Format.B8G8R8A8_UNorm); + s_dxDevice.ImmediateContext.Flush(); + s_dxDevice.ImmediateContext.End(_event); + s_dxDevice.ImmediateContext.GetData(_event).Dispose(); } } private D3DImage _image; private SwapBuffer _backBuffer; - private SwapBuffer _frontBuffer; private readonly WpfTopLevelImpl _impl; private static Device s_dxDevice; private static Direct3DEx s_d3DContext; @@ -154,7 +160,6 @@ namespace Avalonia.Win32.Interop.Wpf RemoveAndDispose(ref _backBuffer); if (size == default(Size)) { - RemoveAndDispose(ref _frontBuffer); _image.Lock(); _image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, IntPtr.Zero); _image.Unlock(); @@ -173,12 +178,9 @@ namespace Avalonia.Win32.Interop.Wpf void Swap() { - var oldFront = _frontBuffer; - _frontBuffer = _backBuffer; - _backBuffer = oldFront; - _frontBuffer.Flush(); + _backBuffer.Flush(); _image.Lock(); - _image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, _frontBuffer?.Texture?.NativePointer ?? IntPtr.Zero, true); + _image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, _backBuffer?.Texture?.NativePointer ?? IntPtr.Zero, true); _image.AddDirtyRect(new Int32Rect(0, 0, _image.PixelWidth, _image.PixelHeight)); _image.Unlock(); } @@ -186,8 +188,6 @@ namespace Avalonia.Win32.Interop.Wpf public void DestroyRenderTarget() { RemoveAndDispose(ref _backBuffer); - RemoveAndDispose(ref _frontBuffer); - //? } public void BeforeDrawing() @@ -198,7 +198,6 @@ namespace Avalonia.Win32.Interop.Wpf public void AfterDrawing() => Swap(); public void Dispose() { - RemoveAndDispose(ref _frontBuffer); RemoveAndDispose(ref _backBuffer); } } From 714869033c8bcd96932ea32308894a33901a0ec4 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 12:06:04 +0300 Subject: [PATCH 108/132] Reference SharpDX.Direct3D9 package --- packages.cake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages.cake b/packages.cake index bc1aeef416..46fa26ee4b 100644 --- a/packages.cake +++ b/packages.cake @@ -80,6 +80,7 @@ public class Packages var SharpDXVersion = packageVersions["SharpDX"].FirstOrDefault().Item1; var SharpDXDirect2D1Version = packageVersions["SharpDX.Direct2D1"].FirstOrDefault().Item1; var SharpDXDirect3D11Version = packageVersions["SharpDX.Direct3D11"].FirstOrDefault().Item1; + var SharpDXDirect3D9Version = packageVersions["SharpDX.Direct3D9"].FirstOrDefault().Item1; var SharpDXDXGIVersion = packageVersions["SharpDX.DXGI"].FirstOrDefault().Item1; context.Information("Package: Serilog, version: {0}", SerilogVersion); @@ -91,6 +92,7 @@ public class Packages context.Information("Package: SharpDX, version: {0}", SharpDXVersion); context.Information("Package: SharpDX.Direct2D1, version: {0}", SharpDXDirect2D1Version); context.Information("Package: SharpDX.Direct3D11, version: {0}", SharpDXDirect3D11Version); + context.Information("Package: SharpDX.Direct3D9, version: {0}", SharpDXDirect3D9Version); context.Information("Package: SharpDX.DXGI, version: {0}", SharpDXDXGIVersion); var nugetPackagesDir = System.Environment.GetEnvironmentVariable("NUGET_HOME") @@ -472,6 +474,7 @@ public class Packages { 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 [] { From 099a7ae752a1f48e292785a0af4459103e67c735 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 12:23:00 +0300 Subject: [PATCH 109/132] Dispose event --- src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs index 9bb9c014b7..8891a76676 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs @@ -30,7 +30,7 @@ namespace Avalonia.Win32.Interop.Wpf { class SwapBuffer: IDisposable { - private Query _event; + private readonly Query _event; private readonly SharpDX.Direct3D11.Resource _resource; private readonly SharpDX.Direct3D11.Resource _sharedResource; public SharpDX.Direct3D9.Surface Texture { get; } @@ -98,6 +98,7 @@ namespace Avalonia.Win32.Interop.Wpf Target?.Dispose(); _resource?.Dispose(); _sharedResource?.Dispose(); + _event?.Dispose(); } public void Flush() From d5806d1af2bd05130691b4705a38235955e7b09d Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 14:18:31 +0300 Subject: [PATCH 110/132] Fixed DPI support --- .../Avalonia.Win32.Interop.csproj | 1 + .../Wpf/Direct2DImageSurface.cs | 17 +++--- .../Avalonia.Win32.Interop/Wpf/IntSize.cs | 59 +++++++++++++++++++ .../Wpf/WpfAvaloniaHost.cs | 1 + 4 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 src/Windows/Avalonia.Win32.Interop/Wpf/IntSize.cs diff --git a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj index 099a7f4074..5f1a065028 100644 --- a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj +++ b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj @@ -50,6 +50,7 @@ + diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs index 8891a76676..8fe7275a0f 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/Direct2DImageSurface.cs @@ -35,9 +35,9 @@ namespace Avalonia.Win32.Interop.Wpf private readonly SharpDX.Direct3D11.Resource _sharedResource; public SharpDX.Direct3D9.Surface Texture { get; } public RenderTarget Target { get;} - public Size Size { get; } + public IntSize Size { get; } - public SwapBuffer(Size size, Vector dpi) + public SwapBuffer(IntSize size, Vector dpi) { int width = (int) size.Width; int height = (int) size.Height; @@ -116,6 +116,7 @@ namespace Avalonia.Win32.Interop.Wpf private static Device s_dxDevice; private static Direct3DEx s_d3DContext; private static DeviceEx s_d3DDevice; + private Vector _oldDpi; [DllImport("user32.dll", SetLastError = false)] @@ -148,18 +149,20 @@ namespace Avalonia.Win32.Interop.Wpf { EnsureDirectX(); var scale = _impl.GetScaling(); - var size = new Size(_impl.ActualWidth * scale.X, _impl.ActualHeight * scale.Y); + var size = new IntSize(_impl.ActualWidth * scale.X, _impl.ActualHeight * scale.Y); var dpi = scale * 96; if (_backBuffer!=null && _backBuffer.Size == size) return _backBuffer.Target; - - if (_image == null) - _image = new D3DImage(); + + if (_image == null || _oldDpi.X != dpi.X || _oldDpi.Y != dpi.Y) + { + _image = new D3DImage(dpi.X, dpi.Y); + } _impl.ImageSource = _image; RemoveAndDispose(ref _backBuffer); - if (size == default(Size)) + if (size == default(IntSize)) { _image.Lock(); _image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, IntPtr.Zero); diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/IntSize.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/IntSize.cs new file mode 100644 index 0000000000..3fdbdedfd9 --- /dev/null +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/IntSize.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Avalonia.Win32.Interop.Wpf +{ + struct IntSize : IEquatable + { + public bool Equals(IntSize other) + { + return Width == other.Width && Height == other.Height; + } + + public IntSize(int width, int height) + { + Width = width; + Height = height; + } + + public IntSize(double width, double height) : this((int) width, (int) height) + { + + } + + public static implicit operator IntSize(System.Windows.Size size) + { + return new IntSize {Width = (int) size.Width, Height = (int) size.Height}; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + return obj is IntSize && Equals((IntSize) obj); + } + + public override int GetHashCode() + { + unchecked + { + return (Width * 397) ^ Height; + } + } + + public static bool operator ==(IntSize left, IntSize right) + { + return left.Equals(right); + } + + public static bool operator !=(IntSize left, IntSize right) + { + return !left.Equals(right); + } + + public int Width { get; set; } + public int Height { get; set; } + } +} diff --git a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs index 0a15bc26d2..6dc9ba9e09 100644 --- a/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs +++ b/src/Windows/Avalonia.Win32.Interop/Wpf/WpfAvaloniaHost.cs @@ -29,6 +29,7 @@ namespace Avalonia.Win32.Interop.Wpf _impl.ControlRoot.Prepare(); _impl.Visibility = Visibility.Visible; SnapsToDevicePixels = true; + UseLayoutRounding = true; PresentationSource.AddSourceChangedHandler(this, OnSourceChanged); } From 6c4bbdcc4df569190319b754ed3260f511b7e2ed Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 18:22:11 +0300 Subject: [PATCH 111/132] Added System.ValueTuple to dependency list --- build/Base.props | 5 +++++ packages.cake | 4 ++++ src/Avalonia.Base/Avalonia.Base.csproj | 1 + src/Avalonia.Input/Avalonia.Input.csproj | 3 --- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 build/Base.props diff --git a/build/Base.props b/build/Base.props new file mode 100644 index 0000000000..6689465338 --- /dev/null +++ b/build/Base.props @@ -0,0 +1,5 @@ + + + + + diff --git a/packages.cake b/packages.cake index bc1aeef416..06731beed1 100644 --- a/packages.cake +++ b/packages.cake @@ -75,6 +75,7 @@ public class Packages var SplatVersion = packageVersions["Splat"].FirstOrDefault().Item1; var SpracheVersion = packageVersions["Sprache"].FirstOrDefault().Item1; var SystemReactiveVersion = packageVersions["System.Reactive"].FirstOrDefault().Item1; + var SystemValueTupleVersion = packageVersions["System.ValueTuple"].FirstOrDefault().Item1; SkiaSharpVersion = packageVersions["SkiaSharp"].FirstOrDefault().Item1; SkiaSharpLinuxVersion = packageVersions["Avalonia.Skia.Linux.Natives"].FirstOrDefault().Item1; var SharpDXVersion = packageVersions["SharpDX"].FirstOrDefault().Item1; @@ -86,6 +87,7 @@ public class Packages 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: System.ValueTuple, version: {0}", SystemValueTupleVersion); context.Information("Package: SkiaSharp, version: {0}", SkiaSharpVersion); context.Information("Package: Avalonia.Skia.Linux.Natives, version: {0}", SkiaSharpLinuxVersion); context.Information("Package: SharpDX, version: {0}", SharpDXVersion); @@ -197,6 +199,7 @@ public class Packages new NuSpecDependency() { Id = "Splat", Version = SplatVersion }, new NuSpecDependency() { Id = "Sprache", Version = SpracheVersion }, new NuSpecDependency() { Id = "System.Reactive", Version = SystemReactiveVersion }, + new NuSpecDependency() { Id = "System.ValueTuple", Version = SystemValueTupleVersion }, //.NET Core new NuSpecDependency() { Id = "System.Threading.ThreadPool", TargetFramework = "netcoreapp1.0", Version = "4.3.0" }, new NuSpecDependency() { Id = "Microsoft.Extensions.DependencyModel", TargetFramework = "netcoreapp1.0", Version = "1.1.0" }, @@ -205,6 +208,7 @@ public class Packages new NuSpecDependency() { Id = "Serilog", TargetFramework = "netcoreapp1.0", Version = SerilogVersion }, new NuSpecDependency() { Id = "Sprache", TargetFramework = "netcoreapp1.0", Version = SpracheVersion }, new NuSpecDependency() { Id = "System.Reactive", TargetFramework = "netcoreapp1.0", Version = SystemReactiveVersion } + new NuSpecDependency() { Id = "System.ValueTuple", TargetFramework = "netcoreapp1.0", Version = SystemValueTupleVersion } }, Files = coreLibrariesNuSpecContent .Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform) diff --git a/src/Avalonia.Base/Avalonia.Base.csproj b/src/Avalonia.Base/Avalonia.Base.csproj index 95be67c98c..cc458545e2 100644 --- a/src/Avalonia.Base/Avalonia.Base.csproj +++ b/src/Avalonia.Base/Avalonia.Base.csproj @@ -30,6 +30,7 @@ Properties\SharedAssemblyInfo.cs + \ No newline at end of file diff --git a/src/Avalonia.Input/Avalonia.Input.csproj b/src/Avalonia.Input/Avalonia.Input.csproj index 0411cf77a5..e9e74e24fe 100644 --- a/src/Avalonia.Input/Avalonia.Input.csproj +++ b/src/Avalonia.Input/Avalonia.Input.csproj @@ -37,8 +37,5 @@ Properties\SharedAssemblyInfo.cs - - - \ No newline at end of file From 0d77f1701da1b5e6d2bf95e14bda8bf6b5ce96c3 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 15 Jul 2017 18:25:58 +0300 Subject: [PATCH 112/132] Script typo --- packages.cake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.cake b/packages.cake index 06731beed1..1a29695d82 100644 --- a/packages.cake +++ b/packages.cake @@ -207,7 +207,7 @@ public class Packages new NuSpecDependency() { Id = "Splat", TargetFramework = "netcoreapp1.0", Version = SplatVersion }, new NuSpecDependency() { Id = "Serilog", TargetFramework = "netcoreapp1.0", Version = SerilogVersion }, new NuSpecDependency() { Id = "Sprache", TargetFramework = "netcoreapp1.0", Version = SpracheVersion }, - new NuSpecDependency() { Id = "System.Reactive", TargetFramework = "netcoreapp1.0", Version = SystemReactiveVersion } + new NuSpecDependency() { Id = "System.Reactive", TargetFramework = "netcoreapp1.0", Version = SystemReactiveVersion }, new NuSpecDependency() { Id = "System.ValueTuple", TargetFramework = "netcoreapp1.0", Version = SystemValueTupleVersion } }, Files = coreLibrariesNuSpecContent From 2638f02cd6d7d73cf067fa3c3b6ed8bdf5e23aea Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 18 Jul 2017 09:55:10 +0100 Subject: [PATCH 113/132] fix null reference when focusing textbox in attached to visual tree, but before ontemplate applied. --- src/Avalonia.Controls/TextBox.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index d2e8085d8c..6fc79e5d2c 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -236,6 +236,11 @@ namespace Avalonia.Controls { _presenter = e.NameScope.Get("PART_TextPresenter"); _presenter.Cursor = new Cursor(StandardCursorType.Ibeam); + + if(IsFocused) + { + _presenter.ShowCaret(); + } } protected override void OnGotFocus(GotFocusEventArgs e) @@ -254,7 +259,7 @@ namespace Avalonia.Controls } else { - _presenter.ShowCaret(); + _presenter?.ShowCaret(); } } From c37dd6cda923f65da21aa4a9b6a0a35c30bd431a Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 18 Jul 2017 10:02:15 +0100 Subject: [PATCH 114/132] null check on hide caret. --- src/Avalonia.Controls/TextBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/TextBox.cs b/src/Avalonia.Controls/TextBox.cs index 6fc79e5d2c..92ab12f82e 100644 --- a/src/Avalonia.Controls/TextBox.cs +++ b/src/Avalonia.Controls/TextBox.cs @@ -268,7 +268,7 @@ namespace Avalonia.Controls base.OnLostFocus(e); SelectionStart = 0; SelectionEnd = 0; - _presenter.HideCaret(); + _presenter?.HideCaret(); } protected override void OnTextInput(TextInputEventArgs e) From df61044d50beeabe836d063ee2fae22978bf6f06 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Tue, 18 Jul 2017 21:20:14 +0300 Subject: [PATCH 115/132] Fixed text opacity for Skia backend --- src/Skia/Avalonia.Skia/DrawingContextImpl.cs | 12 +-- src/Skia/Avalonia.Skia/FormattedTextImpl.cs | 101 +++++++++---------- 2 files changed, 53 insertions(+), 60 deletions(-) diff --git a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs index 4a9f2c6572..3ed0509c0a 100644 --- a/src/Skia/Avalonia.Skia/DrawingContextImpl.cs +++ b/src/Skia/Avalonia.Skia/DrawingContextImpl.cs @@ -141,23 +141,17 @@ namespace Avalonia.Skia var rv = new PaintWrapper(paint); paint.IsStroke = false; - // TODO: SkiaSharp does not contain alpha yet! + double opacity = brush.Opacity * _currentOpacity; - //paint.SetAlpha(paint.GetAlpha() * opacity); paint.IsAntialias = true; - SKColor color = new SKColor(255, 255, 255, 255); - var solid = brush as ISolidColorBrush; - if (solid != null) - color = solid.Color.ToSKColor(); - - paint.Color = (new SKColor(color.Red, color.Green, color.Blue, (byte)(color.Alpha * opacity))); - if (solid != null) { + paint.Color = new SKColor(solid.Color.R, solid.Color.G, solid.Color.B, (byte) (solid.Color.A * opacity)); return rv; } + paint.Color = (new SKColor(255, 255, 255, (byte)(255 * opacity))); var gradient = brush as IGradientBrush; if (gradient != null) diff --git a/src/Skia/Avalonia.Skia/FormattedTextImpl.cs b/src/Skia/Avalonia.Skia/FormattedTextImpl.cs index 8568c80c04..1d224f97d7 100644 --- a/src/Skia/Avalonia.Skia/FormattedTextImpl.cs +++ b/src/Skia/Avalonia.Skia/FormattedTextImpl.cs @@ -42,7 +42,6 @@ namespace Avalonia.Skia _paint.Typeface = skiaTypeface; _paint.TextSize = (float)(typeface?.FontSize ?? 12); _paint.TextAlign = textAlignment.ToSKTextAlign(); - _paint.BlendMode = SKBlendMode.Src; _wrapping = wrapping; _constraint = constraint; @@ -200,66 +199,65 @@ namespace Avalonia.Skia } ctx->Canvas->restore(); */ - SKPaint paint = _paint; - IDisposable currd = null; - var currentWrapper = foreground; - - try + using (var paint = _paint.Clone()) { - SKPaint currFGPaint = ApplyWrapperTo(ref foreground, ref currd, paint); - bool hasCusomFGBrushes = _foregroundBrushes.Any(); - - for (int c = 0; c < _skiaLines.Count; c++) + IDisposable currd = null; + var currentWrapper = foreground; + SKPaint currentPaint = null; + try { - AvaloniaFormattedTextLine line = _skiaLines[c]; - - float x = TransformX(origin.X, 0, paint.TextAlign); + ApplyWrapperTo(ref currentPaint, foreground, ref currd, paint); + bool hasCusomFGBrushes = _foregroundBrushes.Any(); - if (!hasCusomFGBrushes) - { - var subString = Text.Substring(line.Start, line.Length); - canvas.DrawText(subString, x, origin.Y + line.Top + _lineOffset, paint); - } - else + for (int c = 0; c < _skiaLines.Count; c++) { - float currX = x; - string subStr; - int len; + AvaloniaFormattedTextLine line = _skiaLines[c]; - for (int i = line.Start; i < line.Start + line.Length;) - { - var fb = GetNextForegroundBrush(ref line, i, out len); - - if (fb != null) - { - //TODO: figure out how to get the brush size - currentWrapper = context.CreatePaint(fb, new Size()); - } - else - { - if (!currentWrapper.Equals(foreground)) currentWrapper.Dispose(); - currentWrapper = foreground; - } + float x = TransformX(origin.X, 0, paint.TextAlign); - subStr = Text.Substring(i, len); + if (!hasCusomFGBrushes) + { + var subString = Text.Substring(line.Start, line.Length); + canvas.DrawText(subString, x, origin.Y + line.Top + _lineOffset, paint); + } + else + { + float currX = x; + string subStr; + int len; - if (currFGPaint != currentWrapper.Paint) + for (int i = line.Start; i < line.Start + line.Length;) { - currFGPaint = ApplyWrapperTo(ref currentWrapper, ref currd, paint); + var fb = GetNextForegroundBrush(ref line, i, out len); + + if (fb != null) + { + //TODO: figure out how to get the brush size + currentWrapper = context.CreatePaint(fb, new Size()); + } + else + { + if (!currentWrapper.Equals(foreground)) currentWrapper.Dispose(); + currentWrapper = foreground; + } + + subStr = Text.Substring(i, len); + + ApplyWrapperTo(ref currentPaint, currentWrapper, ref currd, paint); + + canvas.DrawText(subStr, currX, origin.Y + line.Top + _lineOffset, paint); + + i += len; + currX += paint.MeasureText(subStr); } - - canvas.DrawText(subStr, currX, origin.Y + line.Top + _lineOffset, paint); - - i += len; - currX += paint.MeasureText(subStr); } } } - } - finally - { - if (!currentWrapper.Equals(foreground)) currentWrapper.Dispose(); - currd?.Dispose(); + finally + { + if (!currentWrapper.Equals(foreground)) currentWrapper.Dispose(); + currd?.Dispose(); + } } } @@ -278,12 +276,13 @@ namespace Avalonia.Skia private Size _size; private List _skiaLines; - private static SKPaint ApplyWrapperTo(ref DrawingContextImpl.PaintWrapper wrapper, + private static void ApplyWrapperTo(ref SKPaint current, DrawingContextImpl.PaintWrapper wrapper, ref IDisposable curr, SKPaint paint) { + if (current == wrapper.Paint) + return; curr?.Dispose(); curr = wrapper.ApplyTo(paint); - return wrapper.Paint; } private static bool IsBreakChar(char c) From 9e35232242f815a68e64d807d92d68d9a3cc2aa8 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Wed, 19 Jul 2017 12:23:05 +0300 Subject: [PATCH 116/132] Pick nuget api address from environment --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 6b63176a89..529cbbb65f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,6 +15,7 @@ environment: MYGET_API_URL: https://www.myget.org/F/avalonia-ci/api/v2/package init: - ps: (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/appveyor/ci/master/scripts/xamarin-vs2017-151-fixed.targets', "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.Targets\ImportAfter\Xamarin.Common.targets") +- ps: if (Test-Path env:nuget_address) {[System.IO.File]::AppendAllText("C:\Windows\System32\drivers\etc\hosts", "`n$($env:nuget_address)`tapi.nuget.org")} install: - if not exist gtk-sharp-2.12.26.msi appveyor DownloadFile http://download.xamarin.com/GTKforWindows/Windows/gtk-sharp-2.12.26.msi - if not exist dotnet-1.0.1.exe appveyor DownloadFile https://go.microsoft.com/fwlink/?linkid=843448 -FileName "dotnet-1.0.1.exe" From c4aae602e83947f50a6b692033aadf33b2c018b6 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 21 Jul 2017 18:07:12 +0300 Subject: [PATCH 117/132] Updated dotmemory --- appveyor.yml | 2 +- build.cake | 48 +++++++++++++++---- .../toolproject/tool.csproj | 9 ++++ 3 files changed, 50 insertions(+), 9 deletions(-) create mode 100644 tests/Avalonia.LeakTests/toolproject/tool.csproj diff --git a/appveyor.yml b/appveyor.yml index 529cbbb65f..038028f839 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,7 @@ before_build: build_script: - ps: .\build.ps1 -Target "AppVeyor" -Platform "$env:platform" -Configuration "$env:configuration" after_build: -- tools\JetBrains.dotMemoryUnit\tools\dotMemoryUnit.exe -targetExecutable="%xunit20%\xunit.console.x86.exe" -returnTargetExitCode --"tests\Avalonia.LeakTests\bin\Release\Avalonia.LeakTests.dll" +- tests\Avalonia.LeakTests\bin\Release\dotMemoryUnit.exe -targetExecutable="%xunit20%\xunit.console.x86.exe" -returnTargetExitCode --"tests\Avalonia.LeakTests\bin\Release\Avalonia.LeakTests.dll" - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%" - pip install codecov - codecov -f "./artifacts/coverage.xml" diff --git a/build.cake b/build.cake index b3822271d4..81390436fd 100644 --- a/build.cake +++ b/build.cake @@ -4,8 +4,8 @@ #addin "nuget:?package=Polly&version=4.2.0" #addin "nuget:?package=NuGet.Core&version=2.12.0" +#tool "nuget:?package=xunit.runner.console&version=2.2.0" #tool "nuget:https://dotnet.myget.org/F/nuget-build/?package=NuGet.CommandLine&version=4.3.0-preview1-3980&prerelease" -#tool "nuget:?package=JetBrains.dotMemoryUnit&version=2.3.20160517.113140" #tool "JetBrains.ReSharper.CommandLineTools" /////////////////////////////////////////////////////////////////////////////// // TOOLS @@ -194,6 +194,7 @@ Task("Run-Net-Core-Unit-Tests") Task("Run-Unit-Tests") .IsDependentOn("Run-Net-Core-Unit-Tests") .IsDependentOn("Build") + .IsDependentOn("Run-Leak-Tests") .WithCriteria(() => !parameters.SkipTests) .Does(() => { @@ -206,13 +207,6 @@ Task("Run-Unit-Tests") .Select(name => MakeAbsolute(File("./tests/" + name + "/bin/" + parameters.DirSuffix + "/" + name + ".dll"))) .ToList(); - if (parameters.IsRunningOnWindows) - { - var leakTests = GetFiles("./tests/Avalonia.LeakTests/bin/" + parameters.DirSuffix + "/*.LeakTests.dll"); - - unitTests.AddRange(leakTests); - } - var toolPath = (parameters.IsPlatformAnyCPU || parameters.IsPlatformX86) ? "./tools/xunit.runner.console/tools/xunit.console.x86.exe" : "./tools/xunit.runner.console/tools/xunit.console.exe"; @@ -365,6 +359,44 @@ Task("Publish-NuGet") Information("Publish-NuGet Task failed, but continuing with next Task..."); }); +Task("Run-Leak-Tests") + .WithCriteria(parameters.IsRunningOnWindows) + .IsDependentOn("Build") + .Does(() => + { + DotNetCoreRestore("tests\\Avalonia.LeakTests\\toolproject\\tool.csproj"); + DotNetBuild("tests\\Avalonia.LeakTests\\toolproject\\tool.csproj", settings => settings.SetConfiguration("Release")); + var report = "tests\\Avalonia.LeakTests\\bin\\Release\\report.xml"; + if(System.IO.File.Exists(report)) + System.IO.File.Delete(report); + var proc = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo + { + FileName="tests\\Avalonia.LeakTests\\toolproject\\bin\\Release\\net461\\dotMemoryUnit.exe", + Arguments="-targetExecutable=\"tools\\xunit.runner.console\\tools\\xunit.console.x86.exe\" -returnTargetExitCode -- tests\\Avalonia.LeakTests\\bin\\Release\\Avalonia.LeakTests.dll -xml tests\\Avalonia.LeakTests\\bin\\Release\\report.xml ", + UseShellExecute = false, + }); + var st = System.Diagnostics.Stopwatch.StartNew(); + while(!proc.HasExited && !System.IO.File.Exists(report)) + { + if(st.Elapsed.TotalSeconds>60) + { + Error("Timed out, probably a bug in dotMemoryUnit"); + proc.Kill(); + throw new Exception("dotMemory issue"); + } + proc.WaitForExit(100); + } + try{ + proc.Kill(); + }catch{} + var doc = System.Xml.Linq.XDocument.Load(report); + if(doc.Root.Descendants("assembly").Any(x=>x.Attribute("failed").Value.ToString() != "0")) + { + throw new Exception("Tests failed"); + } + + }); + Task("Inspect") .WithCriteria(parameters.IsRunningOnWindows) .IsDependentOn("Restore-NuGet-Packages") diff --git a/tests/Avalonia.LeakTests/toolproject/tool.csproj b/tests/Avalonia.LeakTests/toolproject/tool.csproj new file mode 100644 index 0000000000..c9f584be72 --- /dev/null +++ b/tests/Avalonia.LeakTests/toolproject/tool.csproj @@ -0,0 +1,9 @@ + + + net461 + Library + + + + + \ No newline at end of file From 1da031881c1cd6eb65e0e6d7590fe15de60f643c Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 21 Jul 2017 18:39:04 +0300 Subject: [PATCH 118/132] I'm starting to *really* hate the new SDK --- build.cake | 2 +- tests/Avalonia.LeakTests/toolproject/tool.csproj | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index 81390436fd..12a9d85d05 100644 --- a/build.cake +++ b/build.cake @@ -371,7 +371,7 @@ Task("Run-Leak-Tests") System.IO.File.Delete(report); var proc = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo { - FileName="tests\\Avalonia.LeakTests\\toolproject\\bin\\Release\\net461\\dotMemoryUnit.exe", + FileName="tests\\Avalonia.LeakTests\\toolproject\\bin\\dotMemoryUnit.exe", Arguments="-targetExecutable=\"tools\\xunit.runner.console\\tools\\xunit.console.x86.exe\" -returnTargetExitCode -- tests\\Avalonia.LeakTests\\bin\\Release\\Avalonia.LeakTests.dll -xml tests\\Avalonia.LeakTests\\bin\\Release\\report.xml ", UseShellExecute = false, }); diff --git a/tests/Avalonia.LeakTests/toolproject/tool.csproj b/tests/Avalonia.LeakTests/toolproject/tool.csproj index c9f584be72..54dbe6f17e 100644 --- a/tests/Avalonia.LeakTests/toolproject/tool.csproj +++ b/tests/Avalonia.LeakTests/toolproject/tool.csproj @@ -1,5 +1,7 @@  + $(MSBuildThisFileDirectory)\bin + $(OutputPath) net461 Library From 36310f1b6a0a777fa97521386799c5929d0cd6c4 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Fri, 21 Jul 2017 19:04:12 +0300 Subject: [PATCH 119/132] dotMemory tests are now run with cake --- appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 038028f839..cc0063dac5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,7 +27,6 @@ before_build: build_script: - ps: .\build.ps1 -Target "AppVeyor" -Platform "$env:platform" -Configuration "$env:configuration" after_build: -- tests\Avalonia.LeakTests\bin\Release\dotMemoryUnit.exe -targetExecutable="%xunit20%\xunit.console.x86.exe" -returnTargetExitCode --"tests\Avalonia.LeakTests\bin\Release\Avalonia.LeakTests.dll" - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%" - pip install codecov - codecov -f "./artifacts/coverage.xml" From cce1c7af60ca300dbfe928c4f2321448d9d5595b Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 00:16:40 +0300 Subject: [PATCH 120/132] Switched to nuget version of Portable.Xaml and updated to use netstandard1.3 --- .gitmodules | 6 +- Avalonia.sln | 203 ++++++++---------- samples/BindingTest/BindingTest.csproj | 2 +- .../ControlCatalog.Desktop.csproj | 2 +- samples/ControlCatalog/ControlCatalog.csproj | 2 +- samples/RenderTest/RenderTest.csproj | 2 +- .../VirtualizationTest.csproj | 2 +- .../GtkInteropDemo/GtkInteropDemo.csproj | 2 +- .../WindowsInteropTest.csproj | 2 +- .../Avalonia.DesignerSupport.csproj | 2 +- .../Avalonia.Diagnostics.csproj | 2 +- .../Avalonia.DotNetFrameworkRuntime.csproj | 2 +- .../Avalonia.Themes.Default.csproj | 2 +- src/Gtk/Avalonia.Cairo/Avalonia.Cairo.csproj | 2 +- src/Gtk/Avalonia.Gtk/Avalonia.Gtk.csproj | 2 +- .../Avalonia.Markup.Xaml.csproj | 4 +- .../Converters/AvaloniaListTypeConverter.cs | 1 + .../AvaloniaPropertyTypeConverter.cs | 2 +- .../Converters/BitmapTypeConverter.cs | 1 + .../Converters/BrushTypeConverter.cs | 1 + .../Converters/ClassesTypeConverter.cs | 1 + .../Converters/ColorTypeConverter.cs | 1 + .../ColumnDefinitionsTypeConverter.cs | 1 + .../Converters/CursorTypeConverter.cs | 1 + .../Converters/GeometryTypeConverter.cs | 1 + .../Converters/GridLengthTypeConverter.cs | 1 + .../Converters/IconTypeConverter.cs | 1 + .../Converters/KeyGestureConverter.cs | 1 + .../Converters/MemberSelectorTypeConverter.cs | 1 + .../Converters/PointTypeConverter.cs | 1 + .../Converters/PointsListTypeConverter.cs | 1 + .../Converters/RelativePointTypeConverter.cs | 1 + .../Converters/RelativeRectTypeConverter.cs | 1 + .../Converters/RowDefinitionsTypeConverter.cs | 1 + .../Converters/SelectorTypeConverter.cs | 1 + .../Converters/SetterValueTypeConverter.cs | 1 + .../Converters/SizeTypeConverter.cs | 1 + .../Converters/ThicknessTypeConverter.cs | 1 + .../Converters/TimeSpanTypeConverter.cs | 3 +- .../MarkupExtensions/StyleIncludeExtension.cs | 1 + .../AvaloniaDefaultTypeConverters.cs | 1 + .../AvaloniaMemberAttributeProvider.cs | 1 + .../AvaloniaTypeAttributeProvider.cs | 1 + .../PortableXaml/AvaloniaXamlObjectWriter.cs | 1 + .../PortableXaml/AvaloniaXamlSchemaContext.cs | 1 + .../PortableXaml/TypeDescriptorExtensions.cs | 1 + .../PortableXaml/XamlBinding.cs | 1 + .../Templates/TemplateLoader.cs | 1 + src/Markup/Portable.Xaml | 1 - .../Avalonia.Skia.Desktop.csproj | 2 +- .../Avalonia.Direct2D1.csproj | 2 +- .../Avalonia.Win32.Interop.csproj | 2 +- .../Avalonia.Win32/Avalonia.Win32.csproj | 2 +- .../Avalonia.Markup.Xaml.UnitTests.csproj | 1 - 54 files changed, 148 insertions(+), 136 deletions(-) delete mode 160000 src/Markup/Portable.Xaml diff --git a/.gitmodules b/.gitmodules index 5fd83ac60d..773b291467 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,8 +10,4 @@ url = https://github.com/AvaloniaUI/OmniXAML.git [submodule "src/Markup/Avalonia.Markup.Xaml/glass"] path = src/Markup/Avalonia.Markup.Xaml/glass - url = https://github.com/SuperJMN/glass -[submodule "src/Markup/Portable.Xaml"] - path = src/Markup/Portable.Xaml - url = https://github.com/cwensley/Portable.Xaml.git - branch = develop + url = https://github.com/SuperJMN/glass \ No newline at end of file diff --git a/Avalonia.sln b/Avalonia.sln index b9a6b31ce6..453af8c59b 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -1,12 +1,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +VisualStudioVersion = 15.0.26510.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Base", "src\Avalonia.Base\Avalonia.Base.csproj", "{B09B78D8-9B26-48B0-9149-D64A2F120F3F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Base", "src\Avalonia.Base\Avalonia.Base.csproj", "{B09B78D8-9B26-48B0-9149-D64A2F120F3F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Visuals", "src\Avalonia.Visuals\Avalonia.Visuals.csproj", "{EB582467-6ABB-43A1-B052-E981BA910E3A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Visuals", "src\Avalonia.Visuals\Avalonia.Visuals.csproj", "{EB582467-6ABB-43A1-B052-E981BA910E3A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Layout", "src\Avalonia.Layout\Avalonia.Layout.csproj", "{42472427-4774-4C81-8AFF-9F27B8E31721}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Layout", "src\Avalonia.Layout\Avalonia.Layout.csproj", "{42472427-4774-4C81-8AFF-9F27B8E31721}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Windows", "Windows", "{B39A8919-9F95-48FE-AD7B-76E08B509888}" EndProject @@ -16,47 +16,47 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Direct2D1", "src\W EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Designer", "src\Windows\Avalonia.Designer\Avalonia.Designer.csproj", "{EC42600F-049B-43FF-AED1-8314D61B2749}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Input", "src\Avalonia.Input\Avalonia.Input.csproj", "{62024B2D-53EB-4638-B26B-85EEAA54866E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Input", "src\Avalonia.Input\Avalonia.Input.csproj", "{62024B2D-53EB-4638-B26B-85EEAA54866E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Interactivity", "src\Avalonia.Interactivity\Avalonia.Interactivity.csproj", "{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Interactivity", "src\Avalonia.Interactivity\Avalonia.Interactivity.csproj", "{6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Controls", "src\Avalonia.Controls\Avalonia.Controls.csproj", "{D2221C82-4A25-4583-9B43-D791E3F6820C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Controls", "src\Avalonia.Controls\Avalonia.Controls.csproj", "{D2221C82-4A25-4583-9B43-D791E3F6820C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Styling", "src\Avalonia.Styling\Avalonia.Styling.csproj", "{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Styling", "src\Avalonia.Styling\Avalonia.Styling.csproj", "{F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Themes.Default", "src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj", "{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Themes.Default", "src\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj", "{3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Diagnostics", "src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj", "{7062AE20-5DCC-4442-9645-8195BDECE63E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Diagnostics", "src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj", "{7062AE20-5DCC-4442-9645-8195BDECE63E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Animation", "src\Avalonia.Animation\Avalonia.Animation.csproj", "{D211E587-D8BC-45B9-95A4-F297C8FA5200}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Animation", "src\Avalonia.Animation\Avalonia.Animation.csproj", "{D211E587-D8BC-45B9-95A4-F297C8FA5200}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Styling.UnitTests", "tests\Avalonia.Styling.UnitTests\Avalonia.Styling.UnitTests.csproj", "{47ECDF59-DEF8-4C53-87B1-2098A3429059}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Styling.UnitTests", "tests\Avalonia.Styling.UnitTests\Avalonia.Styling.UnitTests.csproj", "{47ECDF59-DEF8-4C53-87B1-2098A3429059}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Controls.UnitTests", "tests\Avalonia.Controls.UnitTests\Avalonia.Controls.UnitTests.csproj", "{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Controls.UnitTests", "tests\Avalonia.Controls.UnitTests\Avalonia.Controls.UnitTests.csproj", "{5CCB5571-7C30-4E7D-967D-0E2158EBD91F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Visuals.UnitTests", "tests\Avalonia.Visuals.UnitTests\Avalonia.Visuals.UnitTests.csproj", "{76716382-3159-460E-BDA6-C5715CF606D7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Visuals.UnitTests", "tests\Avalonia.Visuals.UnitTests\Avalonia.Visuals.UnitTests.csproj", "{76716382-3159-460E-BDA6-C5715CF606D7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Base.UnitTests", "tests\Avalonia.Base.UnitTests\Avalonia.Base.UnitTests.csproj", "{2905FF23-53FB-45E6-AA49-6AF47A172056}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Base.UnitTests", "tests\Avalonia.Base.UnitTests\Avalonia.Base.UnitTests.csproj", "{2905FF23-53FB-45E6-AA49-6AF47A172056}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Layout.UnitTests", "tests\Avalonia.Layout.UnitTests\Avalonia.Layout.UnitTests.csproj", "{DB070A10-BF39-4752-8456-86E9D5928478}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Layout.UnitTests", "tests\Avalonia.Layout.UnitTests\Avalonia.Layout.UnitTests.csproj", "{DB070A10-BF39-4752-8456-86E9D5928478}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Interactivity.UnitTests", "tests\Avalonia.Interactivity.UnitTests\Avalonia.Interactivity.UnitTests.csproj", "{08478EF5-44E8-42E9-92D6-15E00EC038D8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Interactivity.UnitTests", "tests\Avalonia.Interactivity.UnitTests\Avalonia.Interactivity.UnitTests.csproj", "{08478EF5-44E8-42E9-92D6-15E00EC038D8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Direct2D1.RenderTests", "tests\Avalonia.RenderTests\Avalonia.Direct2D1.RenderTests.csproj", "{DABFD304-D6A4-4752-8123-C2CCF7AC7831}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Input.UnitTests", "tests\Avalonia.Input.UnitTests\Avalonia.Input.UnitTests.csproj", "{AC18926A-E784-40FE-B09D-BB0FE2B599F0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Input.UnitTests", "tests\Avalonia.Input.UnitTests\Avalonia.Input.UnitTests.csproj", "{AC18926A-E784-40FE-B09D-BB0FE2B599F0}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Direct2D1.UnitTests", "tests\Avalonia.Direct2D1.UnitTests\Avalonia.Direct2D1.UnitTests.csproj", "{EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Cairo.RenderTests", "tests\Avalonia.RenderTests\Avalonia.Cairo.RenderTests.csproj", "{E106CF37-4066-4615-B684-172A6D30B058}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Markup.Xaml.UnitTests", "tests\Avalonia.Markup.Xaml.UnitTests\Avalonia.Markup.Xaml.UnitTests.csproj", "{99135EAB-653D-47E4-A378-C96E1278CA44}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Markup.Xaml.UnitTests", "tests\Avalonia.Markup.Xaml.UnitTests\Avalonia.Markup.Xaml.UnitTests.csproj", "{99135EAB-653D-47E4-A378-C96E1278CA44}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Markup", "Markup", "{8B6A8209-894F-4BA1-B880-965FD453982C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Markup.Xaml", "src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj", "{3E53A01A-B331-47F3-B828-4A5717E77A24}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Markup.Xaml", "src\Markup\Avalonia.Markup.Xaml\Avalonia.Markup.Xaml.csproj", "{3E53A01A-B331-47F3-B828-4A5717E77A24}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{9B9E3891-2366-4253-A952-D08BCEB71098}" EndProject @@ -71,15 +71,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Gtk", "src\Gtk\Ava EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Cairo", "src\Gtk\Avalonia.Cairo\Avalonia.Cairo.csproj", "{FB05AC90-89BA-4F2F-A924-F37875FB547C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.ReactiveUI", "src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj", "{6417B24E-49C2-4985-8DB2-3AB9D898EC91}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.ReactiveUI", "src\Avalonia.ReactiveUI\Avalonia.ReactiveUI.csproj", "{6417B24E-49C2-4985-8DB2-3AB9D898EC91}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.HtmlRenderer", "src\Avalonia.HtmlRenderer\Avalonia.HtmlRenderer.csproj", "{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.HtmlRenderer", "src\Avalonia.HtmlRenderer\Avalonia.HtmlRenderer.csproj", "{5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}" EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "PlatformSupport", "src\Shared\PlatformSupport\PlatformSupport.shproj", "{E4D9629C-F168-4224-3F51-A5E482FFBC42}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Markup", "src\Markup\Avalonia.Markup\Avalonia.Markup.csproj", "{6417E941-21BC-467B-A771-0DE389353CE6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Markup", "src\Markup\Avalonia.Markup\Avalonia.Markup.csproj", "{6417E941-21BC-467B-A771-0DE389353CE6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Markup.UnitTests", "tests\Avalonia.Markup.UnitTests\Avalonia.Markup.UnitTests.csproj", "{8EF392D5-1416-45AA-9956-7CBBC3229E8A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Markup.UnitTests", "tests\Avalonia.Markup.UnitTests\Avalonia.Markup.UnitTests.csproj", "{8EF392D5-1416-45AA-9956-7CBBC3229E8A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BindingTest", "samples\BindingTest\BindingTest.csproj", "{08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}" EndProject @@ -109,15 +109,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.iOSTestApplication EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.LeakTests", "tests\Avalonia.LeakTests\Avalonia.LeakTests.csproj", "{E1AA3DBF-9056-4530-9376-18119A7A3FFE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.UnitTests", "tests\Avalonia.UnitTests\Avalonia.UnitTests.csproj", "{88060192-33D5-4932-B0F9-8BD2763E857D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.UnitTests", "tests\Avalonia.UnitTests\Avalonia.UnitTests.csproj", "{88060192-33D5-4932-B0F9-8BD2763E857D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Benchmarks", "tests\Avalonia.Benchmarks\Avalonia.Benchmarks.csproj", "{410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Logging.Serilog", "src\Avalonia.Logging.Serilog\Avalonia.Logging.Serilog.csproj", "{B61B66A3-B82D-4875-8001-89D3394FE0C9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Logging.Serilog", "src\Avalonia.Logging.Serilog\Avalonia.Logging.Serilog.csproj", "{B61B66A3-B82D-4875-8001-89D3394FE0C9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.DesignerSupport", "src\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj", "{799A7BB5-3C2C-48B6-85A7-406A12C420DA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.DesignerSupport", "src\Avalonia.DesignerSupport\Avalonia.DesignerSupport.csproj", "{799A7BB5-3C2C-48B6-85A7-406A12C420DA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog", "samples\ControlCatalog\ControlCatalog.csproj", "{D0A739B9-3C68-4BA6-A328-41606954B6BD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog", "samples\ControlCatalog\ControlCatalog.csproj", "{D0A739B9-3C68-4BA6-A328-41606954B6BD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.Desktop", "samples\ControlCatalog.Desktop\ControlCatalog.Desktop.csproj", "{2B888490-D14A-4BCA-AB4B-48676FA93C9B}" EndProject @@ -147,17 +147,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.Android", "s EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Avalonia.Win32.Shared", "src\Windows\Avalonia.Win32\Avalonia.Win32.Shared.shproj", "{9DEFC6B7-845B-4D8F-AFC0-D32BF0032B8C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Win32.NetStandard", "src\Windows\Avalonia.Win32.NetStandard\Avalonia.Win32.NetStandard.csproj", "{40759A76-D0F2-464E-8000-6FF0F5C4BD7C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Win32.NetStandard", "src\Windows\Avalonia.Win32.NetStandard\Avalonia.Win32.NetStandard.csproj", "{40759A76-D0F2-464E-8000-6FF0F5C4BD7C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.DotNetCoreRuntime", "src\Avalonia.DotNetCoreRuntime\Avalonia.DotNetCoreRuntime.csproj", "{7863EA94-F0FB-4386-BF8C-E5BFA761560A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.DotNetCoreRuntime", "src\Avalonia.DotNetCoreRuntime\Avalonia.DotNetCoreRuntime.csproj", "{7863EA94-F0FB-4386-BF8C-E5BFA761560A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Skia.Desktop.NetStandard", "src\Skia\Avalonia.Skia.Desktop.NetStandard\Avalonia.Skia.Desktop.NetStandard.csproj", "{7D2D3083-71DD-4CC9-8907-39A0D86FB322}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Skia.Desktop.NetStandard", "src\Skia\Avalonia.Skia.Desktop.NetStandard\Avalonia.Skia.Desktop.NetStandard.csproj", "{7D2D3083-71DD-4CC9-8907-39A0D86FB322}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Gtk3", "src\Gtk\Avalonia.Gtk3\Avalonia.Gtk3.csproj", "{BB1F7BB5-6AD4-4776-94D9-C09D0A972658}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Gtk3", "src\Gtk\Avalonia.Gtk3\Avalonia.Gtk3.csproj", "{BB1F7BB5-6AD4-4776-94D9-C09D0A972658}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Portable.Xaml-pcl259", "src\Markup\Portable.Xaml\src\Portable.Xaml\Portable.Xaml-pcl259.csproj", "{179484EC-DB00-451A-AD2D-2E2AB20DE519}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ControlCatalog.NetCore", "samples\ControlCatalog.NetCore\ControlCatalog.NetCore.csproj", "{39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog.NetCore", "samples\ControlCatalog.NetCore\ControlCatalog.NetCore.csproj", "{39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{74487168-7D91-487E-BF93-055F2251461E}" EndProject @@ -189,9 +187,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{4D6F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Linux", "Linux", "{86C53C40-57AA-45B8-AD42-FAE0EFDF0F2B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.LinuxFramebuffer", "src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj", "{854568D5-13D1-4B4F-B50D-534DC7EFD3C9}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.LinuxFramebuffer", "src\Linux\Avalonia.LinuxFramebuffer\Avalonia.LinuxFramebuffer.csproj", "{854568D5-13D1-4B4F-B50D-534DC7EFD3C9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Direct3DInteropSample", "samples\interop\Direct3DInteropSample\Direct3DInteropSample.csproj", "{638580B0-7910-40EF-B674-DCB34DA308CD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Direct3DInteropSample", "samples\interop\Direct3DInteropSample\Direct3DInteropSample.csproj", "{638580B0-7910-40EF-B674-DCB34DA308CD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Win32.Interop", "src\Windows\Avalonia.Win32.Interop\Avalonia.Win32.Interop.csproj", "{CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}" EndProject @@ -1368,16 +1366,16 @@ Global {99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|Mono.Build.0 = Debug|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|x86.ActiveCfg = Debug|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|x86.Build.0 = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Any CPU.ActiveCfg = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Any CPU.Build.0 = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhone.ActiveCfg = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhone.Build.0 = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhoneSimulator.Build.0 = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Mono.ActiveCfg = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Mono.Build.0 = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|x86.ActiveCfg = DebugOmniXaml|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|x86.Build.0 = DebugOmniXaml|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU + {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.ActiveCfg = Release|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.Build.0 = Release|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1416,16 +1414,16 @@ Global {3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|Mono.Build.0 = Debug|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|x86.ActiveCfg = Debug|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|x86.Build.0 = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Any CPU.ActiveCfg = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Any CPU.Build.0 = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhone.ActiveCfg = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhone.Build.0 = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhoneSimulator.Build.0 = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Mono.ActiveCfg = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Mono.Build.0 = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|x86.ActiveCfg = DebugOmniXaml|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|x86.Build.0 = DebugOmniXaml|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU + {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.Build.0 = Release|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3023,56 +3021,6 @@ Global {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Release|Mono.Build.0 = Release|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Release|x86.ActiveCfg = Release|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Release|x86.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|Mono.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|Mono.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|Any CPU.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|iPhone.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|Mono.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|Mono.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|x86.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.AppStore|x86.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|Any CPU.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|iPhone.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|Mono.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|Mono.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|x86.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Debug|x86.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|Any CPU.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|Any CPU.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|iPhone.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|iPhone.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|Mono.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|Mono.Build.0 = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|x86.ActiveCfg = Release|Any CPU - {179484EC-DB00-451A-AD2D-2E2AB20DE519}.Release|x86.Build.0 = Release|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU @@ -3103,6 +3051,16 @@ Global {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Debug|Mono.Build.0 = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Debug|x86.ActiveCfg = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Debug|x86.Build.0 = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU + {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Release|Any CPU.ActiveCfg = Release|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Release|Any CPU.Build.0 = Release|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3143,6 +3101,16 @@ Global {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Debug|Mono.Build.0 = Debug|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Debug|x86.ActiveCfg = Debug|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Debug|x86.Build.0 = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU + {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Release|Any CPU.Build.0 = Release|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3183,6 +3151,16 @@ Global {638580B0-7910-40EF-B674-DCB34DA308CD}.Debug|Mono.Build.0 = Debug|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Debug|x86.ActiveCfg = Debug|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Debug|x86.Build.0 = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU + {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|Any CPU.Build.0 = Release|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3223,6 +3201,16 @@ Global {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|Mono.Build.0 = Debug|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|x86.ActiveCfg = Debug|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|x86.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU + {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Any CPU.ActiveCfg = Release|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Any CPU.Build.0 = Release|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3288,7 +3276,6 @@ Global {40759A76-D0F2-464E-8000-6FF0F5C4BD7C} = {B39A8919-9F95-48FE-AD7B-76E08B509888} {7D2D3083-71DD-4CC9-8907-39A0D86FB322} = {3743B0F2-CC41-4F14-A8C8-267F579BF91E} {BB1F7BB5-6AD4-4776-94D9-C09D0A972658} = {B9894058-278A-46B5-B6ED-AD613FCC03B3} - {179484EC-DB00-451A-AD2D-2E2AB20DE519} = {8B6A8209-894F-4BA1-B880-965FD453982C} {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3} = {9B9E3891-2366-4253-A952-D08BCEB71098} {F3AC8BC1-27F5-4255-9AFC-04ABFD11683A} = {74487168-7D91-487E-BF93-055F2251461E} {4D6FAF79-58B4-482F-9122-0668C346364C} = {74487168-7D91-487E-BF93-055F2251461E} diff --git a/samples/BindingTest/BindingTest.csproj b/samples/BindingTest/BindingTest.csproj index 74259a2a4b..013c286387 100644 --- a/samples/BindingTest/BindingTest.csproj +++ b/samples/BindingTest/BindingTest.csproj @@ -9,7 +9,7 @@ Properties BindingTest BindingTest - v4.5 + v4.6.1 512 true diff --git a/samples/ControlCatalog.Desktop/ControlCatalog.Desktop.csproj b/samples/ControlCatalog.Desktop/ControlCatalog.Desktop.csproj index 59c8c53137..a3940a3a7d 100644 --- a/samples/ControlCatalog.Desktop/ControlCatalog.Desktop.csproj +++ b/samples/ControlCatalog.Desktop/ControlCatalog.Desktop.csproj @@ -9,7 +9,7 @@ Properties ControlCatalog.Desktop ControlCatalog.Desktop - v4.5 + v4.6.1 512 true diff --git a/samples/ControlCatalog/ControlCatalog.csproj b/samples/ControlCatalog/ControlCatalog.csproj index 2a9f8f70de..3f978fa7f4 100644 --- a/samples/ControlCatalog/ControlCatalog.csproj +++ b/samples/ControlCatalog/ControlCatalog.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 False false diff --git a/samples/RenderTest/RenderTest.csproj b/samples/RenderTest/RenderTest.csproj index ed6194e0e1..95f1479b6b 100644 --- a/samples/RenderTest/RenderTest.csproj +++ b/samples/RenderTest/RenderTest.csproj @@ -9,7 +9,7 @@ Properties RenderTest RenderTest - v4.5 + v4.6.1 512 true diff --git a/samples/VirtualizationTest/VirtualizationTest.csproj b/samples/VirtualizationTest/VirtualizationTest.csproj index 89115016bf..327e659966 100644 --- a/samples/VirtualizationTest/VirtualizationTest.csproj +++ b/samples/VirtualizationTest/VirtualizationTest.csproj @@ -9,7 +9,7 @@ Properties VirtualizationTest VirtualizationTest - v4.5 + v4.6.1 512 true diff --git a/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj b/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj index 8cbaf7a627..56fa426f3c 100644 --- a/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj +++ b/samples/interop/GtkInteropDemo/GtkInteropDemo.csproj @@ -9,7 +9,7 @@ Properties GtkInteropDemo GtkInteropDemo - v4.6 + v4.6.1 512 true diff --git a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj index 84bd709f8c..2fa3ba30b9 100644 --- a/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj +++ b/samples/interop/WindowsInteropTest/WindowsInteropTest.csproj @@ -9,7 +9,7 @@ Properties WindowsInteropTest WindowsInteropTest - v4.6 + v4.6.1 512 true diff --git a/src/Avalonia.DesignerSupport/Avalonia.DesignerSupport.csproj b/src/Avalonia.DesignerSupport/Avalonia.DesignerSupport.csproj index be0b98b24c..a68e8760f2 100644 --- a/src/Avalonia.DesignerSupport/Avalonia.DesignerSupport.csproj +++ b/src/Avalonia.DesignerSupport/Avalonia.DesignerSupport.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj b/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj index e4752f6662..be3f397283 100644 --- a/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj +++ b/src/Avalonia.Diagnostics/Avalonia.Diagnostics.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.DotNetFrameworkRuntime/Avalonia.DotNetFrameworkRuntime.csproj b/src/Avalonia.DotNetFrameworkRuntime/Avalonia.DotNetFrameworkRuntime.csproj index 932afbe0e6..2fbcba40c8 100644 --- a/src/Avalonia.DotNetFrameworkRuntime/Avalonia.DotNetFrameworkRuntime.csproj +++ b/src/Avalonia.DotNetFrameworkRuntime/Avalonia.DotNetFrameworkRuntime.csproj @@ -9,7 +9,7 @@ Properties Avalonia.DotNetFrameworkRuntime Avalonia.DotNetFrameworkRuntime - v4.5 + v4.6.1 512 diff --git a/src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj b/src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj index be1d798e2d..4e980680d9 100644 --- a/src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj +++ b/src/Avalonia.Themes.Default/Avalonia.Themes.Default.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Gtk/Avalonia.Cairo/Avalonia.Cairo.csproj b/src/Gtk/Avalonia.Cairo/Avalonia.Cairo.csproj index 9a59f9e054..d09fd2ddc6 100644 --- a/src/Gtk/Avalonia.Cairo/Avalonia.Cairo.csproj +++ b/src/Gtk/Avalonia.Cairo/Avalonia.Cairo.csproj @@ -9,7 +9,7 @@ Properties Avalonia.Cairo Avalonia.Cairo - v4.5 + v4.6.1 512 diff --git a/src/Gtk/Avalonia.Gtk/Avalonia.Gtk.csproj b/src/Gtk/Avalonia.Gtk/Avalonia.Gtk.csproj index 8aa57293f3..b51377f29c 100644 --- a/src/Gtk/Avalonia.Gtk/Avalonia.Gtk.csproj +++ b/src/Gtk/Avalonia.Gtk/Avalonia.Gtk.csproj @@ -7,7 +7,7 @@ Library Avalonia.Gtk Avalonia.Gtk - v4.5 + v4.6.1 diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index ca2afd4f68..2637cbc068 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 False false false @@ -304,7 +304,7 @@ - + diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaListTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaListTypeConverter.cs index d1811636d6..4e737621d9 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaListTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaListTypeConverter.cs @@ -11,6 +11,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class AvaloniaListTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaPropertyTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaPropertyTypeConverter.cs index c5d0c9d1da..5b564c8463 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaPropertyTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/AvaloniaPropertyTypeConverter.cs @@ -10,8 +10,8 @@ namespace Avalonia.Markup.Xaml.Converters using Avalonia.Styling; using Portable.Xaml; #if !OMNIXAML - using Portable.Xaml.ComponentModel; + using System.ComponentModel; using Portable.Xaml.Markup; public class AvaloniaPropertyTypeConverter : TypeConverter diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/BitmapTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/BitmapTypeConverter.cs index 4107454798..8b5922c992 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/BitmapTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/BitmapTypeConverter.cs @@ -11,6 +11,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class BitmapTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/BrushTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/BrushTypeConverter.cs index 0c256cf645..0161e31dd6 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/BrushTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/BrushTypeConverter.cs @@ -11,6 +11,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class BrushTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/ClassesTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/ClassesTypeConverter.cs index 93e08dcb11..d4579b6a4f 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/ClassesTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/ClassesTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class ClassesTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/ColorTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/ColorTypeConverter.cs index f64fcac6d1..fe1aa78cf1 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/ColorTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/ColorTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class ColorTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/ColumnDefinitionsTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/ColumnDefinitionsTypeConverter.cs index 7b6c72425d..30af44a598 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/ColumnDefinitionsTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/ColumnDefinitionsTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class ColumnDefinitionsTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/CursorTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/CursorTypeConverter.cs index 127ad5a6e9..ef9b21a026 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/CursorTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/CursorTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class CursorTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/GeometryTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/GeometryTypeConverter.cs index e1587480b8..bae60b7b3e 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/GeometryTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/GeometryTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class GeometryTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/GridLengthTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/GridLengthTypeConverter.cs index ead49fe883..d6474f6694 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/GridLengthTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/GridLengthTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class GridLengthTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/IconTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/IconTypeConverter.cs index a1ba71b131..f6469f7137 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/IconTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/IconTypeConverter.cs @@ -12,6 +12,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class IconTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/KeyGestureConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/KeyGestureConverter.cs index 1b19498f7d..c09ade509a 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/KeyGestureConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/KeyGestureConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class KeyGestureConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/MemberSelectorTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/MemberSelectorTypeConverter.cs index 05675ae9eb..657aad4211 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/MemberSelectorTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/MemberSelectorTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class MemberSelectorTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/PointTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/PointTypeConverter.cs index a8f64fc531..52057e8519 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/PointTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/PointTypeConverter.cs @@ -9,6 +9,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class PointTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/PointsListTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/PointsListTypeConverter.cs index dd28717ac7..205fef23e2 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/PointsListTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/PointsListTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class PointsListTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/RelativePointTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/RelativePointTypeConverter.cs index 6f75e8a067..81fd2b4d08 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/RelativePointTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/RelativePointTypeConverter.cs @@ -9,6 +9,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class RelativePointTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/RelativeRectTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/RelativeRectTypeConverter.cs index 69aec39727..7f27d7f735 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/RelativeRectTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/RelativeRectTypeConverter.cs @@ -9,6 +9,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class RelativeRectTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/RowDefinitionsTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/RowDefinitionsTypeConverter.cs index 12145db7e7..a1c8cc2b6c 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/RowDefinitionsTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/RowDefinitionsTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class RowDefinitionsTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/SelectorTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/SelectorTypeConverter.cs index 391663ed43..37b54f6ba1 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/SelectorTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/SelectorTypeConverter.cs @@ -10,6 +10,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class SelectorTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/SetterValueTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/SetterValueTypeConverter.cs index 4378eee994..931d4e2ffc 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/SetterValueTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/SetterValueTypeConverter.cs @@ -4,6 +4,7 @@ using Avalonia.Styling; using Portable.Xaml; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using Portable.Xaml.Markup; using System; using System.Globalization; diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/SizeTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/SizeTypeConverter.cs index 814dd932d0..597288149a 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/SizeTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/SizeTypeConverter.cs @@ -9,6 +9,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class SizeTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/ThicknessTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/ThicknessTypeConverter.cs index 754d63e5cf..47ec3c04bb 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/ThicknessTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/ThicknessTypeConverter.cs @@ -9,6 +9,7 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; public class ThicknessTypeConverter : TypeConverter { diff --git a/src/Markup/Avalonia.Markup.Xaml/Converters/TimeSpanTypeConverter.cs b/src/Markup/Avalonia.Markup.Xaml/Converters/TimeSpanTypeConverter.cs index 06f725cd26..5b69023f58 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Converters/TimeSpanTypeConverter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Converters/TimeSpanTypeConverter.cs @@ -9,8 +9,9 @@ namespace Avalonia.Markup.Xaml.Converters #if !OMNIXAML using Portable.Xaml.ComponentModel; + using System.ComponentModel; - public class TimeSpanTypeConverter : Portable.Xaml.ComponentModel.TimeSpanConverter + public class TimeSpanTypeConverter : System.ComponentModel.TimeSpanConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { diff --git a/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StyleIncludeExtension.cs b/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StyleIncludeExtension.cs index 50b2bcebbb..1a773293e3 100644 --- a/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StyleIncludeExtension.cs +++ b/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StyleIncludeExtension.cs @@ -5,6 +5,7 @@ using Avalonia.Markup.Xaml.Styling; using Avalonia.Styling; using Portable.Xaml; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using Portable.Xaml.Markup; using System; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaDefaultTypeConverters.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaDefaultTypeConverters.cs index cb43396a32..66e9a697e4 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaDefaultTypeConverters.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaDefaultTypeConverters.cs @@ -7,6 +7,7 @@ using Avalonia.Media; using Avalonia.Media.Imaging; using Avalonia.Styling; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using Avalonia.Controls; using Avalonia.Input; using Avalonia.Collections; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs index 2026d42ce1..e9f6ba6945 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaMemberAttributeProvider.cs @@ -1,6 +1,7 @@ using Avalonia.Markup.Xaml.Converters; using Avalonia.Styling; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using System; using System.Linq; using System.Reflection; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs index deb8fb239d..6e23459cdf 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaTypeAttributeProvider.cs @@ -2,6 +2,7 @@ // Licensed under the MIT license. See licence.md file in the project root for full license information. using Portable.Xaml.ComponentModel; +using System.ComponentModel; using System; using System.Linq; using System.Reflection; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs index ea442cc0ba..40bff5ed0b 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs @@ -1,6 +1,7 @@ using Avalonia.Data; using Portable.Xaml; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using System.Collections.Generic; using System.Linq; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs index 6c0fb79558..ee20be0efa 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs @@ -5,6 +5,7 @@ using Avalonia.Markup.Xaml.MarkupExtensions; using Avalonia.Markup.Xaml.Styling; using Portable.Xaml; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs index ebe1264856..de1b3fb977 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.ComponentModel; namespace Portable.Xaml.ComponentModel { diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/XamlBinding.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/XamlBinding.cs index ba15dfc2b2..1f4e66471c 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/XamlBinding.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/XamlBinding.cs @@ -3,6 +3,7 @@ using Avalonia.Data; using Avalonia.Styling; using Portable.Xaml; using Portable.Xaml.ComponentModel; +using System.ComponentModel; using Portable.Xaml.Markup; using System; diff --git a/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs b/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs index 5cf105f493..2333550a69 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Templates/TemplateLoader.cs @@ -7,6 +7,7 @@ namespace Avalonia.Markup.Xaml.Templates using Portable.Xaml; using Portable.Xaml.ComponentModel; + using System.ComponentModel; using System; public class TemplateLoader : XamlDeferringLoader diff --git a/src/Markup/Portable.Xaml b/src/Markup/Portable.Xaml deleted file mode 160000 index ae819edcd3..0000000000 --- a/src/Markup/Portable.Xaml +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ae819edcd3b8930cca367888c19dd1ab19c263e9 diff --git a/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj b/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj index f0964680a1..d154b7984f 100644 --- a/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj +++ b/src/Skia/Avalonia.Skia.Desktop/Avalonia.Skia.Desktop.csproj @@ -9,7 +9,7 @@ Properties Avalonia.Skia.Desktop Avalonia.Skia.Desktop - v4.5 + v4.6.1 512 false diff --git a/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj b/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj index 38fd7254dc..8884e83891 100644 --- a/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj +++ b/src/Windows/Avalonia.Direct2D1/Avalonia.Direct2D1.csproj @@ -9,7 +9,7 @@ Properties Avalonia.Direct2D1 Avalonia.Direct2D1 - v4.5 + v4.6.1 512 diff --git a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj index 5f1a065028..817b753157 100644 --- a/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj +++ b/src/Windows/Avalonia.Win32.Interop/Avalonia.Win32.Interop.csproj @@ -9,7 +9,7 @@ Properties Avalonia.Win32.Interop Avalonia.Win32.Interop - v4.5.2 + v4.6.1 512 diff --git a/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj b/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj index ea742f8911..b2b42877b7 100644 --- a/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj +++ b/src/Windows/Avalonia.Win32/Avalonia.Win32.csproj @@ -9,7 +9,7 @@ Properties Avalonia.Win32 Avalonia.Win32 - v4.5 + v4.6.1 512 diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj b/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj index 961b72f040..8bb6d49683 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj @@ -31,7 +31,6 @@ - From 18b8219a39ac2bc355ffa3a63a0f90148569249c Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 01:12:36 +0300 Subject: [PATCH 121/132] Portable.Xaml nuget package uses pcl binary for net45 for some reason, switched back to submodule --- .gitmodules | 5 ++++- .../Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj | 9 ++++++--- .../PortableXaml/AvaloniaXamlObjectWriter.cs | 10 +++++----- .../PortableXaml/AvaloniaXamlSchemaContext.cs | 10 +++++----- .../PortableXaml/portable.xaml.github | 1 + 5 files changed, 21 insertions(+), 14 deletions(-) create mode 160000 src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github diff --git a/.gitmodules b/.gitmodules index 773b291467..8d13c6572c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,4 +10,7 @@ url = https://github.com/AvaloniaUI/OmniXAML.git [submodule "src/Markup/Avalonia.Markup.Xaml/glass"] path = src/Markup/Avalonia.Markup.Xaml/glass - url = https://github.com/SuperJMN/glass \ No newline at end of file + url = https://github.com/SuperJMN/glass +[submodule "src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github"] + path = src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github + url = https://github.com/cwensley/Portable.Xaml.git diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index 2637cbc068..46dbe1566c 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -10,7 +10,7 @@ full false bin\Debug\ - TRACE;DEBUG + TRACE;DEBUG;NETSTANDARD1_3;PCL;NETSTANDARD prompt 4 CS1591 @@ -19,7 +19,7 @@ pdbonly true bin\Release\ - TRACE + NETSTANDARD1_3;PCL;NETSTANDARD prompt 4 bin\Release\Avalonia.Markup.Xaml.XML @@ -293,6 +293,7 @@ + @@ -304,7 +305,9 @@ - + + + diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs index 40bff5ed0b..f10de1a32f 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlObjectWriter.cs @@ -54,7 +54,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml base.Dispose(disposing); } - protected override void OnAfterBeginInit(object value) + protected internal override void OnAfterBeginInit(object value) { //not called for avalonia objects //as it's called inly for @@ -62,7 +62,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml base.OnAfterBeginInit(value); } - protected override void OnAfterEndInit(object value) + protected internal override void OnAfterEndInit(object value) { //not called for avalonia objects //as it's called inly for @@ -70,7 +70,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml base.OnAfterEndInit(value); } - protected override void OnAfterProperties(object value) + protected internal override void OnAfterProperties(object value) { _delayedValuesHelper.EndInit(value); @@ -82,7 +82,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml HandleEndEdit(value); } - protected override void OnBeforeProperties(object value) + protected internal override void OnBeforeProperties(object value) { //OnAfterBeginInit is not called as it supports only //Portable.Xaml.ComponentModel.ISupportInitialize @@ -94,7 +94,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml base.OnBeforeProperties(value); } - protected override bool OnSetValue(object target, XamlMember member, object value) + protected internal override bool OnSetValue(object target, XamlMember member, object value) { if (_delayedValuesHelper.TryAdd(target, member, value)) { diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs index ee20be0efa..bdb21abd77 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaXamlSchemaContext.cs @@ -32,7 +32,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml private IRuntimeTypeProvider _avaloniaTypeProvider; - protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) + protected internal override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) { XamlType type = null; try @@ -142,10 +142,10 @@ namespace Avalonia.Markup.Xaml.PortableXaml #endregion Workaround for bug in Portablexaml system types like double,int etc ... - protected override ICustomAttributeProvider GetCustomAttributeProvider(Type type) + protected internal override ICustomAttributeProvider GetCustomAttributeProvider(Type type) => new AvaloniaTypeAttributeProvider(type); - protected override ICustomAttributeProvider GetCustomAttributeProvider(MemberInfo member) + protected internal override ICustomAttributeProvider GetCustomAttributeProvider(MemberInfo member) => new AvaloniaMemberAttributeProvider(member); public override XamlType GetXamlType(Type type) @@ -187,7 +187,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml return null; } - protected override XamlMember GetAttachableProperty(string attachablePropertyName, MethodInfo getter, MethodInfo setter) + protected internal override XamlMember GetAttachableProperty(string attachablePropertyName, MethodInfo getter, MethodInfo setter) { var key = MemberKey.Create(getter ?? setter, attachablePropertyName, "a"); @@ -218,7 +218,7 @@ namespace Avalonia.Markup.Xaml.PortableXaml return _cachedMembers[key] = result; } - protected override XamlMember GetProperty(PropertyInfo pi) + protected internal override XamlMember GetProperty(PropertyInfo pi) { Type objType = pi.DeclaringType; string name = pi.Name; diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github new file mode 160000 index 0000000000..d50730ab59 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github @@ -0,0 +1 @@ +Subproject commit d50730ab59aed99cd2f8aeb4975fcc19d23bb54f From ffc8e9f7a96ce65bf3e563d51410da3cda1ca16d Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 01:13:57 +0300 Subject: [PATCH 122/132] Fixed NRE in GetBaseUri/GetLocalAssembly --- .../PortableXaml/TypeDescriptorExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs index de1b3fb977..81525fef7d 100644 --- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs +++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs @@ -62,12 +62,12 @@ namespace Portable.Xaml.ComponentModel public static Uri GetBaseUri(this ITypeDescriptorContext ctx) { - return ctx.GetWriterSettings()?.Context.BaseUri; + return ctx.GetWriterSettings()?.Context?.BaseUri; } public static Assembly GetLocalAssembly(this ITypeDescriptorContext ctx) { - return ctx.GetWriterSettings()?.Context.LocalAssembly; + return ctx.GetWriterSettings()?.Context?.LocalAssembly; } public static AvaloniaXamlContext GetAvaloniaXamlContext(this ITypeDescriptorContext ctx) From 04608a8975d0b428ea70b3145e1e5daf2da162d8 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 02:34:26 +0300 Subject: [PATCH 123/132] Enforce binding redirect generation --- build/XUnit.props | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build/XUnit.props b/build/XUnit.props index 27e0afc987..d59cee6536 100644 --- a/build/XUnit.props +++ b/build/XUnit.props @@ -12,4 +12,16 @@ + + true + + + + + true + + From 880e850000b2770329c7008f5a088a834fa5eeda Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 02:38:10 +0300 Subject: [PATCH 124/132] Fixed build --- .../Avalonia.Markup.Xaml.csproj | 524 +++++++++--------- .../Context/AvaloniaTypeFeatureProvider.cs | 3 +- .../OmniXamlCompileStubs.cs | 73 +++ .../AvaloniaPropertyConverterTest.cs | 2 +- 4 files changed, 340 insertions(+), 262 deletions(-) create mode 100644 src/Markup/Avalonia.Markup.Xaml/OmniXamlCompileStubs.cs diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index 46dbe1566c..4f02a91c0b 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -35,266 +35,269 @@ prompt MinimumRecommendedRules.ruleset - - - Properties\SharedAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Properties\SharedAssemblyInfo.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -306,6 +309,7 @@ + diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs index d03fd2e72c..66b44d70a0 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs +++ b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs @@ -15,12 +15,13 @@ using Avalonia.Media.Imaging; using Avalonia.Metadata; using Avalonia.Styling; using OmniXaml; +#if OMNIXAML using OmniXaml.Builder; using OmniXaml.TypeConversion; using OmniXaml.TypeConversion.BuiltInConverters; using OmniXaml.Typing; using OmniMetadata = OmniXaml.Typing.Metadata; - +#endif namespace Avalonia.Markup.Xaml.Context { #if OMNIXAML diff --git a/src/Markup/Avalonia.Markup.Xaml/OmniXamlCompileStubs.cs b/src/Markup/Avalonia.Markup.Xaml/OmniXamlCompileStubs.cs new file mode 100644 index 0000000000..d8b5f566c7 --- /dev/null +++ b/src/Markup/Avalonia.Markup.Xaml/OmniXamlCompileStubs.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Text; +#if !OMNIXAML +namespace OmniXaml +{ + interface ITypeProvider + { + } + + class TypeNotFoundException : Exception + { + public TypeNotFoundException(string m) : base(m) + { + + } + } +} +namespace OmniXaml.Typing +{ + class Stub + { + } +} +namespace OmniXaml.TypeConversion +{ + class Stub + { + } +} +namespace OmniXaml.Builder +{ + class Stub + { + } +} +namespace OmniXaml.ObjectAssembler.Commands +{ + class Stub + { + } +} +namespace OmniXaml.Parsers.ProtoParser +{ + class Stub + { + } +} +namespace OmniXaml.Parsers.Parser +{ + class Stub + { + } +} +namespace OmniXaml.Attributes +{ + class Stub + { + } +} +namespace Glass +{ + class Stub + { + } +} +namespace Glass.Core +{ + class Stub + { + } +} +#endif \ No newline at end of file diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Converters/AvaloniaPropertyConverterTest.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Converters/AvaloniaPropertyConverterTest.cs index b987d6e3e7..665b557b34 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Converters/AvaloniaPropertyConverterTest.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Converters/AvaloniaPropertyConverterTest.cs @@ -9,7 +9,7 @@ using Avalonia.Styling; using Xunit; #if !OMNIXAML - +using System.ComponentModel; using Portable.Xaml.ComponentModel; using Portable.Xaml; using Portable.Xaml.Markup; From b24d46e98ffca3a20e65fe4d5b3a8c5d6f769fcf Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 02:49:29 +0300 Subject: [PATCH 125/132] Only check for configuration --- src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index 4f02a91c0b..448bedbb38 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -5,7 +5,7 @@ false false - + true full false @@ -15,7 +15,7 @@ 4 CS1591 - + pdbonly true bin\Release\ @@ -25,7 +25,7 @@ bin\Release\Avalonia.Markup.Xaml.XML CS1591 - + true bin\DebugOmniXaml\ TRACE;DEBUG;OMNIXAML From 6b9185057928c8efdc0f694a8804398e19e6c1cf Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 03:08:51 +0300 Subject: [PATCH 126/132] Switched to netstandard1.3 --- packages.cake | 14 +++++++------- src/Avalonia.Animation/Avalonia.Animation.csproj | 2 +- src/Avalonia.Base/Avalonia.Base.csproj | 2 +- src/Avalonia.Controls/Avalonia.Controls.csproj | 2 +- .../Avalonia.HtmlRenderer.csproj | 2 +- src/Avalonia.Input/Avalonia.Input.csproj | 2 +- .../Avalonia.Interactivity.csproj | 2 +- src/Avalonia.Layout/Avalonia.Layout.csproj | 2 +- .../Avalonia.Logging.Serilog.csproj | 2 +- src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj | 2 +- src/Avalonia.Styling/Avalonia.Styling.csproj | 2 +- src/Avalonia.Visuals/Avalonia.Visuals.csproj | 2 +- src/Gtk/Avalonia.Gtk3/Avalonia.Gtk3.csproj | 2 +- src/Markup/Avalonia.Markup/Avalonia.Markup.csproj | 2 +- .../Avalonia.Win32.NetStandard.csproj | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/packages.cake b/packages.cake index 07c77f64fd..64d512c0a7 100644 --- a/packages.cake +++ b/packages.cake @@ -150,12 +150,12 @@ public class Packages }; var coreLibrariesFiles = coreLibraries.Select((lib) => { - return (FilePath)context.File(lib[0] + lib[1] + "/bin/" + parameters.DirSuffix + "/netstandard1.1/" + lib[1] + lib[2]); + return (FilePath)context.File(lib[0] + lib[1] + "/bin/" + parameters.DirSuffix + "/netstandard1.3/" + lib[1] + lib[2]); }).ToList(); var coreLibrariesNuSpecContent = coreLibrariesFiles.Select((file) => { return new NuSpecContent { - Source = file.FullPath, Target = "lib/netstandard1.1" + Source = file.FullPath, Target = "lib/netstandard1.3" }; }); @@ -231,9 +231,9 @@ public class Packages }, Files = new [] { - new NuSpecContent { Source = "Avalonia.HtmlRenderer.dll", Target = "lib/netstandard1.1" } + new NuSpecContent { Source = "Avalonia.HtmlRenderer.dll", Target = "lib/netstandard1.3" } }, - BasePath = context.Directory("./src/Avalonia.HtmlRenderer/bin/" + parameters.DirSuffix + "/netstandard1.1"), + BasePath = context.Directory("./src/Avalonia.HtmlRenderer/bin/" + parameters.DirSuffix + "/netstandard1.3"), OutputDirectory = parameters.NugetRoot } }; @@ -347,7 +347,7 @@ public class Packages 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 + "/netstandard1.1/Avalonia.Win32.dll", Target = "lib/netstandard1.1" } + new NuSpecContent { Source = "Avalonia.Win32.NetStandard/bin/" + parameters.DirSuffix + "/netstandard1.3/Avalonia.Win32.dll", Target = "lib/netstandard1.3" } }, BasePath = context.Directory("./src/Windows"), OutputDirectory = parameters.NugetRoot @@ -402,9 +402,9 @@ public class Packages }, Files = new [] { - new NuSpecContent { Source = "Avalonia.Gtk3.dll", Target = "lib/netstandard1.1" } + new NuSpecContent { Source = "Avalonia.Gtk3.dll", Target = "lib/netstandard1.3" } }, - BasePath = context.Directory("./src/Gtk/Avalonia.Gtk3/bin/" + parameters.DirSuffix + "/netstandard1.1"), + BasePath = context.Directory("./src/Gtk/Avalonia.Gtk3/bin/" + parameters.DirSuffix + "/netstandard1.3"), OutputDirectory = parameters.NugetRoot }, /////////////////////////////////////////////////////////////////////////////// diff --git a/src/Avalonia.Animation/Avalonia.Animation.csproj b/src/Avalonia.Animation/Avalonia.Animation.csproj index f02ec2f31c..8f832dabcf 100644 --- a/src/Avalonia.Animation/Avalonia.Animation.csproj +++ b/src/Avalonia.Animation/Avalonia.Animation.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Base/Avalonia.Base.csproj b/src/Avalonia.Base/Avalonia.Base.csproj index cc458545e2..e0d12ce262 100644 --- a/src/Avalonia.Base/Avalonia.Base.csproj +++ b/src/Avalonia.Base/Avalonia.Base.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Controls/Avalonia.Controls.csproj b/src/Avalonia.Controls/Avalonia.Controls.csproj index 37f348340c..037546b186 100644 --- a/src/Avalonia.Controls/Avalonia.Controls.csproj +++ b/src/Avalonia.Controls/Avalonia.Controls.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj b/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj index b1fc7a4278..f715217e42 100644 --- a/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj +++ b/src/Avalonia.HtmlRenderer/Avalonia.HtmlRenderer.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 False False false diff --git a/src/Avalonia.Input/Avalonia.Input.csproj b/src/Avalonia.Input/Avalonia.Input.csproj index e9e74e24fe..b5482ebce1 100644 --- a/src/Avalonia.Input/Avalonia.Input.csproj +++ b/src/Avalonia.Input/Avalonia.Input.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Interactivity/Avalonia.Interactivity.csproj b/src/Avalonia.Interactivity/Avalonia.Interactivity.csproj index ab9ab88a37..9d22de86b3 100644 --- a/src/Avalonia.Interactivity/Avalonia.Interactivity.csproj +++ b/src/Avalonia.Interactivity/Avalonia.Interactivity.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Layout/Avalonia.Layout.csproj b/src/Avalonia.Layout/Avalonia.Layout.csproj index 45a40d2fd4..d0260391d8 100644 --- a/src/Avalonia.Layout/Avalonia.Layout.csproj +++ b/src/Avalonia.Layout/Avalonia.Layout.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Logging.Serilog/Avalonia.Logging.Serilog.csproj b/src/Avalonia.Logging.Serilog/Avalonia.Logging.Serilog.csproj index 9aa81c19f9..508ede7f7d 100644 --- a/src/Avalonia.Logging.Serilog/Avalonia.Logging.Serilog.csproj +++ b/src/Avalonia.Logging.Serilog/Avalonia.Logging.Serilog.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj b/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj index 28522d8849..2d66b62eab 100644 --- a/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj +++ b/src/Avalonia.ReactiveUI/Avalonia.ReactiveUI.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 False false diff --git a/src/Avalonia.Styling/Avalonia.Styling.csproj b/src/Avalonia.Styling/Avalonia.Styling.csproj index 5965645391..6bf37b522b 100644 --- a/src/Avalonia.Styling/Avalonia.Styling.csproj +++ b/src/Avalonia.Styling/Avalonia.Styling.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Avalonia.Visuals/Avalonia.Visuals.csproj b/src/Avalonia.Visuals/Avalonia.Visuals.csproj index dd9a795937..127760d8ac 100644 --- a/src/Avalonia.Visuals/Avalonia.Visuals.csproj +++ b/src/Avalonia.Visuals/Avalonia.Visuals.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false Avalonia diff --git a/src/Gtk/Avalonia.Gtk3/Avalonia.Gtk3.csproj b/src/Gtk/Avalonia.Gtk3/Avalonia.Gtk3.csproj index 1874d92f4d..d292e99b30 100644 --- a/src/Gtk/Avalonia.Gtk3/Avalonia.Gtk3.csproj +++ b/src/Gtk/Avalonia.Gtk3/Avalonia.Gtk3.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 False false diff --git a/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj b/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj index 831c0384d3..3d16196b70 100644 --- a/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj +++ b/src/Markup/Avalonia.Markup/Avalonia.Markup.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 false diff --git a/src/Windows/Avalonia.Win32.NetStandard/Avalonia.Win32.NetStandard.csproj b/src/Windows/Avalonia.Win32.NetStandard/Avalonia.Win32.NetStandard.csproj index 2c6efb56e2..cedf3c4213 100644 --- a/src/Windows/Avalonia.Win32.NetStandard/Avalonia.Win32.NetStandard.csproj +++ b/src/Windows/Avalonia.Win32.NetStandard/Avalonia.Win32.NetStandard.csproj @@ -1,6 +1,6 @@  - netstandard1.1 + netstandard1.3 False false Avalonia.Win32 From b390e7081d194fe6c0205e4f7e20d40991d06908 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 03:28:36 +0300 Subject: [PATCH 127/132] Add portablexaml to inspection whitelist --- build.cake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.cake b/build.cake index cab2ba9b0a..c56089ab55 100644 --- a/build.cake +++ b/build.cake @@ -403,7 +403,8 @@ Task("Inspect") { var badIssues = new []{"PossibleNullReferenceException"}; var whitelist = new []{"tests", "src\\android", "src\\ios", - "src\\windows\\avalonia.designer", "src\\avalonia.htmlrenderer\\external"}; + "src\\windows\\avalonia.designer", "src\\avalonia.htmlrenderer\\external", + "src\\markup\\avalonia.markup.xaml\\portablexaml\\portable.xaml.github"}; Information("Running code inspections"); From fe7566a5d83bff1a3876d71a8a9da9b4a41279a2 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 13:25:51 +0300 Subject: [PATCH 128/132] Build & packaging --- build/Markup.props | 5 +- packages.cake | 54 ++++++++++++++++--- samples/BindingTest/BindingTest.csproj | 12 ----- .../Avalonia.Markup.Xaml.csproj | 4 -- 4 files changed, 50 insertions(+), 25 deletions(-) diff --git a/build/Markup.props b/build/Markup.props index 73f02e92f9..0e4baf5da9 100644 --- a/build/Markup.props +++ b/build/Markup.props @@ -5,6 +5,9 @@ - + + + + diff --git a/packages.cake b/packages.cake index 64d512c0a7..5f268188dc 100644 --- a/packages.cake +++ b/packages.cake @@ -8,6 +8,42 @@ public class Packages public string NugetPackagesDir {get; private set;} 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; + } + + string GetVersion(string name) + { + return _parent.PackageVersions[name].First().Item1; + } + + + public DependencyBuilder Dep(string name, params string[] fws) + { + if(fws.Length == 0) + Add(new NuSpecDependency() { Id = name, Version = GetVersion(name) }); + foreach(var fw in fws) + Add(new NuSpecDependency() { Id = name, TargetFramework = fw, Version = GetVersion(name) }); + return this; + } + public DependencyBuilder Deps(string[] fws, params string[] deps) + { + foreach(var fw in fws) + foreach(var name in deps) + Add(new NuSpecDependency() { Id = name, TargetFramework = fw, Version = GetVersion(name) }); + return this; + } + } + + //new NuSpecDependency() { Id = "System.Threading.ThreadPool", TargetFramework = "netcoreapp1.0", Version = "4.3.0" }, public Packages(ICakeContext context, Parameters parameters) { // NUGET NUSPECS @@ -26,7 +62,7 @@ public class Packages // Key: Package Id // Value is Tuple where Item1: Package Version, Item2: The *.csproj/*.props file path. var packageVersions = new Dictionary>>(); - + PackageVersions = packageVersions; System.IO.Directory.EnumerateFiles(((DirectoryPath)context.Directory("./build")).FullPath, "*.props", SearchOption.AllDirectories).ToList().ForEach(fileName => { @@ -195,13 +231,12 @@ public class Packages new NuGetPackSettings() { Id = "Avalonia", - Dependencies = new [] + Dependencies = new DependencyBuilder(this) { new NuSpecDependency() { Id = "Serilog", Version = SerilogVersion }, new NuSpecDependency() { Id = "Splat", Version = SplatVersion }, new NuSpecDependency() { Id = "Sprache", Version = SpracheVersion }, new NuSpecDependency() { Id = "System.Reactive", Version = SystemReactiveVersion }, - new NuSpecDependency() { Id = "System.ValueTuple", Version = SystemValueTupleVersion }, //.NET Core new NuSpecDependency() { Id = "System.Threading.ThreadPool", TargetFramework = "netcoreapp1.0", Version = "4.3.0" }, new NuSpecDependency() { Id = "Microsoft.Extensions.DependencyModel", TargetFramework = "netcoreapp1.0", Version = "1.1.0" }, @@ -210,8 +245,11 @@ public class Packages new NuSpecDependency() { Id = "Serilog", TargetFramework = "netcoreapp1.0", Version = SerilogVersion }, new NuSpecDependency() { Id = "Sprache", TargetFramework = "netcoreapp1.0", Version = SpracheVersion }, new NuSpecDependency() { Id = "System.Reactive", TargetFramework = "netcoreapp1.0", Version = SystemReactiveVersion }, - new NuSpecDependency() { Id = "System.ValueTuple", TargetFramework = "netcoreapp1.0", Version = SystemValueTupleVersion } - }, + } + .Deps(new string[]{null, "netcoreapp1.0"}, + "System.ValueTuple", "System.ComponentModel.TypeConverter", "System.ComponentModel.Primitives", + "System.Runtime.Serialization.Primitives", "System.Xml.XmlDocument") + .ToArray(), Files = coreLibrariesNuSpecContent .Concat(win32CoreLibrariesNuSpecContent).Concat(net45RuntimePlatform) .Concat(netcoreappCoreLibrariesNuSpecContent).Concat(netCoreRuntimePlatform) @@ -460,9 +498,9 @@ public class Packages new NuSpecDependency() { Id = "Avalonia.Skia.Desktop", TargetFramework="net45", Version = parameters.Version }, new NuSpecDependency() { Id = "Avalonia.Gtk3", TargetFramework="net45", Version = parameters.Version }, //.NET Core - new NuSpecDependency() { Id = "Avalonia.Win32", TargetFramework="netcoreapp1.1", Version = parameters.Version }, - new NuSpecDependency() { Id = "Avalonia.Skia.Desktop", TargetFramework="netcoreapp1.1", Version = parameters.Version }, - new NuSpecDependency() { Id = "Avalonia.Gtk3", TargetFramework="netcoreapp1.1", Version = parameters.Version } + new NuSpecDependency() { Id = "Avalonia.Win32", TargetFramework="netcoreapp1.0", Version = parameters.Version }, + new NuSpecDependency() { Id = "Avalonia.Skia.Desktop", TargetFramework="netcoreapp1.0", Version = parameters.Version }, + new NuSpecDependency() { Id = "Avalonia.Gtk3", TargetFramework="netcoreapp1.0", Version = parameters.Version } }, Files = new NuSpecContent[] { diff --git a/samples/BindingTest/BindingTest.csproj b/samples/BindingTest/BindingTest.csproj index 013c286387..8e78b0c2cd 100644 --- a/samples/BindingTest/BindingTest.csproj +++ b/samples/BindingTest/BindingTest.csproj @@ -41,18 +41,6 @@ - - ..\..\packages\System.Reactive.Core.3.0.0\lib\net45\System.Reactive.Core.dll - True - - - ..\..\packages\System.Reactive.Interfaces.3.0.0\lib\net45\System.Reactive.Interfaces.dll - True - - - ..\..\packages\System.Reactive.Linq.3.0.0\lib\net45\System.Reactive.Linq.dll - True - diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index 448bedbb38..0ecab9c92c 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -308,10 +308,6 @@ - - - - From 9134723eefd1486c0cbca567b78dd26833326a29 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sun, 23 Jul 2017 14:20:59 +0300 Subject: [PATCH 129/132] Dead code elimination --- .gitmodules | 6 - Avalonia.sln | 590 ------------------ .../DesignerAssist.cs | 2 - .../Avalonia.Markup.Xaml.csproj | 206 ------ .../AvaloniaXamlLoader.cs | 7 +- .../AvaloniaXamlLoaderOmniXaml.cs | 227 ------- .../Context/AvaloniaAttachableXamlMember.cs | 35 -- .../AvaloniaContentPropertyProvider.cs | 58 -- .../Context/AvaloniaLifeCycleListener.cs | 33 - .../Context/AvaloniaMemberValuePlugin.cs | 27 - .../Context/AvaloniaNamespaceRegistry.cs | 183 ------ .../Context/AvaloniaObjectAssembler.cs | 81 --- .../Context/AvaloniaParserFactory.cs | 43 -- .../Context/AvaloniaRuntimeTypeSource.cs | 93 --- .../Context/AvaloniaTypeFeatureProvider.cs | 183 ------ .../Context/AvaloniaTypeRepository.cs | 30 - .../Context/AvaloniaWiringContext.cs | 126 ---- .../Context/AvaloniaXamlMember.cs | 33 - .../Context/AvaloniaXamlType.cs | 63 -- .../Context/NameScopeWrapper.cs | 32 - .../Context/PropertyAccessor.cs | 176 ------ .../Converters/AvaloniaListTypeConverter.cs | 46 -- .../AvaloniaPropertyTypeConverter.cs | 91 --- .../Converters/BitmapTypeConverter.cs | 49 -- .../Converters/BrushTypeConverter.cs | 30 - .../Converters/ClassesTypeConverter.cs | 36 +- .../Converters/ColorTypeConverter.cs | 36 +- .../ColumnDefinitionsTypeConverter.cs | 31 - .../Converters/CursorTypeConverter.cs | 33 - .../Converters/DateTimeTypeConverter.cs | 63 -- .../Converters/FontWeightConverter.cs | 44 -- .../Converters/GeometryTypeConverter.cs | 31 - .../Converters/GridLengthTypeConverter.cs | 31 - .../Converters/IconTypeConverter.cs | 64 -- .../Converters/KeyGestureConverter.cs | 31 - .../Converters/MemberSelectorTypeConverter.cs | 34 - .../Converters/PointTypeConverter.cs | 31 - .../Converters/PointsListTypeConverter.cs | 38 -- .../Converters/RelativePointTypeConverter.cs | 31 - .../Converters/RelativeRectTypeConverter.cs | 31 - .../Converters/RowDefinitionsTypeConverter.cs | 31 - .../Converters/SelectorTypeConverter.cs | 32 - .../Converters/SizeTypeConverter.cs | 31 - .../Converters/ThicknessTypeConverter.cs | 31 - .../Converters/TimeSpanTypeConverter.cs | 40 -- .../Converters/UriTypeConverter.cs | 34 - .../Data/SourceBindingEndpoint.cs | 29 - .../Data/TargetBindingEndpoint.cs | 20 - .../MarkupExtensions/BindingExtension.cs | 42 -- .../RelativeSourceExtension.cs | 29 - .../Standard/StaticExtension.cs | 88 --- .../Standard/TypeExtension.cs | 51 -- .../MarkupExtensions/StaticExtension.cs | 86 +-- .../MarkupExtensions/StyleIncludeExtension.cs | 5 - .../StyleResourceExtension.cs | 22 - .../TemplateBindingExtension.cs | 39 -- .../MarkupExtensions/TypeExtension.cs | 50 -- src/Markup/Avalonia.Markup.Xaml/OmniXAML | 1 - .../OmniXamlCompileStubs.cs | 73 --- .../Styling/StyleInclude.cs | 13 - .../Templates/TemplateContent.cs | 39 -- .../Templates/TemplateLoader.cs | 17 - src/Markup/Avalonia.Markup.Xaml/glass | 1 - .../Avalonia.Markup.Xaml.UnitTests.csproj | 7 - .../Context/AvaloniaNamespaceRegistryTest.cs | 28 - .../AvaloniaPropertyConverterTest.cs | 33 +- .../Xaml/BasicTests.cs | 5 +- .../Xaml/BindingTests.cs | 5 +- 68 files changed, 9 insertions(+), 3888 deletions(-) delete mode 100644 src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaAttachableXamlMember.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaContentPropertyProvider.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaLifeCycleListener.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaMemberValuePlugin.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaNamespaceRegistry.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaParserFactory.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaRuntimeTypeSource.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeFeatureProvider.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaTypeRepository.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaWiringContext.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaXamlMember.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaXamlType.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/NameScopeWrapper.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Context/PropertyAccessor.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Converters/DateTimeTypeConverter.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Converters/FontWeightConverter.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Converters/UriTypeConverter.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Data/SourceBindingEndpoint.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/Data/TargetBindingEndpoint.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/Standard/StaticExtension.cs delete mode 100644 src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/Standard/TypeExtension.cs delete mode 160000 src/Markup/Avalonia.Markup.Xaml/OmniXAML delete mode 100644 src/Markup/Avalonia.Markup.Xaml/OmniXamlCompileStubs.cs delete mode 160000 src/Markup/Avalonia.Markup.Xaml/glass delete mode 100644 tests/Avalonia.Markup.Xaml.UnitTests/Context/AvaloniaNamespaceRegistryTest.cs diff --git a/.gitmodules b/.gitmodules index 8d13c6572c..bdd5d5ca4d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,12 +5,6 @@ path = src/Avalonia.HtmlRenderer/external url = https://github.com/AvaloniaUI/HTML-Renderer.git branch = perspex-pcl -[submodule "src/Markup/Avalonia.Markup.Xaml/OmniXAML"] - path = src/Markup/Avalonia.Markup.Xaml/OmniXAML - url = https://github.com/AvaloniaUI/OmniXAML.git -[submodule "src/Markup/Avalonia.Markup.Xaml/glass"] - path = src/Markup/Avalonia.Markup.Xaml/glass - url = https://github.com/SuperJMN/glass [submodule "src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github"] path = src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github url = https://github.com/cwensley/Portable.Xaml.git diff --git a/Avalonia.sln b/Avalonia.sln index 453af8c59b..5c344e4b90 100644 --- a/Avalonia.sln +++ b/Avalonia.sln @@ -236,11 +236,6 @@ Global Debug|iPhoneSimulator = Debug|iPhoneSimulator Debug|Mono = Debug|Mono Debug|x86 = Debug|x86 - DebugOmniXaml|Any CPU = DebugOmniXaml|Any CPU - DebugOmniXaml|iPhone = DebugOmniXaml|iPhone - DebugOmniXaml|iPhoneSimulator = DebugOmniXaml|iPhoneSimulator - DebugOmniXaml|Mono = DebugOmniXaml|Mono - DebugOmniXaml|x86 = DebugOmniXaml|x86 Release|Any CPU = Release|Any CPU Release|iPhone = Release|iPhone Release|iPhoneSimulator = Release|iPhoneSimulator @@ -276,16 +271,6 @@ Global {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|Mono.Build.0 = Debug|Any CPU {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|x86.ActiveCfg = Debug|Any CPU {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Debug|x86.Build.0 = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|Any CPU.ActiveCfg = Release|Any CPU {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|Any CPU.Build.0 = Release|Any CPU {B09B78D8-9B26-48B0-9149-D64A2F120F3F}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -324,16 +309,6 @@ Global {EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|Mono.Build.0 = Debug|Any CPU {EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|x86.ActiveCfg = Debug|Any CPU {EB582467-6ABB-43A1-B052-E981BA910E3A}.Debug|x86.Build.0 = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {EB582467-6ABB-43A1-B052-E981BA910E3A}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|Any CPU.ActiveCfg = Release|Any CPU {EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|Any CPU.Build.0 = Release|Any CPU {EB582467-6ABB-43A1-B052-E981BA910E3A}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -372,16 +347,6 @@ Global {42472427-4774-4C81-8AFF-9F27B8E31721}.Debug|Mono.Build.0 = Debug|Any CPU {42472427-4774-4C81-8AFF-9F27B8E31721}.Debug|x86.ActiveCfg = Debug|Any CPU {42472427-4774-4C81-8AFF-9F27B8E31721}.Debug|x86.Build.0 = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {42472427-4774-4C81-8AFF-9F27B8E31721}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {42472427-4774-4C81-8AFF-9F27B8E31721}.Release|Any CPU.ActiveCfg = Release|Any CPU {42472427-4774-4C81-8AFF-9F27B8E31721}.Release|Any CPU.Build.0 = Release|Any CPU {42472427-4774-4C81-8AFF-9F27B8E31721}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -419,16 +384,6 @@ Global {811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|Mono.ActiveCfg = Debug|Any CPU {811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|x86.ActiveCfg = Debug|Any CPU {811A76CF-1CF6-440F-963B-BBE31BD72A82}.Debug|x86.Build.0 = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {811A76CF-1CF6-440F-963B-BBE31BD72A82}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|Any CPU.ActiveCfg = Release|Any CPU {811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|Any CPU.Build.0 = Release|Any CPU {811A76CF-1CF6-440F-963B-BBE31BD72A82}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -465,16 +420,6 @@ Global {3E908F67-5543-4879-A1DC-08EACE79B3CD}.Debug|Mono.ActiveCfg = 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}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {3E908F67-5543-4879-A1DC-08EACE79B3CD}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|Any CPU.Build.0 = Release|Any CPU {3E908F67-5543-4879-A1DC-08EACE79B3CD}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -508,16 +453,6 @@ Global {EC42600F-049B-43FF-AED1-8314D61B2749}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {EC42600F-049B-43FF-AED1-8314D61B2749}.Debug|Mono.ActiveCfg = Debug|Any CPU {EC42600F-049B-43FF-AED1-8314D61B2749}.Debug|x86.ActiveCfg = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {EC42600F-049B-43FF-AED1-8314D61B2749}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {EC42600F-049B-43FF-AED1-8314D61B2749}.Release|Any CPU.ActiveCfg = Release|Any CPU {EC42600F-049B-43FF-AED1-8314D61B2749}.Release|Any CPU.Build.0 = Release|Any CPU {EC42600F-049B-43FF-AED1-8314D61B2749}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -554,16 +489,6 @@ Global {62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|Mono.Build.0 = Debug|Any CPU {62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|x86.ActiveCfg = Debug|Any CPU {62024B2D-53EB-4638-B26B-85EEAA54866E}.Debug|x86.Build.0 = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {62024B2D-53EB-4638-B26B-85EEAA54866E}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|Any CPU.ActiveCfg = Release|Any CPU {62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|Any CPU.Build.0 = Release|Any CPU {62024B2D-53EB-4638-B26B-85EEAA54866E}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -602,16 +527,6 @@ Global {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|Mono.Build.0 = Debug|Any CPU {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|x86.ActiveCfg = Debug|Any CPU {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Debug|x86.Build.0 = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|Any CPU.ActiveCfg = Release|Any CPU {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|Any CPU.Build.0 = Release|Any CPU {6B0ED19D-A08B-461C-A9D9-A9EE40B0C06B}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -650,16 +565,6 @@ Global {D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|Mono.Build.0 = Debug|Any CPU {D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|x86.ActiveCfg = Debug|Any CPU {D2221C82-4A25-4583-9B43-D791E3F6820C}.Debug|x86.Build.0 = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {D2221C82-4A25-4583-9B43-D791E3F6820C}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|Any CPU.Build.0 = Release|Any CPU {D2221C82-4A25-4583-9B43-D791E3F6820C}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -698,16 +603,6 @@ Global {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|Mono.Build.0 = Debug|Any CPU {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|x86.ActiveCfg = Debug|Any CPU {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Debug|x86.Build.0 = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|Any CPU.ActiveCfg = Release|Any CPU {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|Any CPU.Build.0 = Release|Any CPU {F1BAA01A-F176-4C6A-B39D-5B40BB1B148F}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -746,16 +641,6 @@ Global {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|Mono.Build.0 = Debug|Any CPU {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|x86.ActiveCfg = Debug|Any CPU {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Debug|x86.Build.0 = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|Any CPU.Build.0 = Release|Any CPU {3E10A5FA-E8DA-48B1-AD44-6A5B6CB7750F}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -794,16 +679,6 @@ Global {7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|Mono.Build.0 = Debug|Any CPU {7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|x86.ActiveCfg = Debug|Any CPU {7062AE20-5DCC-4442-9645-8195BDECE63E}.Debug|x86.Build.0 = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {7062AE20-5DCC-4442-9645-8195BDECE63E}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|Any CPU.ActiveCfg = Release|Any CPU {7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|Any CPU.Build.0 = Release|Any CPU {7062AE20-5DCC-4442-9645-8195BDECE63E}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -842,16 +717,6 @@ Global {D211E587-D8BC-45B9-95A4-F297C8FA5200}.Debug|Mono.Build.0 = Debug|Any CPU {D211E587-D8BC-45B9-95A4-F297C8FA5200}.Debug|x86.ActiveCfg = Debug|Any CPU {D211E587-D8BC-45B9-95A4-F297C8FA5200}.Debug|x86.Build.0 = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {D211E587-D8BC-45B9-95A4-F297C8FA5200}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {D211E587-D8BC-45B9-95A4-F297C8FA5200}.Release|Any CPU.ActiveCfg = Release|Any CPU {D211E587-D8BC-45B9-95A4-F297C8FA5200}.Release|Any CPU.Build.0 = Release|Any CPU {D211E587-D8BC-45B9-95A4-F297C8FA5200}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -890,16 +755,6 @@ Global {47ECDF59-DEF8-4C53-87B1-2098A3429059}.Debug|Mono.Build.0 = Debug|Any CPU {47ECDF59-DEF8-4C53-87B1-2098A3429059}.Debug|x86.ActiveCfg = Debug|Any CPU {47ECDF59-DEF8-4C53-87B1-2098A3429059}.Debug|x86.Build.0 = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {47ECDF59-DEF8-4C53-87B1-2098A3429059}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {47ECDF59-DEF8-4C53-87B1-2098A3429059}.Release|Any CPU.ActiveCfg = Release|Any CPU {47ECDF59-DEF8-4C53-87B1-2098A3429059}.Release|Any CPU.Build.0 = Release|Any CPU {47ECDF59-DEF8-4C53-87B1-2098A3429059}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -938,16 +793,6 @@ Global {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Debug|Mono.Build.0 = Debug|Any CPU {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Debug|x86.ActiveCfg = Debug|Any CPU {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Debug|x86.Build.0 = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Release|Any CPU.ActiveCfg = Release|Any CPU {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Release|Any CPU.Build.0 = Release|Any CPU {5CCB5571-7C30-4E7D-967D-0E2158EBD91F}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -986,16 +831,6 @@ Global {76716382-3159-460E-BDA6-C5715CF606D7}.Debug|Mono.Build.0 = Debug|Any CPU {76716382-3159-460E-BDA6-C5715CF606D7}.Debug|x86.ActiveCfg = Debug|Any CPU {76716382-3159-460E-BDA6-C5715CF606D7}.Debug|x86.Build.0 = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {76716382-3159-460E-BDA6-C5715CF606D7}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {76716382-3159-460E-BDA6-C5715CF606D7}.Release|Any CPU.ActiveCfg = Release|Any CPU {76716382-3159-460E-BDA6-C5715CF606D7}.Release|Any CPU.Build.0 = Release|Any CPU {76716382-3159-460E-BDA6-C5715CF606D7}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1034,16 +869,6 @@ Global {2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|Mono.Build.0 = Debug|Any CPU {2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|x86.ActiveCfg = Debug|Any CPU {2905FF23-53FB-45E6-AA49-6AF47A172056}.Debug|x86.Build.0 = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {2905FF23-53FB-45E6-AA49-6AF47A172056}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|Any CPU.ActiveCfg = Release|Any CPU {2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|Any CPU.Build.0 = Release|Any CPU {2905FF23-53FB-45E6-AA49-6AF47A172056}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1082,16 +907,6 @@ Global {DB070A10-BF39-4752-8456-86E9D5928478}.Debug|Mono.Build.0 = Debug|Any CPU {DB070A10-BF39-4752-8456-86E9D5928478}.Debug|x86.ActiveCfg = Debug|Any CPU {DB070A10-BF39-4752-8456-86E9D5928478}.Debug|x86.Build.0 = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {DB070A10-BF39-4752-8456-86E9D5928478}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {DB070A10-BF39-4752-8456-86E9D5928478}.Release|Any CPU.ActiveCfg = Release|Any CPU {DB070A10-BF39-4752-8456-86E9D5928478}.Release|Any CPU.Build.0 = Release|Any CPU {DB070A10-BF39-4752-8456-86E9D5928478}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1130,16 +945,6 @@ Global {08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|Mono.Build.0 = Debug|Any CPU {08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|x86.ActiveCfg = Debug|Any CPU {08478EF5-44E8-42E9-92D6-15E00EC038D8}.Debug|x86.Build.0 = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {08478EF5-44E8-42E9-92D6-15E00EC038D8}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|Any CPU.ActiveCfg = Release|Any CPU {08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|Any CPU.Build.0 = Release|Any CPU {08478EF5-44E8-42E9-92D6-15E00EC038D8}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1177,16 +982,6 @@ Global {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Debug|Mono.ActiveCfg = Debug|Any CPU {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Debug|x86.ActiveCfg = Debug|Any CPU {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Debug|x86.Build.0 = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Release|Any CPU.ActiveCfg = Release|Any CPU {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Release|Any CPU.Build.0 = Release|Any CPU {DABFD304-D6A4-4752-8123-C2CCF7AC7831}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1224,16 +1019,6 @@ Global {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|Mono.Build.0 = Debug|Any CPU {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|x86.ActiveCfg = Debug|Any CPU {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Debug|x86.Build.0 = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|Any CPU.ActiveCfg = Release|Any CPU {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|Any CPU.Build.0 = Release|Any CPU {AC18926A-E784-40FE-B09D-BB0FE2B599F0}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1271,16 +1056,6 @@ Global {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Debug|Mono.ActiveCfg = Debug|Any CPU {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Debug|x86.ActiveCfg = Debug|Any CPU {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Debug|x86.Build.0 = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Release|Any CPU.ActiveCfg = Release|Any CPU {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Release|Any CPU.Build.0 = Release|Any CPU {EFB11458-9CDF-41C0-BE4F-44AF45A4CAB8}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1318,16 +1093,6 @@ Global {E106CF37-4066-4615-B684-172A6D30B058}.Debug|Mono.Build.0 = Debug|Any CPU {E106CF37-4066-4615-B684-172A6D30B058}.Debug|x86.ActiveCfg = Debug|Any CPU {E106CF37-4066-4615-B684-172A6D30B058}.Debug|x86.Build.0 = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {E106CF37-4066-4615-B684-172A6D30B058}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {E106CF37-4066-4615-B684-172A6D30B058}.Release|Any CPU.ActiveCfg = Release|Any CPU {E106CF37-4066-4615-B684-172A6D30B058}.Release|Any CPU.Build.0 = Release|Any CPU {E106CF37-4066-4615-B684-172A6D30B058}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1366,16 +1131,6 @@ Global {99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|Mono.Build.0 = Debug|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|x86.ActiveCfg = Debug|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Debug|x86.Build.0 = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {99135EAB-653D-47E4-A378-C96E1278CA44}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.ActiveCfg = Release|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Release|Any CPU.Build.0 = Release|Any CPU {99135EAB-653D-47E4-A378-C96E1278CA44}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1414,16 +1169,6 @@ Global {3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|Mono.Build.0 = Debug|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|x86.ActiveCfg = Debug|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Debug|x86.Build.0 = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {3E53A01A-B331-47F3-B828-4A5717E77A24}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.ActiveCfg = Release|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|Any CPU.Build.0 = Release|Any CPU {3E53A01A-B331-47F3-B828-4A5717E77A24}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1462,16 +1207,6 @@ Global {54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|Mono.Build.0 = Debug|Any CPU {54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|x86.ActiveCfg = Debug|Any CPU {54F237D5-A70A-4752-9656-0C70B1A7B047}.Debug|x86.Build.0 = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {54F237D5-A70A-4752-9656-0C70B1A7B047}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|Any CPU.ActiveCfg = Release|Any CPU {54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|Any CPU.Build.0 = Release|Any CPU {54F237D5-A70A-4752-9656-0C70B1A7B047}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1510,16 +1245,6 @@ Global {FB05AC90-89BA-4F2F-A924-F37875FB547C}.Debug|Mono.Build.0 = Debug|Any CPU {FB05AC90-89BA-4F2F-A924-F37875FB547C}.Debug|x86.ActiveCfg = Debug|Any CPU {FB05AC90-89BA-4F2F-A924-F37875FB547C}.Debug|x86.Build.0 = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {FB05AC90-89BA-4F2F-A924-F37875FB547C}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {FB05AC90-89BA-4F2F-A924-F37875FB547C}.Release|Any CPU.ActiveCfg = Release|Any CPU {FB05AC90-89BA-4F2F-A924-F37875FB547C}.Release|Any CPU.Build.0 = Release|Any CPU {FB05AC90-89BA-4F2F-A924-F37875FB547C}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1558,16 +1283,6 @@ Global {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|Mono.Build.0 = Debug|Any CPU {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|x86.ActiveCfg = Debug|Any CPU {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Debug|x86.Build.0 = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|Any CPU.ActiveCfg = Release|Any CPU {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|Any CPU.Build.0 = Release|Any CPU {6417B24E-49C2-4985-8DB2-3AB9D898EC91}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1606,16 +1321,6 @@ Global {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|Mono.Build.0 = Debug|Any CPU {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|x86.ActiveCfg = Debug|Any CPU {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Debug|x86.Build.0 = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|Any CPU.ActiveCfg = Release|Any CPU {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|Any CPU.Build.0 = Release|Any CPU {5FB2B005-0A7F-4DAD-ADD4-3ED01444E63D}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1654,16 +1359,6 @@ Global {6417E941-21BC-467B-A771-0DE389353CE6}.Debug|Mono.Build.0 = Debug|Any CPU {6417E941-21BC-467B-A771-0DE389353CE6}.Debug|x86.ActiveCfg = Debug|Any CPU {6417E941-21BC-467B-A771-0DE389353CE6}.Debug|x86.Build.0 = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {6417E941-21BC-467B-A771-0DE389353CE6}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {6417E941-21BC-467B-A771-0DE389353CE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {6417E941-21BC-467B-A771-0DE389353CE6}.Release|Any CPU.Build.0 = Release|Any CPU {6417E941-21BC-467B-A771-0DE389353CE6}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1702,16 +1397,6 @@ Global {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.Debug|Mono.Build.0 = Debug|Any CPU {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.Debug|x86.ActiveCfg = Debug|Any CPU {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.Debug|x86.Build.0 = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.Release|Any CPU.ActiveCfg = Release|Any CPU {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.Release|Any CPU.Build.0 = Release|Any CPU {8EF392D5-1416-45AA-9956-7CBBC3229E8A}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1750,16 +1435,6 @@ Global {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.Debug|Mono.Build.0 = Debug|Any CPU {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.Debug|x86.ActiveCfg = Debug|Any CPU {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.Debug|x86.Build.0 = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.Release|Any CPU.ActiveCfg = Release|Any CPU {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.Release|Any CPU.Build.0 = Release|Any CPU {08B3E6B9-1CD5-443C-9F61-6D49D1C5F162}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1797,16 +1472,6 @@ Global {925DD807-B651-475F-9F7C-CBEB974CE43D}.Debug|Mono.ActiveCfg = Debug|Any CPU {925DD807-B651-475F-9F7C-CBEB974CE43D}.Debug|x86.ActiveCfg = Debug|x86 {925DD807-B651-475F-9F7C-CBEB974CE43D}.Debug|x86.Build.0 = Debug|x86 - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|x86.ActiveCfg = Debug|x86 - {925DD807-B651-475F-9F7C-CBEB974CE43D}.DebugOmniXaml|x86.Build.0 = Debug|x86 {925DD807-B651-475F-9F7C-CBEB974CE43D}.Release|Any CPU.ActiveCfg = Release|x86 {925DD807-B651-475F-9F7C-CBEB974CE43D}.Release|Any CPU.Build.0 = Release|x86 {925DD807-B651-475F-9F7C-CBEB974CE43D}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1841,11 +1506,6 @@ Global {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.Debug|Mono.ActiveCfg = Debug|Any CPU {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.Debug|x86.ActiveCfg = Debug|Any CPU {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.Debug|x86.Build.0 = Debug|Any CPU - {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.Release|Any CPU.Build.0 = Release|Any CPU {BD43F7C0-396B-4AA1-BAD9-DFDE54D51298}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1880,11 +1540,6 @@ Global {47BE08A7-5985-410B-9FFC-2264B8EA595F}.Debug|Mono.ActiveCfg = Debug|Any CPU {47BE08A7-5985-410B-9FFC-2264B8EA595F}.Debug|x86.ActiveCfg = Debug|Any CPU {47BE08A7-5985-410B-9FFC-2264B8EA595F}.Debug|x86.Build.0 = Debug|Any CPU - {47BE08A7-5985-410B-9FFC-2264B8EA595F}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {47BE08A7-5985-410B-9FFC-2264B8EA595F}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {47BE08A7-5985-410B-9FFC-2264B8EA595F}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {47BE08A7-5985-410B-9FFC-2264B8EA595F}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {47BE08A7-5985-410B-9FFC-2264B8EA595F}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {47BE08A7-5985-410B-9FFC-2264B8EA595F}.Release|Any CPU.ActiveCfg = Release|Any CPU {47BE08A7-5985-410B-9FFC-2264B8EA595F}.Release|Any CPU.Build.0 = Release|Any CPU {47BE08A7-5985-410B-9FFC-2264B8EA595F}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1913,11 +1568,6 @@ Global {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.Debug|Mono.ActiveCfg = Debug|Any CPU {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.Debug|x86.ActiveCfg = Debug|Any CPU {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.Debug|x86.Build.0 = Debug|Any CPU - {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.Release|Any CPU.ActiveCfg = Release|Any CPU {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.Release|Any CPU.Build.0 = Release|Any CPU {7B92AF71-6287-4693-9DCB-BD5B6E927E23}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -1942,11 +1592,6 @@ Global {FF69B927-C545-49AE-8E16-3D14D621AA12}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {FF69B927-C545-49AE-8E16-3D14D621AA12}.Debug|Mono.ActiveCfg = Debug|Any CPU {FF69B927-C545-49AE-8E16-3D14D621AA12}.Debug|x86.ActiveCfg = Debug|Any CPU - {FF69B927-C545-49AE-8E16-3D14D621AA12}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {FF69B927-C545-49AE-8E16-3D14D621AA12}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {FF69B927-C545-49AE-8E16-3D14D621AA12}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {FF69B927-C545-49AE-8E16-3D14D621AA12}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {FF69B927-C545-49AE-8E16-3D14D621AA12}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {FF69B927-C545-49AE-8E16-3D14D621AA12}.Release|Any CPU.ActiveCfg = Release|Any CPU {FF69B927-C545-49AE-8E16-3D14D621AA12}.Release|Any CPU.Build.0 = Release|Any CPU {FF69B927-C545-49AE-8E16-3D14D621AA12}.Release|Any CPU.Deploy.0 = Release|Any CPU @@ -1981,16 +1626,6 @@ Global {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Debug|Mono.ActiveCfg = Debug|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Debug|x86.ActiveCfg = Debug|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Debug|x86.Build.0 = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {4488AD85-1495-4809-9AA4-DDFE0A48527E}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Release|Any CPU.ActiveCfg = Release|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Release|Any CPU.Build.0 = Release|Any CPU {4488AD85-1495-4809-9AA4-DDFE0A48527E}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2021,16 +1656,6 @@ Global {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|Mono.ActiveCfg = Debug|iPhoneSimulator {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|Any CPU.ActiveCfg = Release|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|Any CPU.Build.0 = Release|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|iPhone.ActiveCfg = Debug|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|iPhone.Build.0 = Debug|iPhone - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|Mono.ActiveCfg = Release|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|Mono.Build.0 = Release|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|x86.ActiveCfg = Release|iPhoneSimulator - {8C923867-8A8F-4F6B-8B80-47D9E8436166}.DebugOmniXaml|x86.Build.0 = Release|iPhoneSimulator {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|Any CPU.ActiveCfg = Release|iPhone {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|iPhone.ActiveCfg = Release|iPhone {8C923867-8A8F-4F6B-8B80-47D9E8436166}.Release|iPhone.Build.0 = Release|iPhone @@ -2065,16 +1690,6 @@ Global {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Debug|Mono.ActiveCfg = Debug|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Debug|x86.ActiveCfg = Debug|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Debug|x86.Build.0 = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Release|Any CPU.ActiveCfg = Release|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Release|Any CPU.Build.0 = Release|Any CPU {E1AA3DBF-9056-4530-9376-18119A7A3FFE}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2112,16 +1727,6 @@ Global {88060192-33D5-4932-B0F9-8BD2763E857D}.Debug|Mono.Build.0 = Debug|Any CPU {88060192-33D5-4932-B0F9-8BD2763E857D}.Debug|x86.ActiveCfg = Debug|Any CPU {88060192-33D5-4932-B0F9-8BD2763E857D}.Debug|x86.Build.0 = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {88060192-33D5-4932-B0F9-8BD2763E857D}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {88060192-33D5-4932-B0F9-8BD2763E857D}.Release|Any CPU.ActiveCfg = Release|Any CPU {88060192-33D5-4932-B0F9-8BD2763E857D}.Release|Any CPU.Build.0 = Release|Any CPU {88060192-33D5-4932-B0F9-8BD2763E857D}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2160,11 +1765,6 @@ Global {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.Debug|Mono.Build.0 = Debug|Any CPU {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.Debug|x86.ActiveCfg = Debug|Any CPU {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.Debug|x86.Build.0 = Debug|Any CPU - {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.Release|Any CPU.ActiveCfg = Release|Any CPU {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.Release|Any CPU.Build.0 = Release|Any CPU {410AC439-81A1-4EB5-B5E9-6A7FC6B77F4B}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2203,16 +1803,6 @@ Global {B61B66A3-B82D-4875-8001-89D3394FE0C9}.Debug|Mono.Build.0 = Debug|Any CPU {B61B66A3-B82D-4875-8001-89D3394FE0C9}.Debug|x86.ActiveCfg = Debug|Any CPU {B61B66A3-B82D-4875-8001-89D3394FE0C9}.Debug|x86.Build.0 = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {B61B66A3-B82D-4875-8001-89D3394FE0C9}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {B61B66A3-B82D-4875-8001-89D3394FE0C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {B61B66A3-B82D-4875-8001-89D3394FE0C9}.Release|Any CPU.Build.0 = Release|Any CPU {B61B66A3-B82D-4875-8001-89D3394FE0C9}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2251,16 +1841,6 @@ Global {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Debug|Mono.Build.0 = Debug|Any CPU {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Debug|x86.ActiveCfg = Debug|Any CPU {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Debug|x86.Build.0 = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Release|Any CPU.ActiveCfg = Release|Any CPU {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Release|Any CPU.Build.0 = Release|Any CPU {799A7BB5-3C2C-48B6-85A7-406A12C420DA}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2299,16 +1879,6 @@ Global {D0A739B9-3C68-4BA6-A328-41606954B6BD}.Debug|Mono.Build.0 = Debug|Any CPU {D0A739B9-3C68-4BA6-A328-41606954B6BD}.Debug|x86.ActiveCfg = Debug|Any CPU {D0A739B9-3C68-4BA6-A328-41606954B6BD}.Debug|x86.Build.0 = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {D0A739B9-3C68-4BA6-A328-41606954B6BD}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {D0A739B9-3C68-4BA6-A328-41606954B6BD}.Release|Any CPU.ActiveCfg = Release|Any CPU {D0A739B9-3C68-4BA6-A328-41606954B6BD}.Release|Any CPU.Build.0 = Release|Any CPU {D0A739B9-3C68-4BA6-A328-41606954B6BD}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2347,16 +1917,6 @@ Global {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Debug|Mono.Build.0 = Debug|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Debug|x86.ActiveCfg = Debug|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Debug|x86.Build.0 = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|Any CPU.ActiveCfg = Release|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|Any CPU.Build.0 = Release|Any CPU {2B888490-D14A-4BCA-AB4B-48676FA93C9B}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2388,11 +1948,6 @@ Global {57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|Mono.ActiveCfg = Debug|iPhoneSimulator {57E0455D-D565-44BB-B069-EE1AA20F8337}.Debug|x86.ActiveCfg = Debug|iPhone - {57E0455D-D565-44BB-B069-EE1AA20F8337}.DebugOmniXaml|Any CPU.ActiveCfg = Release|iPhoneSimulator - {57E0455D-D565-44BB-B069-EE1AA20F8337}.DebugOmniXaml|iPhone.ActiveCfg = Debug|iPhone - {57E0455D-D565-44BB-B069-EE1AA20F8337}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator - {57E0455D-D565-44BB-B069-EE1AA20F8337}.DebugOmniXaml|Mono.ActiveCfg = Release|iPhoneSimulator - {57E0455D-D565-44BB-B069-EE1AA20F8337}.DebugOmniXaml|x86.ActiveCfg = Release|iPhoneSimulator {57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|Any CPU.ActiveCfg = Release|iPhone {57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|iPhone.ActiveCfg = Release|iPhone {57E0455D-D565-44BB-B069-EE1AA20F8337}.Release|iPhone.Build.0 = Release|iPhone @@ -2427,16 +1982,6 @@ Global {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.Debug|Mono.ActiveCfg = Debug|Any CPU {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.Debug|x86.ActiveCfg = Debug|x86 {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.Debug|x86.Build.0 = Debug|x86 - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|x86.ActiveCfg = Debug|x86 - {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.DebugOmniXaml|x86.Build.0 = Debug|x86 {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.Release|Any CPU.ActiveCfg = Release|x86 {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.Release|Any CPU.Build.0 = Release|x86 {D35A9F3D-8BB0-496E-BF72-444038A7DEBB}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2473,16 +2018,6 @@ Global {52F55355-D120-42AC-8116-8410A7D602FA}.Debug|Mono.ActiveCfg = Debug|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Debug|x86.ActiveCfg = Debug|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Debug|x86.Build.0 = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {52F55355-D120-42AC-8116-8410A7D602FA}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Release|Any CPU.ActiveCfg = Release|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Release|Any CPU.Build.0 = Release|Any CPU {52F55355-D120-42AC-8116-8410A7D602FA}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2519,16 +2054,6 @@ Global {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.Debug|Mono.ActiveCfg = Debug|Any CPU {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.Debug|x86.ActiveCfg = Debug|Any CPU {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.Debug|x86.Build.0 = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.Release|Any CPU.ActiveCfg = Release|Any CPU {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.Release|Any CPU.Build.0 = Release|Any CPU {F1381F98-4D24-409A-A6C5-1C5B1E08BB08}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2566,16 +2091,6 @@ Global {FBCAF3D0-2808-4934-8E96-3F607594517B}.Debug|Mono.Build.0 = Debug|Any CPU {FBCAF3D0-2808-4934-8E96-3F607594517B}.Debug|x86.ActiveCfg = Debug|Any CPU {FBCAF3D0-2808-4934-8E96-3F607594517B}.Debug|x86.Build.0 = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {FBCAF3D0-2808-4934-8E96-3F607594517B}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {FBCAF3D0-2808-4934-8E96-3F607594517B}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBCAF3D0-2808-4934-8E96-3F607594517B}.Release|Any CPU.Build.0 = Release|Any CPU {FBCAF3D0-2808-4934-8E96-3F607594517B}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2613,16 +2128,6 @@ Global {C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|Mono.ActiveCfg = Debug|Any CPU {C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|x86.ActiveCfg = Debug|Any CPU {C7A69145-60B6-4882-97D6-A3921DD43978}.Debug|x86.Build.0 = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {C7A69145-60B6-4882-97D6-A3921DD43978}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {C7A69145-60B6-4882-97D6-A3921DD43978}.Release|Any CPU.ActiveCfg = Release|Any CPU {C7A69145-60B6-4882-97D6-A3921DD43978}.Release|Any CPU.Build.0 = Release|Any CPU {C7A69145-60B6-4882-97D6-A3921DD43978}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2662,16 +2167,6 @@ Global {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Debug|Mono.Build.0 = Debug|Any CPU {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Debug|x86.ActiveCfg = Debug|Any CPU {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Debug|x86.Build.0 = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Release|Any CPU.ActiveCfg = Release|Any CPU {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Release|Any CPU.Build.0 = Release|Any CPU {BD7F352C-6DC1-4740-BAF2-2D34A038728C}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2712,16 +2207,6 @@ Global {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.Debug|Mono.Build.0 = Debug|Any CPU {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.Debug|x86.ActiveCfg = Debug|Any CPU {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.Debug|x86.Build.0 = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.Release|Any CPU.Build.0 = Release|Any CPU {4A1ABB09-9047-4BD5-A4AD-A055E52C5EE0}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2762,16 +2247,6 @@ Global {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.Debug|Mono.Build.0 = Debug|Any CPU {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.Debug|x86.ActiveCfg = Debug|Any CPU {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.Debug|x86.Build.0 = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.Release|Any CPU.ActiveCfg = Release|Any CPU {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.Release|Any CPU.Build.0 = Release|Any CPU {F1FDC5B0-4654-416F-AE69-E3E9BBD87801}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2825,11 +2300,6 @@ Global {29132311-1848-4FD6-AE0C-4FF841151BD3}.Debug|x86.ActiveCfg = Debug|Any CPU {29132311-1848-4FD6-AE0C-4FF841151BD3}.Debug|x86.Build.0 = Debug|Any CPU {29132311-1848-4FD6-AE0C-4FF841151BD3}.Debug|x86.Deploy.0 = Debug|Any CPU - {29132311-1848-4FD6-AE0C-4FF841151BD3}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {29132311-1848-4FD6-AE0C-4FF841151BD3}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {29132311-1848-4FD6-AE0C-4FF841151BD3}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {29132311-1848-4FD6-AE0C-4FF841151BD3}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {29132311-1848-4FD6-AE0C-4FF841151BD3}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {29132311-1848-4FD6-AE0C-4FF841151BD3}.Release|Any CPU.ActiveCfg = Release|Any CPU {29132311-1848-4FD6-AE0C-4FF841151BD3}.Release|Any CPU.Build.0 = Release|Any CPU {29132311-1848-4FD6-AE0C-4FF841151BD3}.Release|Any CPU.Deploy.0 = Release|Any CPU @@ -2872,11 +2342,6 @@ Global {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.Debug|Mono.ActiveCfg = Debug|Any CPU {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.Debug|x86.ActiveCfg = Debug|Any CPU {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.Debug|x86.Build.0 = Debug|Any CPU - {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.Release|Any CPU.ActiveCfg = Release|Any CPU {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.Release|Any CPU.Build.0 = Release|Any CPU {40759A76-D0F2-464E-8000-6FF0F5C4BD7C}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2916,11 +2381,6 @@ Global {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.Debug|Mono.Build.0 = Debug|Any CPU {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.Debug|x86.ActiveCfg = Debug|Any CPU {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.Debug|x86.Build.0 = Debug|Any CPU - {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.Release|Any CPU.ActiveCfg = Release|Any CPU {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.Release|Any CPU.Build.0 = Release|Any CPU {7863EA94-F0FB-4386-BF8C-E5BFA761560A}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -2961,11 +2421,6 @@ Global {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.Debug|Mono.Build.0 = Debug|Any CPU {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.Debug|x86.ActiveCfg = Debug|Any CPU {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.Debug|x86.Build.0 = Debug|Any CPU - {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.Release|Any CPU.ActiveCfg = Release|Any CPU {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.Release|Any CPU.Build.0 = Release|Any CPU {7D2D3083-71DD-4CC9-8907-39A0D86FB322}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3006,11 +2461,6 @@ Global {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Debug|Mono.Build.0 = Debug|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Debug|x86.ActiveCfg = Debug|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Debug|x86.Build.0 = Debug|Any CPU - {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Release|Any CPU.Build.0 = Release|Any CPU {BB1F7BB5-6AD4-4776-94D9-C09D0A972658}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3051,16 +2501,6 @@ Global {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Debug|Mono.Build.0 = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Debug|x86.ActiveCfg = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Debug|x86.Build.0 = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Release|Any CPU.ActiveCfg = Release|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Release|Any CPU.Build.0 = Release|Any CPU {39D7B147-1A5B-47C2-9D01-21FB7C47C4B3}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3101,16 +2541,6 @@ Global {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Debug|Mono.Build.0 = Debug|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Debug|x86.ActiveCfg = Debug|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Debug|x86.Build.0 = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Release|Any CPU.ActiveCfg = Release|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Release|Any CPU.Build.0 = Release|Any CPU {854568D5-13D1-4B4F-B50D-534DC7EFD3C9}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3151,16 +2581,6 @@ Global {638580B0-7910-40EF-B674-DCB34DA308CD}.Debug|Mono.Build.0 = Debug|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Debug|x86.ActiveCfg = Debug|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Debug|x86.Build.0 = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {638580B0-7910-40EF-B674-DCB34DA308CD}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|Any CPU.Build.0 = Release|Any CPU {638580B0-7910-40EF-B674-DCB34DA308CD}.Release|iPhone.ActiveCfg = Release|Any CPU @@ -3201,16 +2621,6 @@ Global {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|Mono.Build.0 = Debug|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|x86.ActiveCfg = Debug|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Debug|x86.Build.0 = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Any CPU.ActiveCfg = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Any CPU.Build.0 = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhone.ActiveCfg = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhone.Build.0 = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|iPhoneSimulator.Build.0 = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Mono.ActiveCfg = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|Mono.Build.0 = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|x86.ActiveCfg = Debug|Any CPU - {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.DebugOmniXaml|x86.Build.0 = Debug|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Any CPU.ActiveCfg = Release|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|Any CPU.Build.0 = Release|Any CPU {CBC4FF2F-92D4-420B-BE21-9FE0B930B04E}.Release|iPhone.ActiveCfg = Release|Any CPU diff --git a/src/Avalonia.DesignerSupport/DesignerAssist.cs b/src/Avalonia.DesignerSupport/DesignerAssist.cs index 8d30f3cf25..2f5fc79147 100644 --- a/src/Avalonia.DesignerSupport/DesignerAssist.cs +++ b/src/Avalonia.DesignerSupport/DesignerAssist.cs @@ -5,8 +5,6 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text; -using OmniXaml; -using OmniXaml.ObjectAssembler; using Avalonia.Controls; using Avalonia.Controls.Platform; using Avalonia.Markup.Xaml; diff --git a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj index 0ecab9c92c..aa68357d45 100644 --- a/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj +++ b/src/Markup/Avalonia.Markup.Xaml/Avalonia.Markup.Xaml.csproj @@ -24,16 +24,6 @@ 4 bin\Release\Avalonia.Markup.Xaml.XML CS1591 - - - true - bin\DebugOmniXaml\ - TRACE;DEBUG;OMNIXAML - CS1591 - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset @@ -52,27 +42,12 @@ - - - - - - - - - - - - - - - @@ -89,7 +64,6 @@ - @@ -97,8 +71,6 @@ - - @@ -111,7 +83,6 @@ - @@ -123,180 +94,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -309,9 +106,6 @@ - - - diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs index 3f47d44d88..3142d954ff 100644 --- a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs +++ b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs @@ -1,11 +1,6 @@ namespace Avalonia.Markup.Xaml { - public class AvaloniaXamlLoader : -#if OMNIXAML - AvaloniaXamlLoaderOmniXaml -#else - AvaloniaXamlLoaderPortableXaml -#endif + public class AvaloniaXamlLoader : AvaloniaXamlLoaderPortableXaml { public static object Parse(string xaml) => new AvaloniaXamlLoader().Load(xaml); diff --git a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs b/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs deleted file mode 100644 index df734dfe39..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoaderOmniXaml.cs +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Text; -using OmniXaml; -using Avalonia.Platform; -using Avalonia.Markup.Xaml.Context; -using Avalonia.Markup.Xaml.Styling; -using OmniXaml.ObjectAssembler; -using Avalonia.Controls; -using Avalonia.Markup.Xaml.Data; - -namespace Avalonia.Markup.Xaml -{ -#if OMNIXAML - /// - /// Loads XAML for a avalonia application. - /// - public class AvaloniaXamlLoaderOmniXaml : XmlLoader - { - private static AvaloniaParserFactory s_parserFactory; - private static IInstanceLifeCycleListener s_lifeCycleListener = new AvaloniaLifeCycleListener(); - private static Stack s_uriStack = new Stack(); - - /// - /// Initializes a new instance of the class. - /// - public AvaloniaXamlLoaderOmniXaml() - : this(GetParserFactory()) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The parser factory to use. - public AvaloniaXamlLoaderOmniXaml(IParserFactory xamlParserFactory) - : base(xamlParserFactory) - { - } - - /// - /// Gets the URI of the XAML file currently being loaded. - /// - /// - /// TODO: Making this internal for now as I'm not sure that this is the correct - /// thing to do, but its needed by to get the URL of - /// the currently loading XAML file, as we can't use the OmniXAML parsing context - /// there. Maybe we need a way to inject OmniXAML context into the objects its - /// constructing? - /// - internal static Uri UriContext => s_uriStack.Count > 0 ? s_uriStack.Peek() : null; - - /// - /// Loads the XAML into a Avalonia component. - /// - /// The object to load the XAML into. - public static void Load(object obj) - { - Contract.Requires(obj != null); - - var loader = new AvaloniaXamlLoaderOmniXaml(); - loader.Load(obj.GetType(), obj); - } - - /// - /// Loads the XAML for a type. - /// - /// The type. - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The loaded object. - public object Load(Type type, object rootInstance = null) - { - Contract.Requires(type != null); - - // HACK: Currently Visual Studio is forcing us to change the extension of xaml files - // in certain situations, so we try to load .xaml and if that's not found we try .xaml. - // Ideally we'd be able to use .xaml everywhere - var assetLocator = AvaloniaLocator.Current.GetService(); - - if (assetLocator == null) - { - throw new InvalidOperationException( - "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); - } - - foreach (var uri in GetUrisFor(type)) - { - if (assetLocator.Exists(uri)) - { - using (var stream = assetLocator.Open(uri)) - { - var initialize = rootInstance as ISupportInitialize; - initialize?.BeginInit(); - return Load(stream, rootInstance, uri); - } - } - } - - throw new FileNotFoundException("Unable to find view for " + type.FullName); - } - - /// - /// Loads XAML from a URI. - /// - /// The URI of the XAML file. - /// - /// A base URI to use if is relative. - /// - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The loaded object. - public object Load(Uri uri, Uri baseUri = null, object rootInstance = null) - { - Contract.Requires(uri != null); - - var assetLocator = AvaloniaLocator.Current.GetService(); - - if (assetLocator == null) - { - throw new InvalidOperationException( - "Could not create IAssetLoader : maybe Application.RegisterServices() wasn't called?"); - } - - using (var stream = assetLocator.Open(uri, baseUri)) - { - return Load(stream, rootInstance, uri); - } - } - - /// - /// Loads XAML from a string. - /// - /// The string containing the XAML. - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The loaded object. - public object Load(string xaml, object rootInstance = null) - { - Contract.Requires(xaml != null); - - using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(xaml))) - { - return Load(stream, rootInstance); - } - } - - /// - /// Loads XAML from a stream. - /// - /// The stream containing the XAML. - /// - /// The optional instance into which the XAML should be loaded. - /// - /// The URI of the XAML - /// The loaded object. - public object Load(Stream stream, object rootInstance = null, Uri uri = null) - { - try - { - if (uri != null) - { - s_uriStack.Push(uri); - } - - var result = base.Load(stream, new Settings - { - RootInstance = rootInstance, - InstanceLifeCycleListener = s_lifeCycleListener, - ParsingContext = new Dictionary - { - { "Uri", uri } - } - }); - - var topLevel = result as TopLevel; - - if (topLevel != null) - { - DelayedBinding.ApplyBindings(topLevel); - } - - return result; - } - finally - { - if (uri != null) - { - s_uriStack.Pop(); - } - } - } - - private static AvaloniaParserFactory GetParserFactory() - { - if (s_parserFactory == null) - { - s_parserFactory = new AvaloniaParserFactory(); - } - - return s_parserFactory; - } - - /// - /// Gets the URI for a type. - /// - /// The type. - /// The URI. - private static IEnumerable GetUrisFor(Type type) - { - var asm = type.GetTypeInfo().Assembly.GetName().Name; - var typeName = type.FullName; - yield return new Uri("resm:" + typeName + ".xaml?assembly=" + asm); - yield return new Uri("resm:" + typeName + ".paml?assembly=" + asm); - - } - } -#endif -} diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaAttachableXamlMember.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaAttachableXamlMember.cs deleted file mode 100644 index 612dfa3f60..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaAttachableXamlMember.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using Avalonia.Markup.Xaml.Data; -using OmniXaml; -using OmniXaml.Typing; -using System.Reflection; - -namespace Avalonia.Markup.Xaml.Context -{ -#if OMNIXAML - public class AvaloniaAttachableXamlMember : AttachableMember - { - public AvaloniaAttachableXamlMember(string name, - XamlType owner, - MethodInfo getter, - MethodInfo setter, - ITypeRepository xamlTypeRepository, - ITypeFeatureProvider featureProvider) - : base(name, getter, setter, xamlTypeRepository, featureProvider) - { - } - - public override string ToString() - { - return "Avalonia Attachable XAML Member " + base.ToString(); - } - - protected override IMemberValuePlugin LookupXamlMemberValueConnector() - { - return new AvaloniaMemberValuePlugin(this); - } - } -#endif -} \ No newline at end of file diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaContentPropertyProvider.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaContentPropertyProvider.cs deleted file mode 100644 index 164d948e10..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaContentPropertyProvider.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Glass; -using OmniXaml; -using OmniXaml.Builder; -using Avalonia.Metadata; - -namespace Avalonia.Markup.Xaml.Context -{ - public class AvaloniaContentPropertyProvider : IContentPropertyProvider - { - private readonly Dictionary _values = new Dictionary(); - - public string GetContentPropertyName(Type type) - { - string result; - - if (!_values.TryGetValue(type, out result)) - { - result = LookupContentProperty(type); - _values[type] = result; - } - - return result; - } - - private string LookupContentProperty(Type type) - { - var result = (from member in type.GetRuntimeProperties() - let att = member.GetCustomAttribute() - where att != null - select member).FirstOrDefault(); - - return result?.Name; - } - - void IAdd.Add(ContentPropertyDefinition item) - { - throw new NotImplementedException(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - throw new NotImplementedException(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - throw new NotImplementedException(); - } - } -} diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaLifeCycleListener.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaLifeCycleListener.cs deleted file mode 100644 index 8b692c98ed..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaLifeCycleListener.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using OmniXaml; - -namespace Avalonia.Markup.Xaml.Context -{ -#if OMNIXAML - public class AvaloniaLifeCycleListener : IInstanceLifeCycleListener - { - public void OnAfterProperties(object instance) - { - } - - public void OnAssociatedToParent(object instance) - { - } - - public void OnBegin(object instance) - { - var isi = instance as ISupportInitialize; - isi?.BeginInit(); - } - - public void OnEnd(object instance) - { - var isi = instance as ISupportInitialize; - isi?.EndInit(); - } - } -#endif -} diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaMemberValuePlugin.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaMemberValuePlugin.cs deleted file mode 100644 index d4a7838169..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaMemberValuePlugin.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using OmniXaml.TypeConversion; -using OmniXaml.Typing; - -namespace Avalonia.Markup.Xaml.Context -{ -#if OMNIXAML - public class AvaloniaMemberValuePlugin : MemberValuePlugin - { - private readonly MutableMember _xamlMember; - - public AvaloniaMemberValuePlugin(MutableMember xamlMember) - : base(xamlMember) - { - _xamlMember = xamlMember; - } - - public override void SetValue(object instance, object value, IValueContext valueContext) - { - PropertyAccessor.SetValue(instance, _xamlMember, value, valueContext); - } - } -#endif -} diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaNamespaceRegistry.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaNamespaceRegistry.cs deleted file mode 100644 index 47b14e15b7..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaNamespaceRegistry.cs +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using OmniXaml.Builder; -using OmniXaml.Typing; -using Avalonia.Controls; -using Avalonia.Markup.Xaml.Templates; -using Avalonia.Media; -using Avalonia.Metadata; -using Avalonia.Platform; -using Avalonia.Styling; -using Glass.Core; - -namespace Avalonia.Markup.Xaml.Context -{ -#if OMNIXAML - public class AvaloniaNamespaceRegistry : INamespaceRegistry - { - private const string ClrNamespace = "clr-namespace:"; - private const string AvaloniaNs = "https://github.com/avaloniaui"; - - private static readonly IEnumerable ForcedAssemblies = new[] - { - typeof(AvaloniaObject).GetTypeInfo().Assembly, - typeof(Control).GetTypeInfo().Assembly, - typeof(Style).GetTypeInfo().Assembly, - typeof(DataTemplate).GetTypeInfo().Assembly, - typeof(SolidColorBrush).GetTypeInfo().Assembly, - typeof(IValueConverter).GetTypeInfo().Assembly, - }; - - private List _clrNamespaces = new List(); - private List _namespaces = new List(); - private Dictionary _prefixes = new Dictionary(); - private List _scanned = new List(); - - public AvaloniaNamespaceRegistry() - { - ScanAssemblies(ForcedAssemblies); - ScanNewAssemblies(); - RegisterPrefix(new PrefixRegistration(string.Empty, AvaloniaNs)); - } - - public IEnumerable RegisteredPrefixes => - _prefixes.Select(x => new PrefixRegistration(x.Key, x.Value)); - - public void AddNamespace(XamlNamespace xamlNamespace) - { - _namespaces.Add(xamlNamespace); - } - - public Namespace GetNamespace(string name) - { - Namespace result; - - if (!IsClrNamespace(name)) - { - ScanNewAssemblies(); - result = _namespaces.FirstOrDefault(x => x.Name == name); - - if (result == null) - { - result = _namespaces.FirstOrDefault(x => x.Name == name); - } - } - else - { - var nsAndAssembly = ParseClrNameSpace(name); - - result = _clrNamespaces.FirstOrDefault(x => - x.Name == nsAndAssembly.Item1 && - x.Assembly.GetName().Name == nsAndAssembly.Item2); - - if (result == null) - { - var clr = CreateClrNamespace(name); - _clrNamespaces.Add(clr); - result = clr; - } - } - - return result; - } - - public Namespace GetNamespaceByPrefix(string prefix) - { - string uri; - - if (_prefixes.TryGetValue(prefix, out uri)) - { - return GetNamespace(uri); - } - - return null; - } - - public void RegisterPrefix(PrefixRegistration prefixRegistration) - { - _prefixes[prefixRegistration.Prefix] = prefixRegistration.Ns; - } - - private static bool IsClrNamespace(string ns) - { - return ns.StartsWith(ClrNamespace); - } - - private static ClrNamespace CreateClrNamespace(string formattedClrString) - { - var nsAndAssembly = ParseClrNameSpace(formattedClrString); - var assembly = GetAssembly(nsAndAssembly.Item2); - - return new ClrNamespace(assembly, nsAndAssembly.Item1); - } - - private static Tuple ParseClrNameSpace(string clrNamespace) - { - var startOfNamespace = clrNamespace.IndexOf(":", StringComparison.Ordinal) + 1; - var endOfNamespace = clrNamespace.IndexOf(";", startOfNamespace, StringComparison.Ordinal); - - if (endOfNamespace < 0) - { - endOfNamespace = clrNamespace.Length - startOfNamespace; - } - - var ns = clrNamespace.Substring(startOfNamespace, endOfNamespace - startOfNamespace); - - var remainingPartStart = startOfNamespace + ns.Length + 1; - var remainingPartLenght = clrNamespace.Length - remainingPartStart; - var assemblyPart = clrNamespace.Substring(remainingPartStart, remainingPartLenght); - - return Tuple.Create(ns, assemblyPart.Dicotomize('=').Item2); - } - - private static Assembly GetAssembly(string assemblyName) - { - return Assembly.Load(new AssemblyName(assemblyName)); - } - - private void ScanAssemblies(IEnumerable assemblies) - { - foreach (var assembly in assemblies) - { - var namespaces = assembly.GetCustomAttributes() - .Select(x => new { x.XmlNamespace, x.ClrNamespace }) - .GroupBy(x => x.XmlNamespace); - - foreach (var nsa in namespaces) - { - var xamlNamespace = _namespaces.FirstOrDefault(x => x.Name == nsa.Key); - - if (xamlNamespace == null) - { - xamlNamespace = new XamlNamespace(nsa.Key); - _namespaces.Add(xamlNamespace); - } - - var clrNamespaces = nsa.Select(x => x.ClrNamespace); - xamlNamespace.Addresses.Add(new ConfiguredAssemblyWithNamespaces(assembly, clrNamespaces)); - } - - _scanned.Add(assembly); - } - } - - private void ScanNewAssemblies() - { - IEnumerable assemblies = AvaloniaLocator.Current - .GetService() - ?.GetLoadedAssemblies(); - - if (assemblies != null) - { - assemblies = assemblies.Except(_scanned); - ScanAssemblies(assemblies); - } - } - } -#endif -} diff --git a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs b/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs deleted file mode 100644 index fefebdd18d..0000000000 --- a/src/Markup/Avalonia.Markup.Xaml/Context/AvaloniaObjectAssembler.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) The Avalonia Project. All rights reserved. -// Licensed under the MIT license. See licence.md file in the project root for full license information. - -using System; -using OmniXaml; -using OmniXaml.ObjectAssembler; -using OmniXaml.ObjectAssembler.Commands; -using OmniXaml.TypeConversion; -using Avalonia.Markup.Xaml.Templates; -using System.Collections.Generic; -using System.Collections.ObjectModel; - -namespace Avalonia.Markup.Xaml.Context -{ -#if OMNIXAML - public class AvaloniaObjectAssembler : IObjectAssembler - { - private readonly TemplateHostingObjectAssembler objectAssembler; - private readonly ObjectAssembler assembler; - - public AvaloniaObjectAssembler( - IRuntimeTypeSource typeSource, - ITopDownValueContext topDownValueContext, - Settings settings = null) - { - var mapping = new DeferredLoaderMapping(); - mapping.Map