Browse Source
Merge pull request #1552 from AvaloniaUI/fixes/1548-custom-control-attached-property
Fix attached member namespace resolution
pull/1190/head
Wiesław Šoltés
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
16 additions and
1 deletions
-
src/Markup/Avalonia.Markup.Xaml/PortableXaml/portable.xaml.github
-
tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
|
|
|
@ -1 +1 @@ |
|
|
|
Subproject commit faa952f3a05b4bdf2986d686f4154b1ab084508a |
|
|
|
Subproject commit cdf46d7892def8a6ba29f12a9339147377f7cf5c |
|
|
|
@ -81,6 +81,21 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
|
Assert.Equal(21.0, TextBlock.GetFontSize(target)); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void Attached_Property_Is_Set_On_Control_Outside_Avalonia_Namspace() |
|
|
|
{ |
|
|
|
// Test for issue #1548
|
|
|
|
var xaml = |
|
|
|
@"<UserControl xmlns='https://github.com/avaloniaui'
|
|
|
|
xmlns:local='clr-namespace:Avalonia.Markup.Xaml.UnitTests.Xaml;assembly=Avalonia.Markup.Xaml.UnitTests'> |
|
|
|
<local:TestControl Grid.Column='2' /> |
|
|
|
</UserControl>";
|
|
|
|
|
|
|
|
var target = AvaloniaXamlLoader.Parse<UserControl>(xaml); |
|
|
|
|
|
|
|
Assert.Equal(2, Grid.GetColumn((TestControl)target.Content)); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public void Attached_Property_With_Namespace_Is_Set() |
|
|
|
{ |
|
|
|
|