63 lines
2.0 KiB
XML
63 lines
2.0 KiB
XML
<?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"
|
|
x:Class="Mear.Views.SongView"
|
|
xmlns:vm="clr-namespace:Mear.ViewModels"
|
|
Title="{Binding Title}">
|
|
|
|
<ContentPage.BindingContext>
|
|
<vm:SongViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<StackLayout>
|
|
<ListView x:Name="SongListView"
|
|
ItemsSource="{Binding SongItems}"
|
|
VerticalOptions="FillAndExpand"
|
|
HasUnevenRows="False"
|
|
IsPullToRefreshEnabled="True"
|
|
RowHeight="75"
|
|
RefreshCommand="{Binding RefreshSongs}"
|
|
ItemSelected="SongListView_ItemSelected" >
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<ViewCell>
|
|
<Grid MinimumHeightRequest="100" Padding="5">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackLayout Grid.Row="0" Grid.Column="0">
|
|
<Label Text="{Binding Title}"
|
|
d:Text="{Binding .}"
|
|
LineBreakMode="NoWrap"
|
|
FontSize="16" />
|
|
<Label Text="{Binding Artist}"
|
|
d:Text="{Binding .}"
|
|
LineBreakMode="NoWrap"
|
|
FontSize="14" />
|
|
</StackLayout>
|
|
<ImageButton x:Name="SongOptions"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
HorizontalOptions="End"
|
|
VerticalOptions="Center"
|
|
HeightRequest="50"
|
|
WidthRequest="80"
|
|
BackgroundColor="Transparent"
|
|
Source="XamarinLogo.png"
|
|
CommandParameter="{Binding Id}"
|
|
Clicked="SongOptions_Clicked" />
|
|
</Grid>
|
|
</ViewCell>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</StackLayout>
|
|
</ContentPage> |