parent
9276edf20a
commit
0ec83e2813
@ -1,12 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:converters="clr-namespace:App.Converters"
|
||||
x:Class="App.Pages.ChampionDetailPage"
|
||||
Title="Champion Page">
|
||||
<VerticalStackLayout>
|
||||
<Label
|
||||
Text="{Binding Name}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center" />
|
||||
</VerticalStackLayout>
|
||||
Title="Champion Page"
|
||||
BackgroundColor="Black">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Text="Edit" Clicked="ToolbarItem_Clicked"/>
|
||||
|
||||
</ContentPage.ToolbarItems>
|
||||
|
||||
<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>
|
||||
|
@ -1,20 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:converters="clr-namespace:App.Converters"
|
||||
x:Class="App.Pages.ChampionsListPage"
|
||||
Title="Champions">
|
||||
<ContentPage.ToolbarItems>
|
||||
<ToolbarItem Text="Add" Clicked="AddClicked"/>
|
||||
</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>
|
||||
<DataTemplate>
|
||||
<TextCell
|
||||
Text="{Binding Name}"
|
||||
Detail="{Binding Bio}">
|
||||
</TextCell>
|
||||
<ViewCell>
|
||||
<SwipeView Grid.Row="0">
|
||||
<SwipeView.RightItems>
|
||||
<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>
|
||||
</ListView.ItemTemplate>
|
||||
</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>
|
||||
|
Loading…
Reference in new issue