Skip to content

Commit 196b00b

Browse files
committed
Removed Viewmodel code
1 parent e198b4b commit 196b00b

1 file changed

Lines changed: 2 additions & 31 deletions

File tree

src/Controls/tests/TestCases.HostApp/Issues/Issue11812.cs

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff 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+
}

0 commit comments

Comments
 (0)