-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml.cs
74 lines (57 loc) · 1.45 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using ListViewBug.Models;
using System.Security.Cryptography.X509Certificates;
namespace ListViewBug;
public partial class MainPage : ContentPage
{
int count = 0;
public MainPage()
{
InitializeComponent();
var OBJECT1 = new ListViewTextClass()
{
text1 = "This is a test on",
text2 = "Dot NET MAUI"
};
var OBJECT2 = new ListViewTextClass()
{
text1 = "test",
text2 = "2"
};
var listContent = new List<ListViewTextClass>();
listContent.Add(OBJECT1);
listContent.Add(OBJECT2);
testListView.ItemsSource = null;
testListView.ItemsSource = listContent;
Anothertest();
}
public void Anothertest()
{
var OBJECT1 = new ListViewTextClass()
{
text1 = "This is a test on",
text2 = "Dot NET MAUI"
};
var OBJECT2 = new ListViewTextClass()
{
text1 = "test",
text2 = "2"
};
var listContent = new List<ListViewTextClass>();
listContent.Add(OBJECT1);
listContent.Add(OBJECT2);
Dispatcher.Dispatch(() =>
{
testListView.ItemsSource = null;
testListView.ItemsSource = listContent;
});
}
private void OnCounterClicked(object sender, EventArgs e)
{
count++;
if (count == 1)
CounterBtn.Text = $"Clicked {count} time";
else
CounterBtn.Text = $"Clicked {count} times";
SemanticScreenReader.Announce(CounterBtn.Text);
}
}