Book Image

Xamarin Blueprints

By : Michael Williams
Book Image

Xamarin Blueprints

By: Michael Williams

Overview of this book

Do you want to create powerful, efficient, and independent apps from scratch that will leverage the Xamarin framework and code with C#? Well, look no further; you’ve come to the right place! This is a learn-as-you-build practical guide to building eight full-fledged applications using Xamarin.Forms, Xamarin Android, and Xamarin iOS. Each chapter includes a project, takes you through the process of building applications (such as a gallery Application, a text-to-speech service app, a GPS locator app, and a stock market app), and will show you how to deploy the application’s source code to a Google Cloud Source Repository. Other practical projects include a chat and a media-editing app, as well as other examples fit to adorn any developer’s utility belt. In the course of building applications, this book will teach you how to design and prototype professional-grade applications implementing performance and security considerations.
Table of Contents (14 chapters)
Xamarin Blueprints
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Creating StockItemDetailsPage


Now we move on to our last page of the application. We are going to add another page for displaying the details of a selected stock item from the previous StocklistPage. Firstly, we need to handle items selected from ListView, so open up StocklistPage.xaml and update the ListView element with the SelectedItem object bound to the Selected item in our view-model (we will add this after the XAML update). This will be set as a TwoWay binding because the data will change from both sides (from the view as we selected items, and the view-model as we will need the selected object data when we navigate to the stock details page):

<ListView x:Name="StockItemsListView" 
        IsVisible="{Binding InProgress, Converter={StaticResource notConverter}}" 
        CachingStrategy="RecycleElement"  
        ItemsSource="{Binding StockItems}" 
        ItemTemplate="{StaticResource ListItemTemplate}" 
        SelectedItem="{Binding Selected, Mode=TwoWay...