First pass at some styling
This commit is contained in:
13
Aurora/Design/Views/MainView/MainView.css
Normal file
13
Aurora/Design/Views/MainView/MainView.css
Normal file
@ -0,0 +1,13 @@
|
||||
^ContentPage {
|
||||
background-color: #232323;
|
||||
}
|
||||
|
||||
#Header {
|
||||
background-color: #232323;
|
||||
}
|
||||
|
||||
#Header > Entry {
|
||||
margin-left: 155;
|
||||
margin-top: 2;
|
||||
margin-bottom: 2;
|
||||
}
|
@ -4,20 +4,50 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:views="clr-namespace:Aurora.Design.Views.MainView"
|
||||
xmlns:navigation="clr-namespace:Aurora.Design.Components.NavigationMenu"
|
||||
xmlns:mp="clr-namespace:Aurora.Design.Components.MediaPlayer"
|
||||
x:Class="Aurora.Design.Views.Main.MainView">
|
||||
<ContentPage.Resources>
|
||||
<StyleSheet
|
||||
Source="MainView.css"/>
|
||||
</ContentPage.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Header-->
|
||||
<StackLayout
|
||||
x:Name="Header"
|
||||
Orientation="Horizontal">
|
||||
<Entry Text="Search"/>
|
||||
</StackLayout>
|
||||
|
||||
<navigation:NavigationMenu
|
||||
<!--Library Grid-->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<navigation:NavigationMenu
|
||||
Grid.Column="0"
|
||||
x:Name="MasterPage"
|
||||
Items="{Binding Pages}"/>
|
||||
|
||||
<views:PageContainer
|
||||
Grid.Column="1"
|
||||
x:Name="ContentPage"/>
|
||||
<views:PageContainer
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
x:Name="ContentPage"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Music Player-->
|
||||
<mp:Player
|
||||
x:Name="Player"
|
||||
Grid.Row="2"
|
||||
HorizontalOptions="Center"
|
||||
HeightRequest="50"/>
|
||||
</Grid>
|
||||
|
||||
</ContentPage>
|
@ -33,7 +33,7 @@ namespace Aurora.Design.Views.Main
|
||||
BindingContext = new MainViewModel();
|
||||
_viewModels = new Dictionary<int, BaseViewModel>();
|
||||
|
||||
_player = (Player)ContentPage.FindByName("Player");
|
||||
_player = Player;
|
||||
_viewContent = (ContentPresenter)ContentPage.Content.FindByName("ViewContent");
|
||||
|
||||
MasterPage.ListView.ItemSelected += OnNavItemSelected;
|
||||
|
@ -32,12 +32,13 @@ namespace Aurora.Design.Views.MainView
|
||||
{
|
||||
_pages = new ObservableCollection<NavigationItem>(new[]
|
||||
{
|
||||
new NavigationItem { Id = 0, Title = "Songs", Group="Library", TargetType = typeof(SongsView), TargetViewModelType = typeof(SongsViewModel) },
|
||||
new NavigationItem { Id = 1, Title = "Artists", Group="Library", TargetType = typeof(ArtistsView), TargetViewModelType = typeof(ArtistsViewModel)},
|
||||
new NavigationItem { Id = 2, Title = "Albums", Group="Library", TargetType = typeof(AlbumsView), TargetViewModelType = typeof(AlbumsViewModel)},
|
||||
new NavigationItem { Id = 3, Title = "Stations", Group="Library", TargetType = typeof(StationsView), TargetViewModelType = typeof(StationsViewModel)},
|
||||
new NavigationItem { Id = 0, Title = "Songs", Group="Your Music", TargetType = typeof(SongsView), TargetViewModelType = typeof(SongsViewModel) },
|
||||
new NavigationItem { Id = 1, Title = "Artists", Group="Your Music", TargetType = typeof(ArtistsView), TargetViewModelType = typeof(ArtistsViewModel)},
|
||||
new NavigationItem { Id = 2, Title = "Albums", Group="Your Music", TargetType = typeof(AlbumsView), TargetViewModelType = typeof(AlbumsViewModel)},
|
||||
new NavigationItem { Id = 3, Title = "Stations", Group="Your Music", TargetType = typeof(StationsView), TargetViewModelType = typeof(StationsViewModel)},
|
||||
new NavigationItem { Id = 4, Title = "Party", Group="Social", TargetType = typeof(PartyView), TargetViewModelType = typeof(PartyViewModel)},
|
||||
new NavigationItem { Id = 5, Title = "Profile", Group="Social", TargetType = typeof(ProfileView), TargetViewModelType = typeof(ProfileViewModel)},
|
||||
new NavigationItem { Id = 6, Title = "A + B", Group="Playlists", TargetType = typeof(StationsView), TargetViewModelType = typeof(StationsViewModel)}
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -1,28 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:components="clr-namespace:Aurora.Design.Components"
|
||||
xmlns:mp="clr-namespace:Aurora.Design.Components.MediaPlayer"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Aurora.Design.Views.MainView.PageContainer">
|
||||
<ContentView.Content>
|
||||
<Grid
|
||||
x:Name="Grid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition
|
||||
Height="*"/>
|
||||
<RowDefinition
|
||||
Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ContentPresenter
|
||||
Grid.Row="0"
|
||||
x:Name="ViewContent"/>
|
||||
<mp:Player
|
||||
x:Name="Player"
|
||||
Grid.Row="1"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="End"
|
||||
HeightRequest="200"/>
|
||||
|
||||
</Grid>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
@ -4,8 +4,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:hs="clr-namespace:Aurora.Design.Components.HostSelector"
|
||||
xmlns:ml="clr-namespace:Aurora.Design.Components.MemberList"
|
||||
xmlns:renderedViews="clr-namespace:Sharpnado.Presentation.Forms.RenderedViews;assembly=Sharpnado.Presentation.Forms"
|
||||
xmlns:qu="clr-namespace:Aurora.Design.Components.Queue"
|
||||
xmlns:library="clr-namespace:Aurora.Design.Components.Library"
|
||||
x:Class="Aurora.Design.Views.Party.PartyView">
|
||||
<ContentView.Content>
|
||||
<Grid>
|
||||
@ -23,7 +22,7 @@
|
||||
Members="{Binding Members}"/>
|
||||
<Label
|
||||
Text="Queue"/>
|
||||
<qu:Queue
|
||||
<library:Library
|
||||
ItemsSource="{Binding Queue}"
|
||||
SelectedItem="{Binding SelectedSong}"
|
||||
ItemDoubleClicked="{Binding PlayCommand}"/>
|
||||
|
@ -2,54 +2,12 @@
|
||||
<ContentView
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:songs="clr-namespace:Aurora.Design.Views.Songs"
|
||||
xmlns:dg="clr-namespace:Xamarin.Forms.DataGrid;assembly=Xamarin.Forms.DataGrid"
|
||||
xmlns:library="clr-namespace:Aurora.Design.Components.Library"
|
||||
x:Class="Aurora.Design.Views.Songs.SongsView">
|
||||
<ContentPage.Content>
|
||||
<dg:DataGrid
|
||||
ItemsSource="{Binding SongsList}"
|
||||
SelectionEnabled="True"
|
||||
SelectedItem="{Binding SelectedSong}"
|
||||
RowHeight="30"
|
||||
HeaderHeight="50"
|
||||
BorderColor="#CCCCCC"
|
||||
HeaderBackground="#E0E6F8">
|
||||
<dg:DataGrid.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding PlayCommand}"
|
||||
NumberOfTapsRequired="2"/>
|
||||
</dg:DataGrid.GestureRecognizers><!-- 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="Title"
|
||||
PropertyName="Metadata.Title"
|
||||
Width="2*"/>
|
||||
<dg:DataGridColumn
|
||||
Title="Album"
|
||||
PropertyName="Metadata.Album"
|
||||
Width="0.95*"/>
|
||||
<dg:DataGridColumn
|
||||
Title="Artist"
|
||||
PropertyName="Metadata.Artist"
|
||||
Width="1*"/>
|
||||
<dg:DataGridColumn
|
||||
Title="Duration"
|
||||
PropertyName="Metadata.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>
|
||||
<ContentView.Content>
|
||||
<library:Library
|
||||
ItemsSource="{Binding SongsList}"
|
||||
SelectedItem="{Binding SelectedSong}"
|
||||
ItemDoubleClicked="{Binding PlayCommand}"/>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
Reference in New Issue
Block a user