diff --git a/Directory.Build.props b/Directory.Build.props index e9b3929..91d7f03 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,4 +6,9 @@ all + + + 3.2.0-preview1.20073.1 + + diff --git a/docs/TreeView.md b/docs/TreeView.md index b88c6b1..7164835 100644 --- a/docs/TreeView.md +++ b/docs/TreeView.md @@ -11,6 +11,8 @@ The TreeView component is meant to emulate the asp:TreeView control in markup an - TreeNode expand and collapse events - TreeNode checkbox checked / unchecked events - XmlDocument databinding +- SiteMap databinding as an XmlDocument +- Databinding events ##### [Back to top](#treeview) diff --git a/samples/AfterBlazorClientSide/AfterBlazorClientSide.csproj b/samples/AfterBlazorClientSide/AfterBlazorClientSide.csproj index 6bac35c..616ad18 100644 --- a/samples/AfterBlazorClientSide/AfterBlazorClientSide.csproj +++ b/samples/AfterBlazorClientSide/AfterBlazorClientSide.csproj @@ -16,10 +16,10 @@ - - - - + + + + diff --git a/samples/AfterBlazorClientSide/Program.cs b/samples/AfterBlazorClientSide/Program.cs index 5852d60..80d1c78 100644 --- a/samples/AfterBlazorClientSide/Program.cs +++ b/samples/AfterBlazorClientSide/Program.cs @@ -1,16 +1,31 @@ using Microsoft.AspNetCore.Blazor.Hosting; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.Extensions.DependencyInjection; +using System.Threading.Tasks; namespace AfterBlazorClientSide { public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { - CreateHostBuilder(args).Build().Run(); + + var builder = WebAssemblyHostBuilder.CreateDefault(args); + builder.RootComponents.Add("app"); + + builder.Services.AddScoped(); + + await builder.Build().RunAsync(); + } - public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) => - BlazorWebAssemblyHost.CreateDefaultBuilder() - .UseBlazorStartup(); } + + public static class Startup + { + + public static string ApplicationName => "Blazor WebAssembly"; + + } + } diff --git a/samples/AfterBlazorClientSide/Startup.cs b/samples/AfterBlazorClientSide/Startup.cs deleted file mode 100644 index 4ffa8a9..0000000 --- a/samples/AfterBlazorClientSide/Startup.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.AspNetCore.Components.Authorization; -using Microsoft.AspNetCore.Components.Builder; -using Microsoft.Extensions.DependencyInjection; - -namespace AfterBlazorClientSide -{ - public class Startup - { - - public static string ApplicationName => "Blazor WebAssembly"; - - public void ConfigureServices(IServiceCollection services) - { - services.AddScoped(); - } - - public void Configure(IComponentsApplicationBuilder app) - { - app.AddComponent("app"); - } - } -} diff --git a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/ArrowsImages.razor b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/ArrowsImages.razor new file mode 100644 index 0000000..62bd9a0 --- /dev/null +++ b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/ArrowsImages.razor @@ -0,0 +1,44 @@ +@page "/ControlSamples/TreeView/ArrowsImages" +@using static BlazorWebFormsComponents.Enums.TreeNodeTypes +@using static BlazorWebFormsComponents.Enums.TreeViewImageSet + +

TreeView Component homepage

+ +

Here is a simple static tree view

+ + + + + + + + + + + + + + + + +Checkboxes clicked: @clickCount + +@code { + + public int clickCount { get; set; } = 0; + + private void CheckChanged(TreeNodeEventArgs args) { + + clickCount++; + base.StateHasChanged(); + + } + +} diff --git a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/BulletImages.razor b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/BulletImages.razor new file mode 100644 index 0000000..fd5858d --- /dev/null +++ b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/BulletImages.razor @@ -0,0 +1,44 @@ +@page "/ControlSamples/TreeView/BulletImages" +@using static BlazorWebFormsComponents.Enums.TreeNodeTypes +@using static BlazorWebFormsComponents.Enums.TreeViewImageSet + +

TreeView Component homepage

+ +

Here is a simple static tree view

+ + + + + + + + + + + + + + + + +Checkboxes clicked: @clickCount + +@code { + + public int clickCount { get; set; } = 0; + + private void CheckChanged(TreeNodeEventArgs args) { + + clickCount++; + base.StateHasChanged(); + + } + +} diff --git a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/BulletsNoExpand.razor b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/BulletsNoExpand.razor new file mode 100644 index 0000000..81108bf --- /dev/null +++ b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/BulletsNoExpand.razor @@ -0,0 +1,28 @@ +@page "/ControlSamples/TreeView/BulletsNoExpand" +@using static BlazorWebFormsComponents.Enums.TreeNodeTypes +@using static BlazorWebFormsComponents.Enums.TreeViewImageSet + +

TreeView Bullets with No Expansion

+ +

Here is a simple static tree view with bullets for nodes and no expand / collapse capabilities

+ + + + + + + + + + + + + + + diff --git a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Images.razor b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Images.razor new file mode 100644 index 0000000..84d02cb --- /dev/null +++ b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Images.razor @@ -0,0 +1,42 @@ +@page "/ControlSamples/TreeView/Images" +@using static BlazorWebFormsComponents.Enums.TreeNodeTypes + +

TreeView Component homepage

+ +

Here is a simple static tree view

