|
|
@ -6,12 +6,17 @@
|
|
|
|
x:Class="App.Pages.ChampionsListPage"
|
|
|
|
x:Class="App.Pages.ChampionsListPage"
|
|
|
|
Title="Champions">
|
|
|
|
Title="Champions">
|
|
|
|
<ContentPage.ToolbarItems>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
|
|
<ToolbarItem Text="Add" Command="{Binding NaviagteToChampionAddEditPageCommand}"/>
|
|
|
|
<ToolbarItem Text="Add"
|
|
|
|
|
|
|
|
Command="{Binding NaviagteToChampionAddEditPageCommand}"/>
|
|
|
|
</ContentPage.ToolbarItems>
|
|
|
|
</ContentPage.ToolbarItems>
|
|
|
|
|
|
|
|
|
|
|
|
<ContentPage.Resources>
|
|
|
|
<ContentPage.Resources>
|
|
|
|
<converters:Base64ToImage x:Key="Base64ToImageConv"/>
|
|
|
|
<converters:Base64ToImage x:Key="Base64ToImageConv"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ResourceDictionary>
|
|
|
|
|
|
|
|
<toolkit:SelectedItemEventArgsConverter x:Key="SelectedItemEventArgsConverter" />
|
|
|
|
|
|
|
|
</ResourceDictionary>
|
|
|
|
|
|
|
|
|
|
|
|
<Style TargetType="Button">
|
|
|
|
<Style TargetType="Button">
|
|
|
|
<Setter Property="WidthRequest">40</Setter>
|
|
|
|
<Setter Property="WidthRequest">40</Setter>
|
|
|
|
<Setter Property="HeightRequest">20</Setter>
|
|
|
|
<Setter Property="HeightRequest">20</Setter>
|
|
|
@ -29,10 +34,11 @@
|
|
|
|
SelectionMode="Single">
|
|
|
|
SelectionMode="Single">
|
|
|
|
<ListView.Behaviors>
|
|
|
|
<ListView.Behaviors>
|
|
|
|
<toolkit:EventToCommandBehavior
|
|
|
|
<toolkit:EventToCommandBehavior
|
|
|
|
|
|
|
|
x:TypeArguments="SelectedItemChangedEventArgs"
|
|
|
|
EventName="ItemSelected"
|
|
|
|
EventName="ItemSelected"
|
|
|
|
Command="{Binding NavigateToChampionDetailCommand}"/>
|
|
|
|
Command="{Binding NavigateToChampionDetailCommand}"/>
|
|
|
|
|
|
|
|
|
|
|
|
</ListView.Behaviors>
|
|
|
|
</ListView.Behaviors>
|
|
|
|
|
|
|
|
|
|
|
|
<ListView.ItemTemplate>
|
|
|
|
<ListView.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<ViewCell>
|
|
|
|
<ViewCell>
|
|
|
@ -40,25 +46,24 @@
|
|
|
|
<SwipeView.RightItems>
|
|
|
|
<SwipeView.RightItems>
|
|
|
|
<SwipeItems>
|
|
|
|
<SwipeItems>
|
|
|
|
<SwipeItem Text="Delete"
|
|
|
|
<SwipeItem Text="Delete"
|
|
|
|
BackgroundColor="{StaticResource DeleteColor}"/>
|
|
|
|
BackgroundColor="{StaticResource DeleteColor}"
|
|
|
|
|
|
|
|
IsDestructive="True"/>
|
|
|
|
<SwipeItem Text="Edit"
|
|
|
|
<SwipeItem Text="Edit"
|
|
|
|
BackgroundColor="{StaticResource EditColor}"/>
|
|
|
|
BackgroundColor="{StaticResource EditColor}"
|
|
|
|
|
|
|
|
Command="{Binding NaviagteToChampionAddEditPageCommand}"
|
|
|
|
|
|
|
|
CommandParameter="{Binding .}"/>
|
|
|
|
</SwipeItems>
|
|
|
|
</SwipeItems>
|
|
|
|
</SwipeView.RightItems>
|
|
|
|
</SwipeView.RightItems>
|
|
|
|
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
<SwipeView.Content>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<StackLayout Orientation="Horizontal" Padding="10">
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<Image Source="{Binding Path=Icon, Converter={StaticResource Base64ToImageConv}}"/>
|
|
|
|
<ColumnDefinition Width="3*"/>
|
|
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Image Grid.Column="0" Source="{Binding Path=Icon, Converter={StaticResource Base64ToImageConv}}"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<StackLayout Grid.Column="1">
|
|
|
|
<StackLayout Grid.Column="1">
|
|
|
|
<Label Text="{Binding Name}"/>
|
|
|
|
<Label Text="{Binding Name}"/>
|
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
</Grid>
|
|
|
|
</StackLayout>
|
|
|
|
|
|
|
|
</SwipeView.Content>
|
|
|
|
</SwipeView>
|
|
|
|
</SwipeView>
|
|
|
|
</ViewCell>
|
|
|
|
</ViewCell>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataTemplate>
|
|
|
|