Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RiyashameedM committed Sep 6, 2023
1 parent bfd3a81 commit 8d75c38
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,77 @@
# how-to-bind-data-using-freshMvvm-in-.net-maui-listview

This demo explains about how to bind the data using FreshMVVM in .NET MAUI ListView

## C#

//Model.cs
public class Contacts : FreshBasePageModel
{
private string contactName;
private string contactNumber;
private ImageSource image;

public Contacts(string name, string number)
{
contactName = name;
contactNumber = number;
}

public Contacts()
{

}

public string ContactName
{
get { return contactName; }
set
{
if (contactName != value)
{
contactName = value;
this.RaisePropertyChanged();
}
}
}

public string ContactNumber
{
get { return contactNumber; }
set
{
if (contactNumber != value)
{
contactNumber = value;
this.RaisePropertyChanged();
}
}
}

public ImageSource ContactImage
{
get { return this.image; }
set
{
this.image = value;
this.RaisePropertyChanged();
}
}
}

// ViewModel.cs
public class ListViewPageModel : FreshBasePageModel
{
---
}

## Requirements to run the demo

* [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/) or [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/)
* Xamarin add-ons for Visual Studio (available via the Visual Studio installer).

## Troubleshooting

### Path too long exception

If you are facing path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

0 comments on commit 8d75c38

Please sign in to comment.