+ + + + + + + + + + + + + + + + +Checkboxes clicked: @clickCount + +@code { + + public int clickCount { get; set; } = 0; + + private void CheckChanged(TreeNodeEventArgs args) { + + clickCount++; + base.StateHasChanged(); + + } + +} diff --git a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Index.razor b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Index.razor index a141cc8..e4fc724 100644 --- a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Index.razor +++ b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/Index.razor @@ -32,7 +32,7 @@ Checkboxes clicked: @clickCount public int clickCount { get; set; } = 0; - private void CheckChanged(object sender, TreeNodeEventArgs args) { + private void CheckChanged(TreeNodeEventArgs args) { clickCount++; base.StateHasChanged(); diff --git a/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/SiteMapDataSource.razor b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/SiteMapDataSource.razor new file mode 100644 index 0000000..c8dd3f6 --- /dev/null +++ b/samples/AfterBlazorServerSide/Pages/ControlSamples/TreeView/SiteMapDataSource.razor @@ -0,0 +1,49 @@ +@page "/ControlSamples/TreeView/SiteMapDataSource" +@using static BlazorWebFormsComponents.Enums.TreeNodeTypes + +

TreeView SiteMapDataSource Sample

+ +

This is a treeview component bound to a SiteMap xml document

+ + + + + + + + + + + +@code { + + public TreeView SiteTreeView; + + System.Xml.XmlDocument SiteMapSource = new System.Xml.XmlDocument(); + + protected override Task OnInitializedAsync() { + + Setup(); + + return base.OnInitializedAsync(); + + } + + void Setup() + { + + SiteMapSource.LoadXml(@" + + + + + + + "); + + } + +} \ No newline at end of file diff --git a/samples/AfterBlazorServerSide/Shared/NavMenu.razor b/samples/AfterBlazorServerSide/Shared/NavMenu.razor index 4164027..4d54404 100644 --- a/samples/AfterBlazorServerSide/Shared/NavMenu.razor +++ b/samples/AfterBlazorServerSide/Shared/NavMenu.razor @@ -1,4 +1,5 @@ @using BlazorWebFormsComponents +@using static BlazorWebFormsComponents.Enums.TreeViewImageSet
- + - + @@ -24,13 +25,13 @@ - + - + @@ -47,9 +48,14 @@ - - - + + + + + + + + @@ -58,7 +64,7 @@ - + diff --git a/samples/AfterBlazorServerSide/wwwroot/img/csharp_56.png b/samples/AfterBlazorServerSide/wwwroot/img/csharp_56.png new file mode 100644 index 0000000..cc6ef00 Binary files /dev/null and b/samples/AfterBlazorServerSide/wwwroot/img/csharp_56.png differ diff --git a/samples/BeforeWebForms/BeforeWebForms.csproj b/samples/BeforeWebForms/BeforeWebForms.csproj index a54a6a7..58a4278 100644 --- a/samples/BeforeWebForms/BeforeWebForms.csproj +++ b/samples/BeforeWebForms/BeforeWebForms.csproj @@ -108,6 +108,7 @@ + diff --git a/samples/BeforeWebForms/Content/Images/csharp_56.png b/samples/BeforeWebForms/Content/Images/csharp_56.png new file mode 100644 index 0000000..cc6ef00 Binary files /dev/null and b/samples/BeforeWebForms/Content/Images/csharp_56.png differ diff --git a/samples/BeforeWebForms/ControlSamples/TreeView/default.aspx b/samples/BeforeWebForms/ControlSamples/TreeView/default.aspx index 07d79b6..5b662e2 100644 --- a/samples/BeforeWebForms/ControlSamples/TreeView/default.aspx +++ b/samples/BeforeWebForms/ControlSamples/TreeView/default.aspx @@ -15,25 +15,29 @@

- + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + + void FirstTest() + { + // Arrange/Act + var cut = GetComponentUnderTest(); + var collapseImg = "_content/Fritz.BlazorWebFormsComponents/TreeView/Default_Collapse.gif"; + + // Asserts + var images = cut.FindAll("img"); + images.Count().ShouldBe(4); + + images[0].GetAttribute("src").ShouldBe(collapseImg); + images[1].GetAttribute("src").ShouldBe(collapseImg); + + + } + +} diff --git a/src/BlazorWebFormsComponents.Test/TreeView/ImageSet/HasExpandCollapse.razor b/src/BlazorWebFormsComponents.Test/TreeView/ImageSet/HasExpandCollapse.razor new file mode 100644 index 0000000..72b3308 --- /dev/null +++ b/src/BlazorWebFormsComponents.Test/TreeView/ImageSet/HasExpandCollapse.razor @@ -0,0 +1,67 @@ +@inherits TestComponentBase +@using static BlazorWebFormsComponents.Enums.TreeViewImageSet + + + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + + void FirstTest() + { + // Arrange/Act + var cut = GetComponentUnderTest(); + var collapseImg = "_content/Fritz.BlazorWebFormsComponents/TreeView/Arrows_Collapse.gif"; + var noExpandImg = "_content/Fritz.BlazorWebFormsComponents/TreeView/Arrows_NoExpand.gif"; + + // Asserts + var images = cut.FindAll("img"); + images.Count().ShouldBe(4); + + images[0].GetAttribute("src").ShouldBe(collapseImg); + images[1].GetAttribute("src").ShouldBe(collapseImg); + images[2].GetAttribute("src").ShouldBe(noExpandImg); + images[3].GetAttribute("src").ShouldBe(noExpandImg); + + + } + +} diff --git a/src/BlazorWebFormsComponents.Test/TreeView/ImageSet/NoCollapse.razor b/src/BlazorWebFormsComponents.Test/TreeView/ImageSet/NoCollapse.razor new file mode 100644 index 0000000..06bd85e --- /dev/null +++ b/src/BlazorWebFormsComponents.Test/TreeView/ImageSet/NoCollapse.razor @@ -0,0 +1,75 @@ +@inherits TestComponentBase +@using static BlazorWebFormsComponents.Enums.TreeViewImageSet + + + + + + + + + + + + + + + + + + + + + + + + + + + +@code { + + void FirstTest() + { + + // ImageSets that don't have Expand/Collapse images should show the Default images + + + // Arrange/Act + var cut = GetComponentUnderTest(); + var collapseImg = "_content/Fritz.BlazorWebFormsComponents/TreeView/Default_Collapse.gif"; + var noExpandImg = "_content/Fritz.BlazorWebFormsComponents/TreeView/Default_NoExpand.gif"; + + // Asserts + var images = cut.FindAll("img"); + images.Count().ShouldBe(8); + + images[0].GetAttribute("src").ShouldBe(collapseImg); + images[1].GetAttribute("src").ShouldBe("_content/Fritz.BlazorWebFormsComponents/TreeView/BulletedList_RootNode.gif"); + images[2].GetAttribute("src").ShouldBe(collapseImg); + images[3].GetAttribute("src").ShouldBe("_content/Fritz.BlazorWebFormsComponents/TreeView/BulletedList_ParentNode.gif"); + images[4].GetAttribute("src").ShouldBe(noExpandImg); + images[5].GetAttribute("src").ShouldBe("_content/Fritz.BlazorWebFormsComponents/TreeView/BulletedList_LeafNode.gif"); + images[6].GetAttribute("src").ShouldBe(noExpandImg); + images[7].GetAttribute("src").ShouldBe("_content/Fritz.BlazorWebFormsComponents/TreeView/BulletedList_LeafNode.gif"); + + + } + +} diff --git a/src/BlazorWebFormsComponents.Test/TreeView/SiteMapDataSource/SimpleFromTheDocs.razor b/src/BlazorWebFormsComponents.Test/TreeView/SiteMapDataSource/SimpleFromTheDocs.razor new file mode 100644 index 0000000..ac21854 --- /dev/null +++ b/src/BlazorWebFormsComponents.Test/TreeView/SiteMapDataSource/SimpleFromTheDocs.razor @@ -0,0 +1,52 @@ +@inherits TestComponentBase + + + + + + + + + + + + + + + + + +@code { + + public TreeView SiteTreeView; + + System.Xml.XmlDocument SiteMapSource = new System.Xml.XmlDocument(); + + void Setup() + { + + SiteMapSource.LoadXml(@" + + + + + + + "); + + } + + void FirstTest() + { + + var cut = GetComponentUnderTest(); + cut.FindAll("table").Count().ShouldBe(4, "Did not render all 4 pages of the SiteMap"); + cut.FindAll("a").Count(a => !a.GetElementsByTagName("img").Any()).ShouldBe(4, "Did not create all 4 links of the SiteMap"); + + + } + +} diff --git a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Collapsed.razor b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Collapsed.razor index 4f2aee5..992914f 100644 --- a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Collapsed.razor +++ b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Collapsed.razor @@ -1,6 +1,6 @@ @inherits TestComponentBase - + - - - - - - - - - - + @@ -39,6 +21,15 @@ + + + Expand Parent + + + + Collapse Parent + + @@ -49,26 +40,30 @@ void CollapsedTest() { - var cut = GetComponentUnderTest(); + var cut = GetComponentUnderTest(); - cut.FindAll("table").Count().ShouldBe(1); + cut.Find("img").MarkupMatches(GetFragment("BeforeImage")); + cut.Find("a").Click(); - var anchors = cut.FindAll("a").Where(c => c.HasAttribute("href") && !c.GetElementsByTagName("img").Any()); - anchors.Count().ShouldBe(1); + cut.Find("img").MarkupMatches(GetFragment("AfterImage")); + cut.Find("table + table"); - anchors.First().GetAttribute("href").ShouldBe("Home.aspx"); + } - var expando = cut.FindAll("a").Where(c => c.HasAttribute("href") && c.GetElementsByTagName("img").Any()).FirstOrDefault(); - expando.ShouldNotBeNull(); - expando.Click(new MouseEventArgs()); + void HideTest() + { - _ExpandedNode.ShouldNotBeNull(); - ((int)_ExpandedNode.Depth).ShouldBe(0); + var cut = GetComponentUnderTest(); + cut.Find("img").MarkupMatches(GetFragment("AfterImage")); + cut.Find("a").Click(); + cut.Find("img").MarkupMatches(GetFragment("BeforeImage")); + cut.FindAll("table").Length.ShouldBe(1); } - void RecordExpanded(object sender, TreeNodeEventArgs args) { + void RecordExpanded(TreeNodeEventArgs args) + { _ExpandedNode = args.Node; diff --git a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Image.razor b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Image.razor new file mode 100644 index 0000000..40b79a1 --- /dev/null +++ b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Image.razor @@ -0,0 +1,47 @@ +@inherits TestComponentBase + + + + + + + + + + + + + + + +@code { + + private string ImageToolTip = "Hugo made me sound like a hamster"; + private string ImageUrl = "something_something.jpg"; + + void FirstTest() + { + // Arrange/Act + var cut = GetComponentUnderTest(); + + // Asserts + cut.Find("img").ShouldNotBeNull(); + var img = cut.Find("img"); + img.GetAttribute("src").ShouldBe(ImageUrl); + img.GetAttribute("title").ShouldBe(ImageToolTip); + img.GetAttribute("alt").ShouldBe(ImageToolTip); + + img.ParentElement.LocalName.ShouldBe("td"); + + cut.FindAll("td").Length.ShouldBe(2); + + } + +} diff --git a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ImageWithAnchor.razor b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ImageWithAnchor.razor new file mode 100644 index 0000000..9cfabd5 --- /dev/null +++ b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ImageWithAnchor.razor @@ -0,0 +1,48 @@ +@inherits TestComponentBase + + + + + + + + + + + + + + + +@code { + + private string ImageToolTip = "Hugo made me sound like a hamster"; + private string ImageUrl = "something_something.jpg"; + + void FirstTest() + { + // Arrange/Act + var cut = GetComponentUnderTest(); + + // Asserts + cut.Find("img").ShouldNotBeNull(); + var img = cut.Find("img"); + img.GetAttribute("src").ShouldBe(ImageUrl); + img.GetAttribute("title").ShouldBe(ImageToolTip); + img.GetAttribute("alt").ShouldBe(ImageToolTip); + + cut.FindAll("td").Length.ShouldBe(2); + img.ParentElement.LocalName.ShouldBe("a"); + + + } + +} diff --git a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ShowExpandCollapse.razor b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ShowExpandCollapse.razor index 892488f..b62761d 100644 --- a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ShowExpandCollapse.razor +++ b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/ShowExpandCollapse.razor @@ -49,7 +49,10 @@ var cut = GetComponentUnderTest(); - cut.FindAll("img").Count().ShouldBe(0); + Console.WriteLine(cut.Markup); + + cut.FindAll("img").Count().ShouldBe(3); + cut.Find("img").GetAttribute("src").ShouldBe("_content/Fritz.BlazorWebFormsComponents/TreeView/Default_NoExpand.gif"); } diff --git a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Simple.razor b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Simple.razor index c1a7711..ba5fd40 100644 --- a/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Simple.razor +++ b/src/BlazorWebFormsComponents.Test/TreeView/StaticNodes/Simple.razor @@ -45,19 +45,22 @@ void FirstTest() { - + // Arrange/Act var cut = GetComponentUnderTest(); + // Asserts cut.FindAll("table").Count().ShouldBe(4); cut.Instance.Nodes.Count.ShouldBe(4); var anchors = cut.FindAll("a").Where(c => c.HasAttribute("href") && !c.GetElementsByTagName("img").Any()); anchors.Count().ShouldBe(4); - anchors.First().GetAttribute("href").ShouldBe("Home.aspx"); - anchors.Skip(1).First().GetAttribute("href").ShouldBe("Page1.aspx"); - anchors.Skip(2).First().GetAttribute("href").ShouldBe("Section1.aspx"); - anchors.Skip(3).First().GetAttribute("href").ShouldBe("Page2.aspx"); + anchors.ShouldAllBe( + x => x.ShouldLinkTo("Home.aspx"), + x => x.ShouldLinkTo("Page1.aspx"), + x => x.ShouldLinkTo("Section1.aspx"), + x => x.ShouldLinkTo("Page2.aspx") + ); anchors.First().GetAttribute("title").ShouldBe("Home Tooltip"); diff --git a/src/BlazorWebFormsComponents.Test/TreeView/XmlDataSource/DataBindingEvents.razor b/src/BlazorWebFormsComponents.Test/TreeView/XmlDataSource/DataBindingEvents.razor new file mode 100644 index 0000000..0de9e58 --- /dev/null +++ b/src/BlazorWebFormsComponents.Test/TreeView/XmlDataSource/DataBindingEvents.razor @@ -0,0 +1,63 @@ +@inherits TestComponentBase + + + + + + + + + + + + + + + +@code { + + public TreeView BookTreeView; + + System.Xml.XmlDocument bookXml = new System.Xml.XmlDocument(); + System.Diagnostics.Stopwatch stopwatch; + long dataBindingTicks = 0; + long dataBoundTicks = 0; + + void Setup() + { + + bookXml.LoadXml(@""); + + stopwatch = System.Diagnostics.Stopwatch.StartNew(); + + } + + void FirstTest() + { + + var cut = GetComponentUnderTest(); + var test = cut.Markup; + + stopwatch.Stop(); + + dataBindingTicks.ShouldNotBe(0, "OnDataBinding event did not trigger"); + dataBoundTicks.ShouldNotBe(0, "OnDataBound event did not trigger"); + dataBoundTicks.ShouldBeGreaterThan(dataBindingTicks); + + } + + void OnDataBinding() + { + dataBindingTicks = stopwatch.ElapsedTicks; + } + + void OnDataBound() + { + dataBoundTicks = stopwatch.ElapsedTicks; + } + +} diff --git a/src/BlazorWebFormsComponents.Test/_Imports.razor b/src/BlazorWebFormsComponents.Test/_Imports.razor index aa70612..a529ba1 100644 --- a/src/BlazorWebFormsComponents.Test/_Imports.razor +++ b/src/BlazorWebFormsComponents.Test/_Imports.razor @@ -8,7 +8,7 @@ @using SharedSampleObjects.Models @using BlazorWebFormsComponents @using BlazorWebFormsComponents.Validations - +@using Xunit @using static BlazorWebFormsComponents.Enums.ValidationSummaryDisplayMode @using static BlazorWebFormsComponents.Enums.ValidationCompareOperator @using static BlazorWebFormsComponents.Enums.ValidationDataType diff --git a/src/BlazorWebFormsComponents/BaseDataBindingComponent.cs b/src/BlazorWebFormsComponents/BaseDataBindingComponent.cs new file mode 100644 index 0000000..f4fe16d --- /dev/null +++ b/src/BlazorWebFormsComponents/BaseDataBindingComponent.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Components; +using System; + +namespace BlazorWebFormsComponents +{ + public abstract class BaseDataBindingComponent : BaseWebFormsComponent + { + + #region Data Binding Events + + [Parameter] + public EventCallback OnDataBinding { get; set; } + + [Parameter] + public EventCallback OnDataBound { get; set; } + + [Parameter] + public EventCallback OnItemDataBound { get; set; } + + #endregion + + + } + +} diff --git a/src/BlazorWebFormsComponents/BaseModelBindingComponent.cs b/src/BlazorWebFormsComponents/BaseModelBindingComponent.cs index c2f6c44..262bf69 100644 --- a/src/BlazorWebFormsComponents/BaseModelBindingComponent.cs +++ b/src/BlazorWebFormsComponents/BaseModelBindingComponent.cs @@ -1,12 +1,12 @@ using Microsoft.AspNetCore.Components; -using System; using System.Collections.Generic; using System.Linq; namespace BlazorWebFormsComponents { - public abstract class BaseModelBindingComponent : BaseWebFormsComponent { + public abstract class BaseModelBindingComponent : BaseDataBindingComponent + { // Cheer 300 svavablount 15/12/19 // Cheer 200 nothing_else_matters 15/12/19 @@ -47,19 +47,6 @@ protected override void OnAfterRender(bool firstRender) } - #region Data Binding Events - - [Parameter] - public EventCallback OnDataBinding { get; set; } - - [Parameter] - public EventCallback OnDataBound { get; set; } - - [Parameter] - public EventCallback OnItemDataBound { get; set; } - - #endregion - } } diff --git a/src/BlazorWebFormsComponents/Enums/TreeNodeSelectAction.cs b/src/BlazorWebFormsComponents/Enums/TreeNodeSelectAction.cs new file mode 100644 index 0000000..cacb86e --- /dev/null +++ b/src/BlazorWebFormsComponents/Enums/TreeNodeSelectAction.cs @@ -0,0 +1,17 @@ +namespace BlazorWebFormsComponents.Enums +{ + public enum TreeNodeSelectAction { + + // Raises the SelectedNodeChanged event when a node is selected. + Select = 0, + + // Raises the TreeNodeExpanded event when a node is selected. + Expand = 1, + + // Raises both the SelectedNodeChanged and TreeNodeExpanded events when a node is selected. + SelectExpand = 2, + + // Raises no events when a node is selected. + None = 3 + } +} diff --git a/src/BlazorWebFormsComponents/Enums/TreeViewImageSet.cs b/src/BlazorWebFormsComponents/Enums/TreeViewImageSet.cs new file mode 100644 index 0000000..246fd0e --- /dev/null +++ b/src/BlazorWebFormsComponents/Enums/TreeViewImageSet.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices.ComTypes; +using System.Text; + +namespace BlazorWebFormsComponents.Enums +{ + + public abstract class TreeViewImageSet + { + + public static ArrowsTreeViewImageSet Arrows { get; } = new ArrowsTreeViewImageSet() { HasImages_Node=false }; + public static BulletedListTreeViewImageSet BulletedList { get; } = new BulletedListTreeViewImageSet() { HasImages_Collapse = false }; + public static BulletedList2TreeViewImageSet BulletedList2 { get; } = new BulletedList2TreeViewImageSet() { HasImages_Collapse = false }; + public static BulletedList3TreeViewImageSet BulletedList3 { get; } = new BulletedList3TreeViewImageSet() { HasImages_Collapse = false }; + public static BulletedList4TreeViewImageSet BulletedList4 { get; } = new BulletedList4TreeViewImageSet() { HasImages_Collapse = false }; + public static ContactsTreeViewImageSet Contacts { get; } = new ContactsTreeViewImageSet() { HasImages_Node = false }; + public static DefaultTreeViewImageSet _Default { get; } = new DefaultTreeViewImageSet() { HasImages_Node =false }; + public static EventsTreeViewImageSet Events { get; } = new EventsTreeViewImageSet() { HasImages_Collapse = false }; + public static FAQTreeViewImageSet FAQ { get; } = new FAQTreeViewImageSet() { HasImages_Collapse = false }; + public static InboxTreeViewImageSet Inbox { get; } = new InboxTreeViewImageSet() { HasImages_Collapse = false }; + public static MSDNTreeViewImageSet MSDN { get; } = new MSDNTreeViewImageSet() { HasImages_Node = false }; + public static NewsTreeViewImageSet News { get; } = new NewsTreeViewImageSet() { HasImages_Collapse = false }; + public static SimpleTreeViewImageSet Simple { get; } = new SimpleTreeViewImageSet() { HasImages_Collapse = false, HasImages_Node = false }; + public static Simple2TreeViewImageSet Simple2 { get; } = new Simple2TreeViewImageSet() { HasImages_Collapse = false, HasImages_Node = false }; + public static WindowsHelpTreeViewImageSet WindowsHelp { get; } = new WindowsHelpTreeViewImageSet() { HasImages_Node = false }; + public static XP_ExplorerTreeViewImageSet XP_Explorer { get; } = new XP_ExplorerTreeViewImageSet(); + + public virtual string Collapse => HasImages_Collapse ? FormatFilename("Collapse") : FormatDefaultFilename("Collapse"); + public virtual string Expand => HasImages_Collapse ? FormatFilename("Expand") : FormatDefaultFilename("Expand"); + public virtual string NoExpand => HasImages_Collapse ? FormatFilename("NoExpand") : FormatDefaultFilename("NoExpand"); + public virtual string LeafNode => HasImages_Node ? FormatFilename("LeafNode") : ""; + public virtual string RootNode => HasImages_Node ? FormatFilename("RootNode") : ""; + public virtual string ParentNode => HasImages_Node ? FormatFilename("ParentNode") : ""; + + public string FormatFilename(string imageFilebase) => + string.Concat(this.GetType().Name.Replace("TreeViewImageSet", ""), "_", imageFilebase, ".gif"); + + public string FormatDefaultFilename(string imageFilebase) => + string.Concat("Default_", imageFilebase, ".gif"); + + public virtual bool HasImages_Collapse { get; protected set; } = true; + public virtual bool HasImages_Node { get; protected set; } = true; + + } + + public class ArrowsTreeViewImageSet : TreeViewImageSet { } + public class BulletedListTreeViewImageSet : TreeViewImageSet { } + public class BulletedList2TreeViewImageSet : TreeViewImageSet { } + public class BulletedList3TreeViewImageSet : TreeViewImageSet { } + public class BulletedList4TreeViewImageSet : TreeViewImageSet { } + public class ContactsTreeViewImageSet : TreeViewImageSet { } + public class DefaultTreeViewImageSet : TreeViewImageSet { } + public class EventsTreeViewImageSet : TreeViewImageSet { } + public class FAQTreeViewImageSet : TreeViewImageSet { } + public class InboxTreeViewImageSet : TreeViewImageSet { } + public class MSDNTreeViewImageSet : TreeViewImageSet { } + public class NewsTreeViewImageSet : TreeViewImageSet { } + public class SimpleTreeViewImageSet : TreeViewImageSet { } + public class Simple2TreeViewImageSet : TreeViewImageSet { } + public class WindowsHelpTreeViewImageSet : TreeViewImageSet { } + public class XP_ExplorerTreeViewImageSet : TreeViewImageSet { } + +} diff --git a/src/BlazorWebFormsComponents/TreeNode.razor b/src/BlazorWebFormsComponents/TreeNode.razor index 520be88..5042da1 100644 --- a/src/BlazorWebFormsComponents/TreeNode.razor +++ b/src/BlazorWebFormsComponents/TreeNode.razor @@ -1,5 +1,6 @@ @{ - string nodeImg = Expanded ? "_content/Fritz.BlazorWebFormsComponents/TreeView/node_expanded.gif" : "_content/Fritz.BlazorWebFormsComponents/TreeView/node_collapsed.gif"; + string nodeImg = string.IsNullOrEmpty(ParentTreeView.ImageSet.Collapse) ? $"{ImageLocation}Default_NoExpand.gif" : (Expanded ? $"{ImageLocation}{ParentTreeView.ImageSet.Collapse}" : $"{ImageLocation}{ParentTreeView.ImageSet.Expand}"); + string noExpandImg = string.IsNullOrEmpty(ParentTreeView.ImageSet.Collapse) ? "" : $"{ImageLocation}{ParentTreeView.ImageSet.NoExpand}"; string nodeText = Expanded ? $"Collapse {Text}" : $"Expand {Text}"; } @if ((Parent?.Expanded) ?? true) @@ -14,24 +15,46 @@ @if (ChildContent != null && ParentTreeView.ShowExpandCollapse) { - + @nodeText } - else + else if (!(Parent is null)) // && ParentTreeView.ShowExpandCollapse) { -
+ + } + + @if (!string.IsNullOrEmpty(ImageUrl)) + { + + if (string.IsNullOrEmpty(NavigateUrl)) + { + + @ImageToolTip + + } + else + { + + + @ImageToolTip + + + } } + - @if (ParentTreeView.ShowCheckBoxes != Enums.TreeNodeTypes.None) { + @if (ParentTreeView.ShowCheckBoxes != Enums.TreeNodeTypes.None) + { var isRoot = (ParentTreeView.ShowCheckBoxes.HasFlag(Enums.TreeNodeTypes.Root) && Depth == 0); var isParent = ParentTreeView.ShowCheckBoxes.HasFlag(Enums.TreeNodeTypes.Parent) && (Depth > 0 && !(ChildContent is null)); var isLeaf = ParentTreeView.ShowCheckBoxes.HasFlag(Enums.TreeNodeTypes.Leaf) && (ChildContent is null); - @if (ShowCheckBox && (isRoot || isParent || isLeaf)) { + @if (ShowCheckBox && (isRoot || isParent || isLeaf)) + { } diff --git a/src/BlazorWebFormsComponents/TreeNode.razor.cs b/src/BlazorWebFormsComponents/TreeNode.razor.cs index d02f5cd..0b3eb99 100644 --- a/src/BlazorWebFormsComponents/TreeNode.razor.cs +++ b/src/BlazorWebFormsComponents/TreeNode.razor.cs @@ -2,23 +2,59 @@ using System; using System.ComponentModel; using System.Threading.Tasks; +using BlazorWebFormsComponents.Enums; namespace BlazorWebFormsComponents { public partial class TreeNode : BaseWebFormsComponent { + public const string ImageLocation = "_content/Fritz.BlazorWebFormsComponents/TreeView/"; + [Parameter] public bool Checked { get; set; } = false; + // TODO: Implement + [Parameter] public byte Depth { get; set; } = 0; [Parameter] public bool Expanded { get; set; } = true; + // TODO: Implement + [Parameter] + public string FormatString { get; set; } + + [Parameter] + public string ImageToolTip { get; set; } + + private string _ImageUrl; + [Parameter] + public string ImageUrl { + get { return !String.IsNullOrEmpty(_ImageUrl) ? _ImageUrl : + string.IsNullOrEmpty(ParentTreeView.ImageSet.RootNode) ? "" : + (IsRoot ? $"{ImageLocation}{ParentTreeView.ImageSet.RootNode}" : + IsParent ? $"{ImageLocation}{ParentTreeView.ImageSet.ParentNode}" : + $"{ImageLocation}{ParentTreeView.ImageSet.LeafNode}"); + } + set { _ImageUrl = value; } + } + [Parameter] public string NavigateUrl { get; set; } + // TODO: Implement + [Parameter] + public bool PopulateOnDemand { get; set; } + + // TODO: Implement + [Parameter] + public TreeNodeSelectAction SelectAction { get; set; } + + // TODO: Implement + [Parameter] + public bool Selected { get; set; } + [Parameter] public bool ShowCheckBox { get; set; } = true; @@ -50,6 +86,17 @@ public TreeNode Parent { [CascadingParameter(Name ="ParentTreeView")] public TreeView ParentTreeView { get; set; } + + protected bool IsRoot + { + get { return Parent is null; } + } + + protected bool IsParent + { + get { return !IsRoot && (ChildContent != null); } + } + #region Event Handlers protected override void OnParametersSet() { @@ -65,8 +112,8 @@ public void HandleNodeExpand() { Expanded = !Expanded; - if (Expanded) ParentTreeView.OnTreeNodeExpanded?.Invoke(this, new TreeNodeEventArgs(this)); - else ParentTreeView.OnTreeNodeCollapsed?.Invoke(this, new TreeNodeEventArgs(this)); + if (Expanded) ParentTreeView.OnTreeNodeExpanded.InvokeAsync(new TreeNodeEventArgs(this)); + else ParentTreeView.OnTreeNodeCollapsed.InvokeAsync(new TreeNodeEventArgs(this)); } @@ -74,7 +121,7 @@ public void HandleCheckbox(object sender, ChangeEventArgs args) { this.Checked = (bool)args.Value; - ParentTreeView.OnTreeNodeCheckChanged?.Invoke(this, new TreeNodeEventArgs(this)); + ParentTreeView.OnTreeNodeCheckChanged.InvokeAsync(new TreeNodeEventArgs(this)); } diff --git a/src/BlazorWebFormsComponents/TreeNodeBinding.cs b/src/BlazorWebFormsComponents/TreeNodeBinding.cs index 1c3d719..76efaa1 100644 --- a/src/BlazorWebFormsComponents/TreeNodeBinding.cs +++ b/src/BlazorWebFormsComponents/TreeNodeBinding.cs @@ -11,9 +11,24 @@ public class TreeNodeBinding : ComponentBase { [Parameter] public string DataMember { get; set; } + [Parameter] + public string ImageToolTipField { get; set; } + + [Parameter] + public string ImageUrlField { get; set; } + + [Parameter] + public string NavigateUrlField { get; set; } + + [Parameter] + public string TargetField { get; set; } + [Parameter] public string TextField { get; set; } + [Parameter] + public string ToolTipField { get; set; } + protected override Task OnParametersSetAsync() { @@ -22,6 +37,12 @@ protected override Task OnParametersSetAsync() return base.OnParametersSetAsync(); } + public override string ToString() { + + return $""; + + } + } diff --git a/src/BlazorWebFormsComponents/TreeView.razor b/src/BlazorWebFormsComponents/TreeView.razor index ec5069d..01d9dc4 100644 --- a/src/BlazorWebFormsComponents/TreeView.razor +++ b/src/BlazorWebFormsComponents/TreeView.razor @@ -1,4 +1,4 @@ -@inherits BlazorWebFormsComponents.BaseWebFormsComponent +@inherits BlazorWebFormsComponents.BaseDataBindingComponent
diff --git a/src/BlazorWebFormsComponents/TreeView.razor.cs b/src/BlazorWebFormsComponents/TreeView.razor.cs index 8855e1f..b82ad52 100644 --- a/src/BlazorWebFormsComponents/TreeView.razor.cs +++ b/src/BlazorWebFormsComponents/TreeView.razor.cs @@ -12,7 +12,7 @@ namespace BlazorWebFormsComponents { - public partial class TreeView : BaseWebFormsComponent, IHasStyle + public partial class TreeView : BaseDataBindingComponent, IHasStyle { [Parameter] @@ -27,6 +27,9 @@ public partial class TreeView : BaseWebFormsComponent, IHasStyle [Parameter] public object DataSource { get; set; } + [Parameter] + public TreeViewImageSet ImageSet { get; set; } = TreeViewImageSet._Default; + [Parameter] public TreeNodeTypes ShowCheckBoxes { get; set; } @@ -65,13 +68,16 @@ protected override async Task OnAfterRenderAsync(bool firstRender) } [Parameter] - public EventHandler OnTreeNodeExpanded { get; set; } + public EventCallback OnTreeNodeDataBound { get; set; } [Parameter] - public EventHandler OnTreeNodeCollapsed { get; set; } + public EventCallback OnTreeNodeCheckChanged { get; set; } [Parameter] - public EventHandler OnTreeNodeCheckChanged { get; set; } + public EventCallback OnTreeNodeCollapsed { get; set; } + + [Parameter] + public EventCallback OnTreeNodeExpanded { get; set; } #endregion @@ -82,17 +88,27 @@ protected override async Task OnAfterRenderAsync(bool firstRender) private new Task DataBind() { - if (DataSource is XmlDocument) return DataBindXml(DataSource as XmlDocument); + OnDataBinding.InvokeAsync(EventArgs.Empty); + + if (DataSource is XmlDocument xmlDoc) { + + if (xmlDoc.SelectSingleNode("/*").LocalName == "siteMap") + DataBindSiteMap(xmlDoc); + else + DataBindXml((DataSource as XmlDocument).SelectNodes("/*")); + + } + + OnDataBound.InvokeAsync(EventArgs.Empty); return Task.CompletedTask; } - private Task DataBindXml(XmlDocument src) + private Task DataBindXml(XmlNodeList elements) { var treeNodeCounter = 0; - var elements = src.SelectNodes("/*"); ChildNodesRenderFragment = b => { @@ -113,6 +129,7 @@ void AddElements(RenderTreeBuilder builder, XmlNodeList siblings) foreach (XmlNode node in siblings) { + if (!(node is XmlElement)) continue; var element = node as XmlElement; @@ -123,17 +140,34 @@ void AddElements(RenderTreeBuilder builder, XmlNodeList siblings) builder.OpenComponent(treeNodeCounter++); + if (!string.IsNullOrEmpty(thisBinding.ImageToolTipField)) + builder.AddAttribute(treeNodeCounter++, "ImageToolTip", element.GetAttribute(thisBinding.ImageToolTipField)); + if (!string.IsNullOrEmpty(thisBinding.ImageUrlField)) + builder.AddAttribute(treeNodeCounter++, "ImageUrl", element.GetAttribute(thisBinding.ImageUrlField)); + if (!string.IsNullOrEmpty(thisBinding.NavigateUrlField)) + builder.AddAttribute(treeNodeCounter++, "NavigateUrl", element.GetAttribute(thisBinding.NavigateUrlField)); + if (!string.IsNullOrEmpty(thisBinding.TargetField)) + builder.AddAttribute(treeNodeCounter++, "Target", element.GetAttribute(thisBinding.TargetField)); + + // Text must be present, no need to test builder.AddAttribute(treeNodeCounter++, "Text", element.GetAttribute(thisBinding.TextField)); + if (!string.IsNullOrEmpty(thisBinding.ToolTipField)) + builder.AddAttribute(treeNodeCounter++, "ToolTip", element.GetAttribute(thisBinding.ToolTipField)); + + if (element.HasChildNodes) { builder.AddAttribute(treeNodeCounter++, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((_builder) => { AddElements(_builder, element.ChildNodes); + })); } builder.CloseComponent(); + OnTreeNodeDataBound.InvokeAsync(new TreeNodeEventArgs(null)); + } } @@ -141,7 +175,15 @@ void AddElements(RenderTreeBuilder builder, XmlNodeList siblings) } - private List _TreeNodeBindings = new List(); + private Task DataBindSiteMap(XmlDocument src) { + + _TreeNodeBindings.First().DataMember = "siteMapNode"; + + return DataBindXml(src.SelectNodes("/siteMap/siteMapNode")); + + } + + private HashSet _TreeNodeBindings = new HashSet(); internal void AddTreeNodeBinding(TreeNodeBinding treeNodeBinding) { _TreeNodeBindings.Add(treeNodeBinding); diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_Collapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_Collapse.gif new file mode 100644 index 0000000..5b32d62 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_Collapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_Expand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_Expand.gif new file mode 100644 index 0000000..6c19eb4 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_Expand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_NoExpand.gif new file mode 100644 index 0000000..073fd3b Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Arrows_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_LeafNode.gif new file mode 100644 index 0000000..ea2d11f Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_ParentNode.gif new file mode 100644 index 0000000..ed24cdf Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_RootNode.gif new file mode 100644 index 0000000..ed24cdf Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList2_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_LeafNode.gif new file mode 100644 index 0000000..9ad7702 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_ParentNode.gif new file mode 100644 index 0000000..5880e8a Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_RootNode.gif new file mode 100644 index 0000000..5880e8a Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList3_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_LeafNode.gif new file mode 100644 index 0000000..9ad7702 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_ParentNode.gif new file mode 100644 index 0000000..5880e8a Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_RootNode.gif new file mode 100644 index 0000000..f721b21 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList4_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_LeafNode.gif new file mode 100644 index 0000000..db5dd01 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_ParentNode.gif new file mode 100644 index 0000000..bee9f60 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_RootNode.gif new file mode 100644 index 0000000..bee9f60 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/BulletedList_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_Collapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_Collapse.gif new file mode 100644 index 0000000..eccb9ea Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_Collapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_Expand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_Expand.gif new file mode 100644 index 0000000..eccb9ea Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_Expand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_NoExpand.gif new file mode 100644 index 0000000..2fe28ee Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Contacts_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/node_expanded.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Collapse.gif similarity index 100% rename from src/BlazorWebFormsComponents/wwwroot/TreeView/node_expanded.gif rename to src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Collapse.gif diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Dash.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Dash.gif new file mode 100644 index 0000000..0f039fa Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Dash.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_DashCollapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_DashCollapse.gif new file mode 100644 index 0000000..f3073d8 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_DashCollapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_DashExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_DashExpand.gif new file mode 100644 index 0000000..3f249da Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_DashExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/node_collapsed.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Expand.gif similarity index 100% rename from src/BlazorWebFormsComponents/wwwroot/TreeView/node_collapsed.gif rename to src/BlazorWebFormsComponents/wwwroot/TreeView/Default_Expand.gif diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_I.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_I.gif new file mode 100644 index 0000000..8ed8768 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_I.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_L.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_L.gif new file mode 100644 index 0000000..0b9af7e Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_L.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_LCollapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_LCollapse.gif new file mode 100644 index 0000000..f393445 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_LCollapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_LExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_LExpand.gif new file mode 100644 index 0000000..2c33ad6 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_LExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_NoExpand.gif new file mode 100644 index 0000000..70ba9f0 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_R.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_R.gif new file mode 100644 index 0000000..419260e Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_R.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_RCollapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_RCollapse.gif new file mode 100644 index 0000000..fadfa59 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_RCollapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_RExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_RExpand.gif new file mode 100644 index 0000000..ab15ed4 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_RExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_T.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_T.gif new file mode 100644 index 0000000..cc77522 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_T.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_TCollapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_TCollapse.gif new file mode 100644 index 0000000..4e6850e Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_TCollapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_TExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_TExpand.gif new file mode 100644 index 0000000..1b690f3 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Default_TExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_LeafNode.gif new file mode 100644 index 0000000..0f29ae3 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_ParentNode.gif new file mode 100644 index 0000000..2d11a09 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_RootNode.gif new file mode 100644 index 0000000..2d11a09 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Events_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_LeafNode.gif new file mode 100644 index 0000000..f08a6fd Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_ParentNode.gif new file mode 100644 index 0000000..f5c4788 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_RootNode.gif new file mode 100644 index 0000000..f5c4788 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/FAQ_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_LeafNode.gif new file mode 100644 index 0000000..33a7424 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_ParentNode.gif new file mode 100644 index 0000000..04a9bd0 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_RootNode.gif new file mode 100644 index 0000000..67b3c8c Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Inbox_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_Collapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_Collapse.gif new file mode 100644 index 0000000..46acbcc Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_Collapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_Expand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_Expand.gif new file mode 100644 index 0000000..0ce509a Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_Expand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_NoExpand.gif new file mode 100644 index 0000000..dda8c62 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/MSDN_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/News_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/News_LeafNode.gif new file mode 100644 index 0000000..275b852 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/News_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/News_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/News_ParentNode.gif new file mode 100644 index 0000000..567901d Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/News_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/News_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/News_RootNode.gif new file mode 100644 index 0000000..72ffd01 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/News_RootNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Simple2_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Simple2_NoExpand.gif new file mode 100644 index 0000000..e1279a9 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Simple2_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/Simple_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/Simple_NoExpand.gif new file mode 100644 index 0000000..f07dfa9 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/Simple_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_Collapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_Collapse.gif new file mode 100644 index 0000000..d33d84e Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_Collapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_Expand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_Expand.gif new file mode 100644 index 0000000..ee0172c Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_Expand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_NoExpand.gif new file mode 100644 index 0000000..f654d92 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/WindowsHelp_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_Collapse.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_Collapse.gif new file mode 100644 index 0000000..f0b5c5e Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_Collapse.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_Expand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_Expand.gif new file mode 100644 index 0000000..49c0d5c Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_Expand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_LeafNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_LeafNode.gif new file mode 100644 index 0000000..18ddc8d Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_LeafNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_NoExpand.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_NoExpand.gif new file mode 100644 index 0000000..2b9bcca Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_NoExpand.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_ParentNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_ParentNode.gif new file mode 100644 index 0000000..1e67465 Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_ParentNode.gif differ diff --git a/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_RootNode.gif b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_RootNode.gif new file mode 100644 index 0000000..9212f9c Binary files /dev/null and b/src/BlazorWebFormsComponents/wwwroot/TreeView/XP_Explorer_RootNode.gif differ diff --git a/src/Treeview.playlist b/src/Treeview.playlist index d549eb0..9d154eb 100644 --- a/src/Treeview.playlist +++ b/src/Treeview.playlist @@ -1 +1,12 @@ - \ No newline at end of file + + + + + + + + + + + + \ No newline at end of file