This repository has been archived on 2020-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
aurora-sharp-desktop/Aurora/Frontend/Views/MainView/MainViewModel.cs

44 lines
1.4 KiB
C#
Raw Normal View History

using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Aurora.Frontend.Components.NavigationMenu;
using Aurora.Frontend.Views.Albums;
using Aurora.Frontend.Views.Artists;
using Aurora.Frontend.Views.Songs;
using Aurora.Frontend.Views.Stations;
namespace Aurora.Frontend.Views.MainView
{
public class MainViewModel : BaseViewModel
{
private ObservableCollection<NavigationItem> _pages;
public ObservableCollection<NavigationItem> Pages
{
get { return _pages; }
set
{
if(value != _pages)
{
_pages = value;
OnPropertyChanged("Pages");
}
}
}
public MainViewModel()
{
_pages = new ObservableCollection<NavigationItem>(new[]
{
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 = 2, Title = "Albums", Group="Library", TargetType = typeof(AlbumsView)},
new NavigationItem { Id = 3, Title = "Stations", Group="Library", TargetType = typeof(StationsView)},
});
}
}
}