diff --git a/Aurora/Aurora.csproj b/Aurora/Aurora.csproj
index ad3b7f1..99cc804 100644
--- a/Aurora/Aurora.csproj
+++ b/Aurora/Aurora.csproj
@@ -30,10 +30,12 @@
-
+
+
+
diff --git a/Aurora/Frontend/Components/ContentPresenter.cs b/Aurora/Frontend/Components/ContentPresenter.cs
deleted file mode 100644
index 8fd6fa6..0000000
--- a/Aurora/Frontend/Components/ContentPresenter.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using Xamarin.Forms;
-
-namespace Aurora.Frontend.Components
-{
- public class ContentPresenter : ContentView
- {
- public static readonly BindableProperty ItemTemplateProperty = BindableProperty.Create("ItemTemplate", typeof(DataTemplate), typeof(ContentPresenter), null, propertyChanged: OnItemTemplateChanged);
-
- private static void OnItemTemplateChanged(BindableObject bindable, object oldvalue, object newvalue)
- {
- var cp = (ContentPresenter)bindable;
-
- var template = cp.ItemTemplate;
- if (template != null)
- {
- var content = (View)template.CreateContent();
- cp.Content = content;
- }
- else
- {
- cp.Content = null;
- }
- }
-
- public DataTemplate ItemTemplate
- {
- get
- {
- return (DataTemplate)GetValue(ItemTemplateProperty);
- }
- set
- {
- SetValue(ItemTemplateProperty, value);
- }
- }
- }
-}
diff --git a/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs b/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs
index 0766b6f..446718f 100755
--- a/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs
+++ b/Aurora/Frontend/Components/HorizontalList/HorizontalList.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Windows.Input;
using Xamarin.Forms;
-namespace Movies.Controls
+namespace Aurora.Frontend.Components.HorizontalList
{
public class HorizontalList : Grid
{
@@ -62,7 +62,7 @@ namespace Movies.Controls
public HorizontalList()
{
- BackgroundColor = Color.FromHex("#1E2634");
+ // BackgroundColor = Color.FromHex("#1E2634");
Spacing = 6;
_scrollView = new ScrollView();
_itemsStackLayout = new StackLayout
@@ -83,7 +83,7 @@ namespace Movies.Controls
_itemsStackLayout.Children.Clear();
_itemsStackLayout.Spacing = Spacing;
- _innerSelectedCommand = new Command(view =>
+ _innerSelectedCommand = new Command(view =>
{
SelectedItem = view.BindingContext;
SelectedItem = null; // Allowing item second time selection
diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml
new file mode 100644
index 0000000..6b0144d
--- /dev/null
+++ b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
diff --git a/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs
new file mode 100644
index 0000000..8ccd5b0
--- /dev/null
+++ b/Aurora/Frontend/Components/HostSelector/HostSelector.xaml.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+
+namespace Aurora.Frontend.Components.HostSelector
+{
+ public partial class HostSelector : ContentView
+ {
+ public HostSelector()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Aurora/Frontend/Components/MemberList/MemberList.xaml b/Aurora/Frontend/Components/MemberList/MemberList.xaml
new file mode 100644
index 0000000..8d5b576
--- /dev/null
+++ b/Aurora/Frontend/Components/MemberList/MemberList.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Aurora/Frontend/Components/MemberList/MemberList.xaml.cs b/Aurora/Frontend/Components/MemberList/MemberList.xaml.cs
new file mode 100644
index 0000000..01d4e7d
--- /dev/null
+++ b/Aurora/Frontend/Components/MemberList/MemberList.xaml.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using Aurora.Frontend.Components.HorizontalList;
+
+namespace Aurora.Frontend.Components.MemberList
+{
+ public partial class MemberList : ContentView
+ {
+ public MemberList()
+ {
+ InitializeComponent();
+
+ }
+
+ ///
+ /// Bindable property for members list.
+ ///
+ ///
+ ///
+ ///
+ public static readonly BindableProperty MembersProperty =
+ BindableProperty.Create(propertyName: "Members",
+ returnType: typeof(IEnumerable),
+ declaringType: typeof(MemberList),
+ defaultBindingMode: BindingMode.Default,
+ propertyChanged: OnMembersChanged);
+
+ ///
+ /// Backing property for MembersProperty
+ ///
+ ///
+ public IEnumerable Members
+ {
+ get
+ {
+ return (IEnumerable)GetValue(MembersProperty);
+ }
+ set
+ {
+ SetValue(MembersProperty, value);
+ }
+ }
+
+ ///
+ /// Memberes changed event handler. Assign member list source.
+ ///
+ ///
+ ///
+ ///
+ private static void OnMembersChanged(BindableObject bindable, object oldValue, object newValue)
+ {
+ var control = (MemberList)bindable;
+ var membersList = control.FindByName("MembersHorizontalList") as HorizontalList.HorizontalList;
+ if (membersList != null)
+ {
+ membersList.ItemsSource = newValue as IEnumerable;
+ }
+ }
+ }
+}
diff --git a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs b/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs
index 98f4124..150d282 100644
--- a/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs
+++ b/Aurora/Frontend/Components/NavigationMenu/NavigationMenu.xaml.cs
@@ -24,16 +24,22 @@ namespace Aurora.Frontend.Components.NavigationMenu
public ObservableCollection Items
{
- get
- {
- return (ObservableCollection)GetValue(ItemsProperty);
+ get
+ {
+ return (ObservableCollection)GetValue(ItemsProperty);
}
- set
- {
- SetValue(ItemsProperty, value);
+ set
+ {
+ SetValue(ItemsProperty, value);
}
}
+ ///
+ /// Items changed event handler. Organizes items in groups for display.
+ ///
+ /// The changed Item.
+ /// The previous value.
+ /// The new value.
private static void OnItemsChanged(BindableObject bindable, object oldValue, object newValue)
{
var control = (NavigationMenu)bindable;
@@ -41,9 +47,9 @@ namespace Aurora.Frontend.Components.NavigationMenu
Dictionary groupDictioanry = new Dictionary();
//Populate dictionary where group heading is the key
- foreach(NavigationItem item in items)
- {
- if(groupDictioanry.ContainsKey(item.Group))
+ foreach (NavigationItem item in items)
+ {
+ if (groupDictioanry.ContainsKey(item.Group))
{
groupDictioanry.TryGetValue(item.Group, out var groupItem);
groupItem.Items.Add(item);
@@ -58,7 +64,7 @@ namespace Aurora.Frontend.Components.NavigationMenu
}
ObservableCollection groups = new ObservableCollection();
- foreach(string groupHeading in groupDictioanry.Keys)
+ foreach (string groupHeading in groupDictioanry.Keys)
{
groupDictioanry.TryGetValue(groupHeading, out var groupItem);
groups.Add(groupItem);
diff --git a/Aurora/Frontend/Views/MainView/MainViewModel.cs b/Aurora/Frontend/Views/MainView/MainViewModel.cs
index 4009ae1..c72f18f 100644
--- a/Aurora/Frontend/Views/MainView/MainViewModel.cs
+++ b/Aurora/Frontend/Views/MainView/MainViewModel.cs
@@ -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(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)},
diff --git a/Aurora/Frontend/Views/Party/PartyView.xaml b/Aurora/Frontend/Views/Party/PartyView.xaml
new file mode 100644
index 0000000..15c3105
--- /dev/null
+++ b/Aurora/Frontend/Views/Party/PartyView.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Aurora/Frontend/Views/Party/PartyView.xaml.cs b/Aurora/Frontend/Views/Party/PartyView.xaml.cs
new file mode 100644
index 0000000..6d461fb
--- /dev/null
+++ b/Aurora/Frontend/Views/Party/PartyView.xaml.cs
@@ -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();
+ }
+ }
+}
diff --git a/Aurora/Frontend/Views/Party/PartyViewModel.cs b/Aurora/Frontend/Views/Party/PartyViewModel.cs
new file mode 100644
index 0000000..fe7fb3c
--- /dev/null
+++ b/Aurora/Frontend/Views/Party/PartyViewModel.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.ObjectModel;
+
+namespace Aurora.Frontend.Views.Party
+{
+ public class PartyViewModel : BaseViewModel
+ {
+ private ObservableCollection _members;
+ public PartyViewModel()
+ {
+ _members = new ObservableCollection()
+ {
+ "Kevin",
+ "Brandon",
+ "Sheila",
+ "Dale",
+ "Austin",
+ "Tori",
+ "Ashley",
+ "Spencer",
+ };
+ OnPropertyChanged("Members");
+ }
+
+ public ObservableCollection Members
+ {
+ get { return _members; }
+ set { SetProperty(ref _members, value); }
+ }
+ }
+}
\ No newline at end of file