From 7a5e1bb5ac6bd81dd1a5d1562284096336d8a9ae Mon Sep 17 00:00:00 2001 From: Zakaria Tahri <101801384+Zakariathr22@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:03:50 +0100 Subject: [PATCH 1/3] Add C# sample code to TreeView example and simplify the code - Added C# sample code to TreeView example for better understanding. - Simplified code to focus on core TreeView concepts. - Removed redundant code and unused properties/functions. - Replaced "folder.png" with updated image. --- WinUIGallery/Assets/folder.png | Bin 18402 -> 17187 bytes WinUIGallery/ControlPages/TreeViewPage.xaml | 28 +-- .../ControlPages/TreeViewPage.xaml.cs | 177 +++--------------- .../TreeView/TreeViewDataBindingSample_cs.txt | 82 ++++++++ .../TreeView/TreeViewSample1_cs.txt | 21 +++ .../TreeViewTemplateSelectorSample_cs.txt | 90 +++++++++ .../TreeViewTemplateSelectorSample_xaml.txt | 59 +++--- WinUIGallery/WinUIGallery.csproj | 8 + 8 files changed, 278 insertions(+), 187 deletions(-) create mode 100644 WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewDataBindingSample_cs.txt create mode 100644 WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt create mode 100644 WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_cs.txt diff --git a/WinUIGallery/Assets/folder.png b/WinUIGallery/Assets/folder.png index dd6d2c51b83bc0b5aba7a208813d48191d2a26ed..f179473a22e383a4b9261bf59105e15cd9b7bd6f 100644 GIT binary patch literal 17187 zcmXuK1yCFB^FN-1pur`$I|R2vfda+d8>BS2JH?@a;#SRkD1xYpL5U=;1f8xtmQes(NAOMxnvii zasjU8eIiVKFE%$RebMasrtr@8to355_3mf!om{i&tl#Ec*HrkeRY<+-%e&Wa$Rgi9 z^WTg2#{ACvPXq9ZWSbT6Vn)sX&nw}-VtCAJ=R;M8onL-c$a99RPrU7V_9XD&9yjht zjpmO|*k@B_cH}G8A3Ylkgv^z9Vdr=Enb(&efq5_FFAps~u|H@5E)M7X`1b4p{~X4C z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<_b0R;eH8undjgRb*5EV6(a;rNH=~?e#S?Ro>l=-O%Eqi;m8z<8$U0 z7Sa6tB04fRj}9N1$N529Uw-?xzx`i#ejTX|A3iY9=W#@0|NBnIGyp)}4f@}`#XrFM zYU&AOWc(o91~3&1fQZtupt0|XUSF#$)Qj%MBm$#;XYV2W9!F}>x_W!hp{MV9aO-v7 zyzR-S{9Q7`ho}BChy(%kt&VvBfY?Dqt5?(NfIq+^h4CXl6nHQUfQylSBOt_ugYoxW z3vpWYvb!-(zudkDKh;6r^5E`$hoON^*3jtgdgtIP-jn~p%dhWw`SEAo*!IZJUw_lj zp^E*7^oJ3dyT7lsEC2vvApiha?awI?^`;?LnxT`3djX&dFhzO+n81*Wk@6@`$E@+o z)DPW_LsL_z+#Em;KkyTD=EhWBg67m-rbF)1^;-od)IFC#E&0CZ@qosxj*?Y z-}yg&vZ=9)>(GV+Zy(P*aI2eIRsaBbHyu2A00M0e0tt*CqyYd~Da+pYW$Jc!BRu_w zCZ_@byt(VZ^MCqZzw>$2F=A6MfIju%w|u78*Dr~d9RNV=NJ0#ORUJ+xF-GaLZ+g7{3SrahtxJ1Aa%C*kcRo!+w2JEn5J9LX9e07x3_tuRZ!dzxV)j-LL= z&*0k)Eo%UP*f|C2HGseW_{XhGZ!7zV)mB}akbFUfjhzbmf0kIZj!4=pS#?*Gldxb_pmDZu!j?)CqHNDyC26`+a@9{}KMt?gp6T1v72Fc1p?i9X{Q|7E@Yj#gGC xvH&oY4*{5BY}Vhk4Uwp_n|l4-tgKA+{{fJkeE-qhU%>zX002ovPDHLkV1kd{=P>{P diff --git a/WinUIGallery/ControlPages/TreeViewPage.xaml b/WinUIGallery/ControlPages/TreeViewPage.xaml index 77b2a1915..339e159bf 100644 --- a/WinUIGallery/ControlPages/TreeViewPage.xaml +++ b/WinUIGallery/ControlPages/TreeViewPage.xaml @@ -39,37 +39,41 @@ - + - + + HorizontalAlignment="Center" VerticalAlignment="Top" CanDragItems="True" AllowDrop="True" /> - <TreeView CanDragItems="True" AllowDrop="True"/> + <TreeView x:Name="sampleTreeView" CanDragItems="True" AllowDrop="True"/> - + - + - <TreeView SelectionMode="Multiple" /> + <TreeView x:Name="sampleTreeView" SelectionMode="Multiple" /> - + - + - + - + diff --git a/WinUIGallery/ControlPages/TreeViewPage.xaml.cs b/WinUIGallery/ControlPages/TreeViewPage.xaml.cs index b7270d4cf..9d79908b5 100644 --- a/WinUIGallery/ControlPages/TreeViewPage.xaml.cs +++ b/WinUIGallery/ControlPages/TreeViewPage.xaml.cs @@ -1,15 +1,12 @@ -using System; +using System; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using System.Collections.ObjectModel; -using System.ComponentModel; namespace WinUIGallery.ControlPages { public sealed partial class TreeViewPage : Page { - TreeViewNode personalFolder; - TreeViewNode personalFolder2; private ObservableCollection DataSource; public TreeViewPage() @@ -18,190 +15,70 @@ public TreeViewPage() this.DataContext = this; DataSource = GetData(); - InitializeSampleTreeView(); - InitializeSampleTreeView2(); + InitializeSampleTreeView(sampleTreeView); + InitializeSampleTreeView(sampleTreeView2); } - private void InitializeSampleTreeView() + private void InitializeSampleTreeView(TreeView sampleTreeView) { TreeViewNode workFolder = new TreeViewNode() { Content = "Work Documents" }; workFolder.IsExpanded = true; workFolder.Children.Add(new TreeViewNode() { Content = "XYZ Functional Spec" }); workFolder.Children.Add(new TreeViewNode() { Content = "Feature Schedule" }); - workFolder.Children.Add(new TreeViewNode() { Content = "Overall Project Plan" }); - workFolder.Children.Add(new TreeViewNode() { Content = "Feature Resources Allocation" }); TreeViewNode remodelFolder = new TreeViewNode() { Content = "Home Remodel" }; remodelFolder.IsExpanded = true; remodelFolder.Children.Add(new TreeViewNode() { Content = "Contractor Contact Info" }); remodelFolder.Children.Add(new TreeViewNode() { Content = "Paint Color Scheme" }); - remodelFolder.Children.Add(new TreeViewNode() { Content = "Flooring woodgrain type" }); - remodelFolder.Children.Add(new TreeViewNode() { Content = "Kitchen cabinet style" }); - personalFolder = new TreeViewNode() { Content = "Personal Documents" }; + TreeViewNode personalFolder = new TreeViewNode() { Content = "Personal Documents" }; personalFolder.IsExpanded = true; personalFolder.Children.Add(remodelFolder); sampleTreeView.RootNodes.Add(workFolder); sampleTreeView.RootNodes.Add(personalFolder); } - private void InitializeSampleTreeView2() - { - TreeViewNode workFolder = new TreeViewNode() { Content = "Work Documents" }; - workFolder.IsExpanded = true; - - workFolder.Children.Add(new TreeViewNode() { Content = "XYZ Functional Spec" }); - workFolder.Children.Add(new TreeViewNode() { Content = "Feature Schedule" }); - workFolder.Children.Add(new TreeViewNode() { Content = "Overall Project Plan" }); - workFolder.Children.Add(new TreeViewNode() { Content = "Feature Resources Allocation" }); - TreeViewNode remodelFolder = new TreeViewNode() { Content = "Home Remodel" }; - remodelFolder.IsExpanded = true; - - remodelFolder.Children.Add(new TreeViewNode() { Content = "Contractor Contact Info" }); - remodelFolder.Children.Add(new TreeViewNode() { Content = "Paint Color Scheme" }); - remodelFolder.Children.Add(new TreeViewNode() { Content = "Flooring woodgrain type" }); - remodelFolder.Children.Add(new TreeViewNode() { Content = "Kitchen cabinet style" }); - - personalFolder2 = new TreeViewNode() { Content = "Personal Documents" }; - personalFolder2.IsExpanded = true; - personalFolder2.Children.Add(remodelFolder); - - sampleTreeView2.RootNodes.Add(workFolder); - sampleTreeView2.RootNodes.Add(personalFolder2); - } - - private void sampleTreeView_ItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args) - { - return; - } - private ObservableCollection GetData() { - var list = new ObservableCollection(); - ExplorerItem folder1 = new ExplorerItem() + return new ObservableCollection { - Name = "Work Documents", - Type = ExplorerItem.ExplorerItemType.Folder, - Children = + new ExplorerItem { - new ExplorerItem() - { - Name = "Functional Specifications", - Type = ExplorerItem.ExplorerItemType.Folder, - Children = - { - new ExplorerItem() - { - Name = "TreeView spec", - Type = ExplorerItem.ExplorerItemType.File, - } - } - }, - new ExplorerItem() - { - Name = "Feature Schedule", - Type = ExplorerItem.ExplorerItemType.File, - }, - new ExplorerItem() + Name = "Documents", + Type = ExplorerItem.ExplorerItemType.Folder, + Children = { - Name = "Overall Project Plan", - Type = ExplorerItem.ExplorerItemType.File, - }, - new ExplorerItem() + new ExplorerItem { Name = "ProjectProposal", Type = ExplorerItem.ExplorerItemType.File }, + new ExplorerItem { Name = "BudgetReport", Type = ExplorerItem.ExplorerItemType.File } + } + }, + new ExplorerItem + { + Name = "Projects", + Type = ExplorerItem.ExplorerItemType.Folder, + Children = { - Name = "Feature Resources Allocation", - Type = ExplorerItem.ExplorerItemType.File, + new ExplorerItem { Name = "Project Plan", Type = ExplorerItem.ExplorerItemType.File } } } }; - ExplorerItem folder2 = new ExplorerItem() - { - Name = "Personal Folder", - Type = ExplorerItem.ExplorerItemType.Folder, - Children = - { - new ExplorerItem() - { - Name = "Home Remodel Folder", - Type = ExplorerItem.ExplorerItemType.Folder, - Children = - { - new ExplorerItem() - { - Name = "Contractor Contact Info", - Type = ExplorerItem.ExplorerItemType.File, - }, - new ExplorerItem() - { - Name = "Paint Color Scheme", - Type = ExplorerItem.ExplorerItemType.File, - }, - new ExplorerItem() - { - Name = "Flooring Woodgrain type", - Type = ExplorerItem.ExplorerItemType.File, - }, - new ExplorerItem() - { - Name = "Kitchen Cabinet Style", - Type = ExplorerItem.ExplorerItemType.File, - } - } - } - } - }; - - list.Add(folder1); - list.Add(folder2); - return list; } - } - public class ExplorerItem : INotifyPropertyChanged + public class ExplorerItem { - public event PropertyChangedEventHandler PropertyChanged; - public enum ExplorerItemType { Folder, File }; - public string Name { get; set; } - public ExplorerItemType Type { get; set; } - private ObservableCollection m_children; - public ObservableCollection Children - { - get - { - if (m_children == null) - { - m_children = new ObservableCollection(); - } - return m_children; - } - set - { - m_children = value; - } - } - - private bool m_isExpanded; - public bool IsExpanded + public enum ExplorerItemType { - get { return m_isExpanded; } - set - { - if (m_isExpanded != value) - { - m_isExpanded = value; - NotifyPropertyChanged("IsExpanded"); - } - } + Folder, + File, } - private void NotifyPropertyChanged(string propertyName) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } + public string Name { get; set; } + public ExplorerItemType Type { get; set; } + public ObservableCollection Children { get; set; } = new ObservableCollection(); } class ExplorerItemTemplateSelector : DataTemplateSelector diff --git a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewDataBindingSample_cs.txt b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewDataBindingSample_cs.txt new file mode 100644 index 000000000..9234dc854 --- /dev/null +++ b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewDataBindingSample_cs.txt @@ -0,0 +1,82 @@ +using System.Collections.ObjectModel; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; + +namespace YourNamespace +{ + public sealed partial class YourPage : Page + { + // DataSource is the data collection that will be bound to the TreeView's ItemsSource. + public ObservableCollection DataSource { get; set; } + + public YourPage() + { + this.InitializeComponent(); + + // Initialize the data source with sample data and set it as the context for data binding. + DataSource = GetData(); + this.DataContext = this; // Bind the DataContext of the page to itself for XAML bindings. + } + + // Method to provide sample data for the TreeView. + private ObservableCollection GetData() + { + return new ObservableCollection + { + // Root folder with child files. + new ExplorerItem + { + Name = "Documents", + Type = ExplorerItem.ExplorerItemType.Folder, + Children = + { + new ExplorerItem + { + Name = "ProjectProposal", + Type = ExplorerItem.ExplorerItemType.File, + }, + new ExplorerItem + { + Name = "BudgetReport", + Type = ExplorerItem.ExplorerItemType.File, + }, + }, + }, + // Another root folder with one child file. + new ExplorerItem + { + Name = "Projects", + Type = ExplorerItem.ExplorerItemType.Folder, + Children = + { + new ExplorerItem + { + Name = "Project Plan", + Type = ExplorerItem.ExplorerItemType.File, + }, + }, + }, + }; + } + } + + // Class to represent items in the TreeView. + public class ExplorerItem + { + // Enum to define the type of the item: Folder or File. + public enum ExplorerItemType + { + Folder, + File, + } + + // Name of the item (displayed in the TreeView). + public string Name { get; set; } + + // Type of the item (Folder or File). + public ExplorerItemType Type { get; set; } + + // Collection of child items. Used for nested nodes in the TreeView. + public ObservableCollection Children { get; set; } = new ObservableCollection(); + } +} \ No newline at end of file diff --git a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt new file mode 100644 index 000000000..bc98f19c0 --- /dev/null +++ b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt @@ -0,0 +1,21 @@ +private void InitializeSampleTreeView(TreeView sampleTreeView) +{ + TreeViewNode workFolder = new TreeViewNode() { Content = "Work Documents" }; + workFolder.IsExpanded = true; + + workFolder.Children.Add(new TreeViewNode() { Content = "XYZ Functional Spec" }); + workFolder.Children.Add(new TreeViewNode() { Content = "Feature Schedule" }); + + TreeViewNode remodelFolder = new TreeViewNode() { Content = "Home Remodel" }; + remodelFolder.IsExpanded = true; + + remodelFolder.Children.Add(new TreeViewNode() { Content = "Contractor Contact Info" }); + remodelFolder.Children.Add(new TreeViewNode() { Content = "Paint Color Scheme" }); + + TreeViewNode personalFolder = new TreeViewNode() { Content = "Personal Documents" }; + personalFolder.IsExpanded = true; + personalFolder.Children.Add(remodelFolder); + + sampleTreeView.RootNodes.Add(workFolder); + sampleTreeView.RootNodes.Add(personalFolder); +} \ No newline at end of file diff --git a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_cs.txt b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_cs.txt new file mode 100644 index 000000000..047c92389 --- /dev/null +++ b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_cs.txt @@ -0,0 +1,90 @@ +using System.Collections.ObjectModel; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; + +namespace YourNamespace +{ + public sealed partial class YourPage : Page + { + public ObservableCollection DataSource { get; set; } + + public YourPage() + { + this.InitializeComponent(); + DataSource = GetData(); + this.DataContext = this; + } + + private ObservableCollection GetData() + { + return new ObservableCollection + { + new ExplorerItem + { + Name = "Documents", + Type = ExplorerItem.ExplorerItemType.Folder, + Children = + { + new ExplorerItem + { + Name = "ProjectProposal", + Type = ExplorerItem.ExplorerItemType.File, + }, + new ExplorerItem + { + Name = "BudgetReport", + Type = ExplorerItem.ExplorerItemType.File, + }, + }, + }, + new ExplorerItem + { + Name = "Projects", + Type = ExplorerItem.ExplorerItemType.Folder, + Children = + { + new ExplorerItem + { + Name = "Project Plan", + Type = ExplorerItem.ExplorerItemType.File, + }, + }, + }, + }; + } + } + + public class ExplorerItem + { + public enum ExplorerItemType + { + Folder, + File, + } + + public string Name { get; set; } + public ExplorerItemType Type { get; set; } + public ObservableCollection Children { get; set; } = new ObservableCollection(); + } + + class ExplorerItemTemplateSelector : DataTemplateSelector + { + // Template to use for folder items in the TreeView. + public DataTemplate FolderTemplate { get; set; } + + // Template to use for file items in the TreeView. + public DataTemplate FileTemplate { get; set; } + + // Determines which template to use for each item in the TreeView based on its type. + protected override DataTemplate SelectTemplateCore(object item) + { + // Cast the item to the ExplorerItem type. + var explorerItem = (ExplorerItem)item; + + // Return the appropriate template: FolderTemplate for folders, FileTemplate for files. + return explorerItem.Type == ExplorerItem.ExplorerItemType.Folder + ? FolderTemplate + : FileTemplate; + } + } +} \ No newline at end of file diff --git a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_xaml.txt b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_xaml.txt index 6e73966ae..6327d9035 100644 --- a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_xaml.txt +++ b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewTemplateSelectorSample_xaml.txt @@ -1,30 +1,37 @@ - - - - - - - - - - + - - - - - - - - - + + + + + + + + + + + - - + + + + + + + + + + - + + + + + + \ No newline at end of file diff --git a/WinUIGallery/WinUIGallery.csproj b/WinUIGallery/WinUIGallery.csproj index 80e793fd4..c100b5942 100644 --- a/WinUIGallery/WinUIGallery.csproj +++ b/WinUIGallery/WinUIGallery.csproj @@ -150,6 +150,7 @@ + @@ -287,6 +288,9 @@ + + + @@ -315,6 +319,7 @@ + @@ -459,6 +464,9 @@ + + + From 8e41d1c0ecfd7d32b4279987f1083b09726660eb Mon Sep 17 00:00:00 2001 From: Zakaria Tahri <101801384+Zakariathr22@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:16:43 +0100 Subject: [PATCH 2/3] remove unused namespace --- WinUIGallery/ControlPages/TreeViewPage.xaml.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/WinUIGallery/ControlPages/TreeViewPage.xaml.cs b/WinUIGallery/ControlPages/TreeViewPage.xaml.cs index 9d79908b5..71e165201 100644 --- a/WinUIGallery/ControlPages/TreeViewPage.xaml.cs +++ b/WinUIGallery/ControlPages/TreeViewPage.xaml.cs @@ -1,4 +1,3 @@ -using System; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using System.Collections.ObjectModel; From dcc7b706c18aa422329d8c7b8ac41881fd443e53 Mon Sep 17 00:00:00 2001 From: Zakaria Tahri <101801384+Zakariathr22@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:01:49 +0100 Subject: [PATCH 3/3] add comments to clarify TreeView initialization sample code --- .../TreeView/TreeViewSample1_cs.txt | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt index bc98f19c0..a890f21c9 100644 --- a/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt +++ b/WinUIGallery/ControlPagesSampleCode/TreeView/TreeViewSample1_cs.txt @@ -1,21 +1,27 @@ private void InitializeSampleTreeView(TreeView sampleTreeView) { - TreeViewNode workFolder = new TreeViewNode() { Content = "Work Documents" }; - workFolder.IsExpanded = true; + // Create a root node with initial content and set it to be expanded. + TreeViewNode workNode = new TreeViewNode() { Content = "Work Documents" }; + workNode.IsExpanded = true; - workFolder.Children.Add(new TreeViewNode() { Content = "XYZ Functional Spec" }); - workFolder.Children.Add(new TreeViewNode() { Content = "Feature Schedule" }); + // Add child nodes with content related to the root node. + workNode.Children.Add(new TreeViewNode() { Content = "XYZ Functional Spec" }); + workNode.Children.Add(new TreeViewNode() { Content = "Feature Schedule" }); - TreeViewNode remodelFolder = new TreeViewNode() { Content = "Home Remodel" }; - remodelFolder.IsExpanded = true; + // Create another node with initial content and set it to be expanded. + TreeViewNode remodelNode = new TreeViewNode() { Content = "Home Remodel" }; + remodelNode.IsExpanded = true; - remodelFolder.Children.Add(new TreeViewNode() { Content = "Contractor Contact Info" }); - remodelFolder.Children.Add(new TreeViewNode() { Content = "Paint Color Scheme" }); + // Add child nodes with specific content under this node. + remodelNode.Children.Add(new TreeViewNode() { Content = "Contractor Contact Info" }); + remodelNode.Children.Add(new TreeViewNode() { Content = "Paint Color Scheme" }); - TreeViewNode personalFolder = new TreeViewNode() { Content = "Personal Documents" }; - personalFolder.IsExpanded = true; - personalFolder.Children.Add(remodelFolder); + // Create a node with broader content that includes the previous node as a child. + TreeViewNode personalNode = new TreeViewNode() { Content = "Personal Documents" }; + personalNode.IsExpanded = true; + personalNode.Children.Add(remodelNode); - sampleTreeView.RootNodes.Add(workFolder); - sampleTreeView.RootNodes.Add(personalFolder); + // Add the main nodes to the TreeView's root. + sampleTreeView.RootNodes.Add(workNode); + sampleTreeView.RootNodes.Add(personalNode); } \ No newline at end of file