Created
November 21, 2019 13:30
-
-
Save icebeam7/414ef41f574c88b12467474be5e50f62 to your computer and use it in GitHub Desktop.
MVVMDemo: ListProductView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" | |
xmlns:local="clr-namespace:MVVMDemo.Views" | |
x:Class="MVVMDemo.Views.ListProductView"> | |
<ContentPage.Content> | |
<StackLayout Margin="10"> | |
<Button Text="Go To Details" | |
Command="{Binding GoToDetailsCommand}" | |
CommandParameter="{x:Type local:ProductView}"/> | |
<ListView ItemsSource="{Binding Products}" | |
SelectedItem="{Binding SelectedProduct}"> | |
<ListView.ItemTemplate> | |
<DataTemplate> | |
<TextCell Text="{Binding Name}" | |
Detail="{Binding Price, StringFormat='Price: {0:N2}'}"/> | |
</DataTemplate> | |
</ListView.ItemTemplate> | |
</ListView> | |
</StackLayout> | |
</ContentPage.Content> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment