From 7648e43ce9e6a3c56e7bbd6e6ca5158466a4646c Mon Sep 17 00:00:00 2001
From: Dinesh Solanki <15937452+dineshsolanki@users.noreply.github.com>
Date: Fri, 2 Aug 2024 00:08:02 +0530
Subject: [PATCH 1/4] dummy: Add Video selector to HtmlBox control
Introduced a new Video model and integrated a ComboBox for video selection in the HtmlBox control. Updated the HtmlBox.cs to handle video selection and loaded videos dynamically.
---
FoliCon/Models/Data/Video.cs | 3 +++
FoliCon/Views/HtmlBox.xaml | 10 ++++++++-
FoliCon/Views/HtmlBox.xaml.cs | 41 ++++++++++++++++++++++++++++++++++-
3 files changed, 52 insertions(+), 2 deletions(-)
create mode 100644 FoliCon/Models/Data/Video.cs
diff --git a/FoliCon/Models/Data/Video.cs b/FoliCon/Models/Data/Video.cs
new file mode 100644
index 0000000..a4790fd
--- /dev/null
+++ b/FoliCon/Models/Data/Video.cs
@@ -0,0 +1,3 @@
+namespace FoliCon.Models.Data;
+
+public record Video(string Name, string Id);
\ No newline at end of file
diff --git a/FoliCon/Views/HtmlBox.xaml b/FoliCon/Views/HtmlBox.xaml
index afc8438..9da4df5 100644
--- a/FoliCon/Views/HtmlBox.xaml
+++ b/FoliCon/Views/HtmlBox.xaml
@@ -5,5 +5,13 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
mc:Ignorable="d" Background="{DynamicResource RegionBrush}">
-
+
+
+
+
+
+
+
+
+
diff --git a/FoliCon/Views/HtmlBox.xaml.cs b/FoliCon/Views/HtmlBox.xaml.cs
index 3271928..04e5689 100644
--- a/FoliCon/Views/HtmlBox.xaml.cs
+++ b/FoliCon/Views/HtmlBox.xaml.cs
@@ -1,4 +1,6 @@
-using HandyControl.Themes;
+using System.Collections;
+using HandyControl.Themes;
+using Video = FoliCon.Models.Data.Video;
namespace FoliCon.Views;
@@ -21,12 +23,38 @@ public static readonly DependencyProperty HtmlTextProperty
typeof(HtmlBox),
new PropertyMetadata(default(string), OnHtmlTextPropertyChanged));
+ public static readonly DependencyProperty VideosProperty
+ = DependencyProperty.Register(
+ nameof(Videos),
+ typeof(ICollection