Double click to play a song in the library
This commit is contained in:
parent
64c2285817
commit
9354c0b27b
@ -13,15 +13,15 @@ namespace Aurora.Frontend.Views.MainView
|
|||||||
public class MainViewModel : BaseViewModel
|
public class MainViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
private ObservableCollection<NavigationItem> _pages;
|
private ObservableCollection<NavigationItem> _pages;
|
||||||
public ObservableCollection<NavigationItem> Pages
|
public ObservableCollection<NavigationItem> Pages
|
||||||
{
|
{
|
||||||
get { return _pages; }
|
get { return _pages; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if(value != _pages)
|
if (value != _pages)
|
||||||
{
|
{
|
||||||
_pages = value;
|
_pages = value;
|
||||||
OnPropertyChanged("Pages");
|
OnPropertyChanged("Pages");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -30,11 +30,12 @@ namespace Aurora.Frontend.Views.MainView
|
|||||||
{
|
{
|
||||||
_pages = new ObservableCollection<NavigationItem>(new[]
|
_pages = new ObservableCollection<NavigationItem>(new[]
|
||||||
{
|
{
|
||||||
|
new NavigationItem { Id = 4, Title = "Party", Group="Social", TargetType = typeof(ArtistsView)},
|
||||||
|
new NavigationItem { Id = 5, Title = "Profile", Group="Social", TargetType = typeof(ArtistsView)},
|
||||||
new NavigationItem { Id = 0, Title = "Songs", Group="Library", TargetType = typeof(SongsView) },
|
new NavigationItem { Id = 0, Title = "Songs", Group="Library", TargetType = typeof(SongsView) },
|
||||||
new NavigationItem { Id = 1, Title = "Artists", Group="Library", TargetType = typeof(ArtistsView)},
|
new NavigationItem { Id = 1, Title = "Artists", Group="Library", TargetType = typeof(ArtistsView)},
|
||||||
new NavigationItem { Id = 2, Title = "Albums", Group="Library", TargetType = typeof(AlbumsView)},
|
new NavigationItem { Id = 2, Title = "Albums", Group="Library", TargetType = typeof(AlbumsView)},
|
||||||
new NavigationItem { Id = 3, Title = "Stations", Group="Library", TargetType = typeof(StationsView)},
|
new NavigationItem { Id = 3, Title = "Stations", Group="Library", TargetType = typeof(StationsView)},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,12 @@
|
|||||||
RowHeight="30"
|
RowHeight="30"
|
||||||
HeaderHeight="50"
|
HeaderHeight="50"
|
||||||
BorderColor="#CCCCCC"
|
BorderColor="#CCCCCC"
|
||||||
HeaderBackground="#E0E6F8"><!-- Header -->
|
HeaderBackground="#E0E6F8">
|
||||||
|
<dg:DataGrid.GestureRecognizers>
|
||||||
|
<TapGestureRecognizer
|
||||||
|
Command="{Binding PlayCommand}"
|
||||||
|
NumberOfTapsRequired="2"/>
|
||||||
|
</dg:DataGrid.GestureRecognizers><!-- Header -->
|
||||||
<dg:DataGrid.HeaderFontSize>
|
<dg:DataGrid.HeaderFontSize>
|
||||||
<OnIdiom
|
<OnIdiom
|
||||||
x:TypeArguments="x:Double">
|
x:TypeArguments="x:Double">
|
||||||
@ -27,18 +32,6 @@
|
|||||||
</OnIdiom>
|
</OnIdiom>
|
||||||
</dg:DataGrid.HeaderFontSize><!-- Columns -->
|
</dg:DataGrid.HeaderFontSize><!-- Columns -->
|
||||||
<dg:DataGrid.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
|
<dg:DataGridColumn
|
||||||
Title="Title"
|
Title="Title"
|
||||||
PropertyName="Metadata.Title"
|
PropertyName="Metadata.Title"
|
||||||
|
Reference in New Issue
Block a user