From 716d39d1177b1de51c9545c8e40d0dbf94ee13ac Mon Sep 17 00:00:00 2001 From: igor Date: Sat, 15 Aug 2026 16:42:37 +0200 Subject: [PATCH] added play list into right column with GridSplitter --- HarmonyWinUI/HarmonyWinUI.csproj | 4 +- HarmonyWinUI/HarmonyWinUI.csproj.user | 1 + HarmonyWinUI/MainWindow.xaml | 67 ++++++++++++++++++++++++++- HarmonyWinUI/MainWindow.xaml.cs | 22 ++++++++- 4 files changed, 91 insertions(+), 3 deletions(-) diff --git a/HarmonyWinUI/HarmonyWinUI.csproj b/HarmonyWinUI/HarmonyWinUI.csproj index 135e7fe..25585c8 100644 --- a/HarmonyWinUI/HarmonyWinUI.csproj +++ b/HarmonyWinUI/HarmonyWinUI.csproj @@ -44,6 +44,8 @@ + + @@ -79,4 +81,4 @@ - \ No newline at end of file + diff --git a/HarmonyWinUI/HarmonyWinUI.csproj.user b/HarmonyWinUI/HarmonyWinUI.csproj.user index cc69da4..b80b9f8 100644 --- a/HarmonyWinUI/HarmonyWinUI.csproj.user +++ b/HarmonyWinUI/HarmonyWinUI.csproj.user @@ -5,6 +5,7 @@ HarmonyWinUI (Unpackaged) + <_LastSelectedProfileId>D:\work\Harmony\HarmonyWinUI\Properties\PublishProfiles\FolderProfile.pubxml diff --git a/HarmonyWinUI/MainWindow.xaml b/HarmonyWinUI/MainWindow.xaml index 0a9ca9a..ab1a8e6 100644 --- a/HarmonyWinUI/MainWindow.xaml +++ b/HarmonyWinUI/MainWindow.xaml @@ -4,6 +4,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:HarmonyWinUI" + xmlns:controls="using:CommunityToolkit.WinUI.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" @@ -14,7 +15,19 @@ + + + + + + + + + + @@ -29,7 +42,7 @@ - + @@ -38,6 +51,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HarmonyWinUI/MainWindow.xaml.cs b/HarmonyWinUI/MainWindow.xaml.cs index d969c75..a6accdb 100644 --- a/HarmonyWinUI/MainWindow.xaml.cs +++ b/HarmonyWinUI/MainWindow.xaml.cs @@ -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 /// public sealed partial class MainWindow : Window { + public ObservableCollection 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; + } + } + }