As covered in the previous post [A Generic App for displaying Sample Apps]](/blazor/Blazor-A_Generic_App_for_displaying_Sample_Apss-blazor.html), a folder of sample apps is recursive serached for project files on the server. This information is placed in a tree which also unfolds to a a list. This list is passed to the client which uses a Blazor Component to display that content in the tree format, recursively. This post discusses the recurse Component.

Each instance of the component, if not collapsed, displays the information for one instance of the FolderTree list. That is, the files in that folder, its name etc. It also displays a list of each child of the folder as an instance of the Component in a collapsed manner. On clicking a collapsed instance, that instance unfolds reveeling the files therein and the collapsed child components. It also collapses any sibling folders (folders in the same parent folder) that are open.

Toggling Folder Content

FoldingMenu

Viewing files in a folder

Files listed for a folder when clicked initiate a download from the server of there contents for display on the client, as below. (See subsequent posts on this.)

AppMenu

If there is a solution file in a folder, there is an option to zip up the corresponding folder on the server as well as subfolders and downlaod that to the client.

Viewing a Project Folder

For project folders, there is an option to view its contents in a separate page which enables the download and direct viewing of those files. That folder can be zipped up there as well.

ProjectFolder
 TopicSubtopic
   
 This Category Links 
Category:Blazor Index:Blazor
  Next: > Blazor
<  Prev:   Blazor