|
|
@ -27,11 +27,11 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
<Button> |
|
|
<Button> |
|
|
<Button.Template> |
|
|
<Button.Template> |
|
|
<ControlTemplate> |
|
|
<ControlTemplate> |
|
|
<controls:ListBoxHierachyLine> |
|
|
<controls:ListBoxHierarchyLine> |
|
|
<controls:ListBoxHierachyLine.LineDashStyle> |
|
|
<controls:ListBoxHierarchyLine.LineDashStyle> |
|
|
<DashStyle Dashes=""2,2"" Offset=""1"" /> |
|
|
<DashStyle Dashes=""2,2"" Offset=""1"" /> |
|
|
</controls:ListBoxHierachyLine.LineDashStyle> |
|
|
</controls:ListBoxHierarchyLine.LineDashStyle> |
|
|
</controls:ListBoxHierachyLine> |
|
|
</controls:ListBoxHierarchyLine> |
|
|
</ControlTemplate> |
|
|
</ControlTemplate> |
|
|
</Button.Template> |
|
|
</Button.Template> |
|
|
</Button> |
|
|
</Button> |
|
|
@ -41,7 +41,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
|
|
|
|
|
|
window.ApplyTemplate(); |
|
|
window.ApplyTemplate(); |
|
|
button.ApplyTemplate(); |
|
|
button.ApplyTemplate(); |
|
|
var listBoxHierarchyLine = button.GetVisualChildren().ElementAt(0) as ListBoxHierachyLine; |
|
|
var listBoxHierarchyLine = button.GetVisualChildren().ElementAt(0) as ListBoxHierarchyLine; |
|
|
Assert.Equal(1, listBoxHierarchyLine.LineDashStyle.Offset); |
|
|
Assert.Equal(1, listBoxHierarchyLine.LineDashStyle.Offset); |
|
|
Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes.Count); |
|
|
Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes.Count); |
|
|
Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes[0]); |
|
|
Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes[0]); |
|
|
@ -309,10 +309,10 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml |
|
|
Assert.Equal("Bar", bar.Name); |
|
|
Assert.Equal("Bar", bar.Name); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
public class ListBoxHierachyLine : Panel |
|
|
public class ListBoxHierarchyLine : Panel |
|
|
{ |
|
|
{ |
|
|
public static readonly StyledProperty<DashStyle> LineDashStyleProperty = |
|
|
public static readonly StyledProperty<DashStyle> LineDashStyleProperty = |
|
|
AvaloniaProperty.Register<ListBoxHierachyLine, DashStyle>(nameof(LineDashStyle)); |
|
|
AvaloniaProperty.Register<ListBoxHierarchyLine, DashStyle>(nameof(LineDashStyle)); |
|
|
|
|
|
|
|
|
public DashStyle LineDashStyle |
|
|
public DashStyle LineDashStyle |
|
|
{ |
|
|
{ |
|
|
|