parent
9276edf20a
commit
0ec83e2813
@ -1,12 +1,55 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:converters="clr-namespace:App.Converters"
|
||||||
x:Class="App.Pages.ChampionDetailPage"
|
x:Class="App.Pages.ChampionDetailPage"
|
||||||
Title="Champion Page">
|
Title="Champion Page"
|
||||||
<VerticalStackLayout>
|
BackgroundColor="Black">
|
||||||
<Label
|
<ContentPage.ToolbarItems>
|
||||||
Text="{Binding Name}"
|
<ToolbarItem Text="Edit" Clicked="ToolbarItem_Clicked"/>
|
||||||
VerticalOptions="Center"
|
|
||||||
HorizontalOptions="Center" />
|
</ContentPage.ToolbarItems>
|
||||||
</VerticalStackLayout>
|
|
||||||
|
<ContentPage.Resources>
|
||||||
|
<converters:Base64ToImage x:Key="Base64ToImageConv"/>
|
||||||
|
|
||||||
|
<Style TargetType="Label">
|
||||||
|
<Setter Property="TextColor" Value="{StaticResource Primary}"/>
|
||||||
|
</Style>
|
||||||
|
</ContentPage.Resources>
|
||||||
|
|
||||||
|
<ScrollView>
|
||||||
|
<StackLayout Orientation="Vertical">
|
||||||
|
<Image Source="{Binding Path=Image, Converter={StaticResource Base64ToImageConv}}"/>
|
||||||
|
|
||||||
|
<StackLayout Orientation="Horizontal" Padding="0,0,0,20">
|
||||||
|
<Label Text="{Binding Name}"
|
||||||
|
HorizontalOptions="Start"
|
||||||
|
FontSize="Title"/>
|
||||||
|
|
||||||
|
<Image HorizontalOptions="End"/>
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
<Label Text="{Binding Bio}"/>
|
||||||
|
|
||||||
|
<Label Text="Characteristics"
|
||||||
|
FontSize="Title"
|
||||||
|
Padding="0,0,0,20"/>
|
||||||
|
|
||||||
|
<CollectionView ItemsSource="{Binding Characteristics}"
|
||||||
|
ItemsLayout="VerticalGrid, 3">
|
||||||
|
<CollectionView.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Border Margin="10" Stroke="{StaticResource Primary}" StrokeThickness="3">
|
||||||
|
<StackLayout Orientation="Vertical" VerticalOptions="Center">
|
||||||
|
<Label HorizontalOptions="Center" Text="{Binding Key}"/>
|
||||||
|
<Label HorizontalOptions="Center" Text="{Binding Value}"/>
|
||||||
|
</StackLayout>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</CollectionView.ItemTemplate>
|
||||||
|
</CollectionView>
|
||||||
|
</StackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
@ -1,20 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:converters="clr-namespace:App.Converters"
|
||||||
x:Class="App.Pages.ChampionsListPage"
|
x:Class="App.Pages.ChampionsListPage"
|
||||||
Title="Champions">
|
Title="Champions">
|
||||||
<ContentPage.ToolbarItems>
|
<ContentPage.ToolbarItems>
|
||||||
<ToolbarItem Text="Add" Clicked="AddClicked"/>
|
<ToolbarItem Text="Add" Clicked="AddClicked"/>
|
||||||
</ContentPage.ToolbarItems>
|
</ContentPage.ToolbarItems>
|
||||||
|
|
||||||
<ListView ItemsSource="{Binding ChampionVMs}" ItemSelected="ListView_ItemSelected">
|
<ContentPage.Resources>
|
||||||
|
<converters:Base64ToImage x:Key="Base64ToImageConv"/>
|
||||||
|
|
||||||
|
<Style TargetType="Button">
|
||||||
|
<Setter Property="WidthRequest">40</Setter>
|
||||||
|
<Setter Property="HeightRequest">20</Setter>
|
||||||
|
</Style>
|
||||||
|
</ContentPage.Resources>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ListView Grid.Row="0"
|
||||||
|
ItemsSource="{Binding ChampionVMs}"
|
||||||
|
ItemSelected="ListView_ItemSelected"
|
||||||
|
SelectionMode="Single">
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextCell
|
<ViewCell>
|
||||||
Text="{Binding Name}"
|
<SwipeView Grid.Row="0">
|
||||||
Detail="{Binding Bio}">
|
<SwipeView.RightItems>
|
||||||
</TextCell>
|
<SwipeItems>
|
||||||
|
<SwipeItem Text="Delete"
|
||||||
|
BackgroundColor="{StaticResource DeleteColor}"/>
|
||||||
|
<SwipeItem Text="Edit"
|
||||||
|
BackgroundColor="{StaticResource EditColor}"/>
|
||||||
|
</SwipeItems>
|
||||||
|
</SwipeView.RightItems>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="3*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Image Grid.Column="0" Source="{Binding Path=Icon, Converter={StaticResource Base64ToImageConv}}"/>
|
||||||
|
|
||||||
|
<StackLayout Grid.Column="1">
|
||||||
|
<Label Text="{Binding Name}"/>
|
||||||
|
</StackLayout>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</SwipeView>
|
||||||
|
</ViewCell>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
|
<StackLayout Grid.Row="1" Orientation="Horizontal" HorizontalOptions="Center" VerticalOptions="End">
|
||||||
|
<Button Text="<"/>
|
||||||
|
<Label Text="{Binding Index}"/>
|
||||||
|
<Label Text="/"/>
|
||||||
|
<Label Text="{Binding NbPages}"/>
|
||||||
|
<Button Text=">"/>
|
||||||
|
</StackLayout>
|
||||||
|
</Grid>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
|
Loading…
Reference in new issue