Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/prasadsunny1/starterproject

This is a XF starter project to get up and running in no time for new projects. It will be based on Prism with few essensial services like permission connectivity userdialogs and little things that matter
https://github.com/prasadsunny1/starterproject

prism starter-project xamarin-forms

Last synced: 9 days ago
JSON representation

This is a XF starter project to get up and running in no time for new projects. It will be based on Prism with few essensial services like permission connectivity userdialogs and little things that matter

Awesome Lists containing this project

README

        

# Get Up and running with Xamarin.Forms starter project

This is a XF starter project to get up and running in no time for new projects. It will be based on Prism with few essensial services like permission connectivity userdialogs and little things that matter

## How to do that

- Add new pages
- Navigate between pages
- Making an api call
- open alert Dialogs
- open Question dialogs
- Get events passed to ViewModel
- Translation (Internationalization)

### Adding new pages

Best practice is to install visual studio extention called [Prism Template Pack](https://marketplace.visualstudio.com/items?itemName=BrianLagunas.PrismTemplatePack).
It is available for both windows and mac.

### Get events passed to ViewModel

You can move any kind of event to ViewModel as a command's parameter.

- Add namespace to your page/view's root node.
- Add the behaviour as per this example.
- pass EventName="EVENT_NAME"
- for eg i have passed `ItemTapped` for ListView's tap event.
- Can be used simillarly with any other kind of control.

##### YourView.xaml

```xml

.
.
.








```

##### YourViewModel.cs

```c#
public List DataList {get; set;}
public ICommand ItemTappedCommand
{
get
{
return new Command(async (pressedItem) =>
{
Debug.WriteLine(pressedItem);
});
}
}
```