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>
|
Reference in New Issue
Block a user