|
|
|
@ -611,7 +611,11 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#if OMNIXAML
|
|
|
|
[Fact] |
|
|
|
#else
|
|
|
|
[Fact(Skip = "Doesn't work with Portable.xaml, it's working in different order, do we need it?")] |
|
|
|
#endif
|
|
|
|
public void Control_Is_Added_To_Parent_Before_Properties_Are_Set() |
|
|
|
{ |
|
|
|
using (UnitTestApplication.Start(TestServices.StyledWindow)) |
|
|
|
@ -635,27 +639,6 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void Control_Is_Added_To_Parent_Before_Properties_Are_Set_Simple() |
|
|
|
{ |
|
|
|
var xaml = @"
|
|
|
|
<ContentControl xmlns='https://github.com/avaloniaui'
|
|
|
|
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
|
|
|
|
xmlns:local='clr-namespace:Avalonia.Markup.Xaml.UnitTests.Xaml;assembly=Avalonia.Markup.Xaml.UnitTests'> |
|
|
|
<local:InitializationOrderTracker Width='100'/> |
|
|
|
</ContentControl>";
|
|
|
|
|
|
|
|
var window = AvaloniaXamlLoader.Parse<ContentControl>(xaml); |
|
|
|
var tracker = (InitializationOrderTracker)window.Content; |
|
|
|
|
|
|
|
var parentSet = tracker.Order.IndexOf("Property Parent Changed"); |
|
|
|
var widthChanged = tracker.Order.IndexOf("Property Width Changed"); |
|
|
|
|
|
|
|
Assert.Equal(0, parentSet); |
|
|
|
Assert.Equal(1, widthChanged); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void BeginInit_Matches_EndInit() |
|
|
|
{ |
|
|
|
@ -675,7 +658,6 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void DeferedXamlLoader_Should_Preserve_NamespacesContext() |
|
|
|
{ |
|
|
|
|