File tree Expand file tree Collapse file tree
src/Avalonia.Controls/Presenters
tests/Avalonia.Markup.Xaml.UnitTests/Xaml Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -364,6 +364,7 @@ public Control? Child
364364 /// <summary>
365365 /// Gets or sets the content to be displayed by the presenter.
366366 /// </summary>
367+ [ Content ]
367368 [ DependsOn ( nameof ( ContentTemplate ) ) ]
368369 public object ? Content
369370 {
Original file line number Diff line number Diff line change @@ -42,6 +42,17 @@ public void Default_Content_Property_Is_Set()
4242 Assert . Equal ( "Foo" , target . Content ) ;
4343 }
4444
45+ [ Fact ]
46+ public void ContentPresenter_Default_Content_Property_Is_Set ( )
47+ {
48+ var xaml = @"<ContentPresenter xmlns='https://github.com/avaloniaui'>Foo</ContentPresenter>" ;
49+
50+ var target = AvaloniaRuntimeXamlLoader . Parse < ContentPresenter > ( xaml ) ;
51+
52+ Assert . NotNull ( target ) ;
53+ Assert . Equal ( "Foo" , target . Content ) ;
54+ }
55+
4556 [ Fact ]
4657 public void Attached_Property_Is_Set ( )
4758 {
You can’t perform that action at this time.
0 commit comments