File tree Expand file tree Collapse file tree
src/Controls/tests/TestCases.HostApp/Issues Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,8 +9,6 @@ public class Issue11812 : ContentPage
99 ContentView _mainContentView ;
1010 public Issue11812 ( )
1111 {
12- this . BindingContext = new Issue11812ViewModel ( ) ;
13-
1412 var button = new Button
1513 {
1614 Text = "Add ContentView" ,
@@ -20,7 +18,7 @@ public Issue11812()
2018 button . Clicked += OnButtonClicked ;
2119
2220 _mainContentView = new ContentView ( ) ;
23- _mainContentView . SetBinding ( ContentView . ContentProperty , " Content" ) ;
21+ _mainContentView . Content = new Issue11812InnerContentView ( ) ;
2422
2523 var layout = new VerticalStackLayout
2624 {
@@ -64,31 +62,4 @@ public Issue11812InnerContentView()
6462 }
6563 Style = ( Style ) Application . Current . Resources [ "SubContentStyle" ] ;
6664 }
67- }
68- public class Issue11812ViewModel : INotifyPropertyChanged
69- {
70- public Issue11812ViewModel ( )
71- {
72- Content = new Issue11812InnerContentView ( ) ;
73- }
74-
75- private Issue11812InnerContentView _content ;
76- public Issue11812InnerContentView Content
77- {
78- get => _content ;
79- set
80- {
81- if ( _content != value )
82- {
83- _content = value ;
84- OnPropertyChanged ( ) ;
85- }
86- }
87- }
88- public event PropertyChangedEventHandler PropertyChanged ;
89-
90- protected virtual void OnPropertyChanged ( [ CallerMemberName ] string propertyName = null )
91- {
92- PropertyChanged ? . Invoke ( this , new PropertyChangedEventArgs ( propertyName ) ) ;
93- }
94- }
65+ }
You can’t perform that action at this time.
0 commit comments