a4276a0d5d
Set up data structures for holding and playing music
51 lines
2.3 KiB
XML
51 lines
2.3 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:songs="clr-namespace:Aurora.Frontend.Views.Songs"
|
|
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
|
x:Class="Aurora.Frontend.Views.Songs.SongsView">
|
|
<ContentPage.BindingContext>
|
|
<songs:SongsViewModel x:Name="songsViewModel"/>
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.Content>
|
|
<dg:DataGrid ItemsSource="{Binding SongsList}" SelectionEnabled="True" SelectedItem="{Binding SelectedSong}"
|
|
RowHeight="30" HeaderHeight="50" BorderColor="#CCCCCC" HeaderBackground="#E0E6F8" >
|
|
|
|
<!-- Header -->
|
|
<dg:DataGrid.HeaderFontSize>
|
|
<OnIdiom x:TypeArguments="x:Double">
|
|
<OnIdiom.Tablet>15</OnIdiom.Tablet>
|
|
<OnIdiom.Phone>13</OnIdiom.Phone>
|
|
<OnIdiom.Desktop>20</OnIdiom.Desktop>
|
|
</OnIdiom>
|
|
</dg:DataGrid.HeaderFontSize>
|
|
|
|
<!-- Columns -->
|
|
<dg:DataGrid.Columns>
|
|
<dg:DataGridColumn Title="" Width="40">
|
|
<dg:DataGridColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Button Text="Play" Command="{Binding PlayCommand}" BindingContext="{x:Reference songsViewModel}" />
|
|
</DataTemplate>
|
|
</dg:DataGridColumn.CellTemplate>
|
|
</dg:DataGridColumn>
|
|
<dg:DataGridColumn Title="Title" PropertyName="Title" Width="2*" />
|
|
<dg:DataGridColumn Title="Album" PropertyName="Album" Width="0.95*"/>
|
|
<dg:DataGridColumn Title="Artist" PropertyName="Artist" Width="1*"/>
|
|
<dg:DataGridColumn Title="Duration" PropertyName="Duration"/>
|
|
</dg:DataGrid.Columns>
|
|
|
|
<!-- Row Colors -->
|
|
<dg:DataGrid.RowsBackgroundColorPalette>
|
|
<dg:PaletteCollection>
|
|
<Color>#F2F2F2</Color>
|
|
<Color>#FFFFFF</Color>
|
|
</dg:PaletteCollection>
|
|
</dg:DataGrid.RowsBackgroundColorPalette>
|
|
|
|
|
|
</dg:DataGrid>
|
|
</ContentPage.Content>
|
|
</ContentPage>
|