Skip to content

Commit 17393d3

Browse files
author
AnanthaLakshmiKannan
committed
UG DOC 831881: Added sample for Listview - Itemsreordering - DragViewIndicator
1 parent fec502e commit 17393d3

File tree

4 files changed

+6
-39
lines changed

4 files changed

+6
-39
lines changed

ListViewMaui.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31611.283
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListViewMaui", "ListViewMaui.csproj", "{A048F7BA-4478-4198-8D7A-B1F9EFC01B24}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListViewMaui", "ListViewMaui\ListViewMaui.csproj", "{A048F7BA-4478-4198-8D7A-B1F9EFC01B24}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

ListViewMaui/ListViewMaui.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050

5151
<ItemGroup>
5252
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
53+
<PackageReference Include="Syncfusion.Maui.Core" Version="*" />
54+
<PackageReference Include="Syncfusion.Maui.DataSource" Version="*" />
55+
<PackageReference Include="Syncfusion.Maui.GridCommon" Version="*" />
5356
<PackageReference Include="Syncfusion.Maui.ListView" Version="*" />
5457
</ItemGroup>
5558

ListViewMaui/Model/ToDoListRepository.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public ToDoListRepository()
2323
internal ObservableCollection<ToDoItem> GetToDoList()
2424
{
2525
var todoList = new ObservableCollection<ToDoItem>();
26-
var random = new Random();
2726

2827
for (int i = 0; i < toDoLists.Count(); i++)
2928
{

ListViewMaui/ViewModel/ViewModel.cs

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@
88

99
namespace ListViewMaui
1010
{
11-
public class ViewModel : INotifyPropertyChanged
11+
public class ViewModel
1212
{
1313
#region Fields
1414

1515
private ObservableCollection<ToDoItem> toDoList;
1616

17-
private Command<object> markDoneCommand;
18-
private bool isVisible;
19-
2017
#endregion
2118

2219
#region Constructor
@@ -39,18 +36,7 @@ private void MarkItemAsDone(object obj)
3936

4037
public Command<object> MarkDoneCommand
4138
{
42-
get
43-
{
44-
return markDoneCommand;
45-
}
46-
set
47-
{
48-
if (markDoneCommand != value)
49-
{
50-
markDoneCommand = value;
51-
OnPropertyChanged("MarkDoneCommand");
52-
}
53-
}
39+
get; set;
5440
}
5541

5642
public ObservableCollection<ToDoItem> ToDoList
@@ -65,19 +51,6 @@ public ObservableCollection<ToDoItem> ToDoList
6551
}
6652
}
6753

68-
public bool IsVisible
69-
{
70-
get
71-
{
72-
return isVisible;
73-
}
74-
set
75-
{
76-
isVisible = value;
77-
OnPropertyChanged("IsVisible");
78-
}
79-
}
80-
8154
#endregion
8255

8356
#region Method
@@ -88,14 +61,6 @@ public void GenerateSource()
8861
toDoList = todoRepository.GetToDoList();
8962
}
9063

91-
public event PropertyChangedEventHandler PropertyChanged;
92-
93-
public void OnPropertyChanged(string name)
94-
{
95-
if (this.PropertyChanged != null)
96-
this.PropertyChanged(this, new PropertyChangedEventArgs(name));
97-
}
98-
9964
#endregion
10065
}
10166
}

0 commit comments

Comments
 (0)