added play list into right column with GridSplitter
This commit is contained in:
@@ -2,7 +2,8 @@ using HarmonyWinUI.Pages;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using System;
|
||||
using Windows.System; // added
|
||||
using System.Collections.ObjectModel;
|
||||
using Windows.System;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
@@ -14,12 +15,17 @@ namespace HarmonyWinUI
|
||||
/// </summary>
|
||||
public sealed partial class MainWindow : Window
|
||||
{
|
||||
public ObservableCollection<PlayListItem> Items { get; } = new();
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// default
|
||||
MainNavigationContentFrame.Navigate(typeof(Dashboard));
|
||||
this.Items.Add(new PlayListItem("Dodo", "Stromae"));
|
||||
this.Items.Add(new PlayListItem("La Danza", "John Summit"));
|
||||
this.Items.Add(new PlayListItem("Trapny vietor", "Horkyze Slize"));
|
||||
}
|
||||
|
||||
private async void MainNavigation_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
|
||||
@@ -65,4 +71,18 @@ namespace HarmonyWinUI
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayListItem
|
||||
{
|
||||
public string? TrackName { get; set; }
|
||||
public string? ArtistName { get; set; }
|
||||
|
||||
public PlayListItem() { }
|
||||
|
||||
public PlayListItem(string? trackName, string? artistName)
|
||||
{
|
||||
TrackName = trackName;
|
||||
ArtistName = artistName;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user