-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml.cs
46 lines (39 loc) · 971 Bytes
/
MainPage.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace ListViewBugDemo;
public partial class MainPage : ContentPage, INotifyPropertyChanged
{
public MainPage()
{
InitializeComponent();
BindingContext = this;
}
int count = 1;
private void Button_Clicked(object sender, EventArgs e)
{
count++;
ListView_Items.Add(count.ToString());
}
private bool _Show_IsChecked = false;
public bool Show_IsChecked
{
get
{
return _Show_IsChecked;
}
set
{
_Show_IsChecked = value;
OnPropertyChanged(nameof(Show_IsChecked));
ListView_Items.Add("-- First Row --");
}
}
public int Label_Text
{
get
{
return ListView_Items.Count;
}
}
public ObservableCollection<string> ListView_Items { get; set; } = new ObservableCollection<string>();
}