|
|
@ -2,22 +2,28 @@ |
|
|
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" |
|
|
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
|
|
|
xmlns:common="clr-namespace:XamarinStudy.Commons;assembly=XamarinStudy" |
|
|
|
xmlns:common="clr-namespace:XamarinStudy.Commons;assembly=XamarinStudy" |
|
|
|
x:Class="XamarinStudy.Views.ToyMartPage"> |
|
|
|
x:Class="XamarinStudy.Views.ToyMartPage" |
|
|
|
|
|
|
|
Title="Toy Mart"> |
|
|
|
<ContentPage.Resources> |
|
|
|
<ContentPage.Resources> |
|
|
|
<ResourceDictionary> |
|
|
|
<ResourceDictionary> |
|
|
|
<common:ValueConverter x:Key="cvt"/> |
|
|
|
<common:ValueConverter x:Key="cvt"/> |
|
|
|
</ResourceDictionary> |
|
|
|
</ResourceDictionary> |
|
|
|
</ContentPage.Resources> |
|
|
|
</ContentPage.Resources> |
|
|
|
|
|
|
|
<ContentPage.ToolbarItems> |
|
|
|
|
|
|
|
<ToolbarItem x:Name="orderToolbarItem" Text="Order" Clicked="orderToolbarItem_Clicked"/> |
|
|
|
|
|
|
|
<ToolbarItem x:Name="unselectAllToolbarItem" Text="Unselect All" Clicked="unselectAllToolbarItem_Clicked"/> |
|
|
|
|
|
|
|
</ContentPage.ToolbarItems> |
|
|
|
<ContentPage.Content> |
|
|
|
<ContentPage.Content> |
|
|
|
<ListView x:Name="menuListView" ItemsSource="{Binding .}" HasUnevenRows="True" IsGroupingEnabled="True" GroupDisplayBinding="{Binding Title}"> |
|
|
|
<ListView x:Name="menuListView" ItemsSource="{Binding .}" |
|
|
|
|
|
|
|
HasUnevenRows="True" IsGroupingEnabled="True" GroupDisplayBinding="{Binding Title}" |
|
|
|
|
|
|
|
IsPullToRefreshEnabled="True" Refreshing="menuListView_Refreshing" |
|
|
|
|
|
|
|
ItemTapped="menuListView_ItemTapped"> |
|
|
|
<ListView.GroupHeaderTemplate> |
|
|
|
<ListView.GroupHeaderTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<ViewCell> |
|
|
|
<ViewCell> |
|
|
|
<StackLayout Orientation="Horizontal" BackgroundColor="DarkSlateBlue" Padding="2 10"> |
|
|
|
<StackLayout Orientation="Horizontal" BackgroundColor="DarkSlateBlue"> |
|
|
|
<Label Text="{Binding Title}" FontSize="Large" TextColor="White"/> |
|
|
|
<Label Text="{Binding Title}" HorizontalOptions="StartAndExpand" FontSize="Large" TextColor="White"/> |
|
|
|
<Label Text=": " FontSize="Large" TextColor="White"/> |
|
|
|
|
|
|
|
<Label Text="{Binding Count}" FontSize="Large" TextColor="White"/> |
|
|
|
<Label Text="{Binding Count}" FontSize="Large" TextColor="White"/> |
|
|
|
<Label Text="ea" FontSize="Large" TextColor="White"/> |
|
|
|
|
|
|
|
</StackLayout> |
|
|
|
</StackLayout> |
|
|
|
</ViewCell> |
|
|
|
</ViewCell> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
@ -29,7 +35,7 @@ |
|
|
|
<Image Source="{Binding Image, Converter={StaticResource cvt}}" WidthRequest="50" HeightRequest="50"/> |
|
|
|
<Image Source="{Binding Image, Converter={StaticResource cvt}}" WidthRequest="50" HeightRequest="50"/> |
|
|
|
<Label Text="{Binding Name}" FontSize="Large" VerticalTextAlignment="Center" HorizontalOptions="FillAndExpand"/> |
|
|
|
<Label Text="{Binding Name}" FontSize="Large" VerticalTextAlignment="Center" HorizontalOptions="FillAndExpand"/> |
|
|
|
<Label Text="{Binding Price}" FontSize="Medium" VerticalTextAlignment="Center" HorizontalOptions="FillAndExpand"/> |
|
|
|
<Label Text="{Binding Price}" FontSize="Medium" VerticalTextAlignment="Center" HorizontalOptions="FillAndExpand"/> |
|
|
|
<CheckBox IsChecked="{Binding Checked}"/> |
|
|
|
<CheckBox IsChecked="{Binding IsChecked}"/> |
|
|
|
</StackLayout> |
|
|
|
</StackLayout> |
|
|
|
</ViewCell> |
|
|
|
</ViewCell> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|