Initial commit for a party view which displays members and the shared queue
This commit is contained in:
@ -7,6 +7,7 @@ using Aurora.Frontend.Views.Albums;
|
||||
using Aurora.Frontend.Views.Artists;
|
||||
using Aurora.Frontend.Views.Songs;
|
||||
using Aurora.Frontend.Views.Stations;
|
||||
using Aurora.Frontend.Views.Party;
|
||||
|
||||
namespace Aurora.Frontend.Views.MainView
|
||||
{
|
||||
@ -30,7 +31,7 @@ namespace Aurora.Frontend.Views.MainView
|
||||
{
|
||||
_pages = new ObservableCollection<NavigationItem>(new[]
|
||||
{
|
||||
new NavigationItem { Id = 4, Title = "Party", Group="Social", TargetType = typeof(ArtistsView)},
|
||||
new NavigationItem { Id = 4, Title = "Party", Group="Social", TargetType = typeof(PartyView)},
|
||||
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 = 1, Title = "Artists", Group="Library", TargetType = typeof(ArtistsView)},
|
||||
|
23
Aurora/Frontend/Views/Party/PartyView.xaml
Normal file
23
Aurora/Frontend/Views/Party/PartyView.xaml
Normal file
@ -0,0 +1,23 @@
|
||||
<?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:hs="clr-namespace:Aurora.Frontend.Components.HostSelector"
|
||||
xmlns:ml="clr-namespace:Aurora.Frontend.Components.MemberList"
|
||||
x:Class="Aurora.Frontend.Views.Party.PartyView">
|
||||
<ContentView.Content>
|
||||
<AbsoluteLayout
|
||||
VerticalOptions="FillAndExpand"
|
||||
HorizontalOptions="FillAndExpand">
|
||||
<StackLayout>
|
||||
<ml:MemberList
|
||||
Members="{Binding Members}"/>
|
||||
</StackLayout>
|
||||
<hs:HostSelector
|
||||
AbsoluteLayout.LayoutFlags="All"
|
||||
AbsoluteLayout.LayoutBounds="0.5,0.5,0.7,0.7"
|
||||
BackgroundColor="Green"
|
||||
IsVisible="False"/>
|
||||
</AbsoluteLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
15
Aurora/Frontend/Views/Party/PartyView.xaml.cs
Normal file
15
Aurora/Frontend/Views/Party/PartyView.xaml.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Aurora.Frontend.Views.Party
|
||||
{
|
||||
public partial class PartyView : ContentView
|
||||
{
|
||||
public PartyView()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = new PartyViewModel();
|
||||
}
|
||||
}
|
||||
}
|
31
Aurora/Frontend/Views/Party/PartyViewModel.cs
Normal file
31
Aurora/Frontend/Views/Party/PartyViewModel.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace Aurora.Frontend.Views.Party
|
||||
{
|
||||
public class PartyViewModel : BaseViewModel
|
||||
{
|
||||
private ObservableCollection<string> _members;
|
||||
public PartyViewModel()
|
||||
{
|
||||
_members = new ObservableCollection<string>()
|
||||
{
|
||||
"Kevin",
|
||||
"Brandon",
|
||||
"Sheila",
|
||||
"Dale",
|
||||
"Austin",
|
||||
"Tori",
|
||||
"Ashley",
|
||||
"Spencer",
|
||||
};
|
||||
OnPropertyChanged("Members");
|
||||
}
|
||||
|
||||
public ObservableCollection<string> Members
|
||||
{
|
||||
get { return _members; }
|
||||
set { SetProperty(ref _members, value); }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user