Silverlight TreeView template creaton

It seems like Silverlight TreeView shows all child levels if we put appropriate number of hierarchical templates.

Is it true?

For example if I have under database table 100 levels of the items is there some way to show all of them without adding extra template section?

I mean is there some general template that serves to show unlimited child levels?

The template below shows 2 levels but in fact under the database I can have 1000 levels.

<sdk:HierarchicalDataTemplate x:Key="ChildTemplate" > <TextBlock FontStyle="Italic" Text="{Binding Path=Title}" /> </sdk:HierarchicalDataTemplate> <sdk:HierarchicalDataTemplate x:Key="NameTemplate" ItemsSource="{Binding Path=ChildTopics}" ItemTemplate="{StaticResource ChildTemplate}"> <TextBlock Text="{Binding Path=Title}" FontWeight="Bold" /> </sdk:HierarchicalDataTemplate>

Category:templates Views:0 Time:2012-03-30

Related post

  • Custom Silverlight TreeView Template 2011-05-05

    I build tree with Hierarchical datatemplate (with button beside each node) loaded from xml file. What I want to do is when i press the button beside the node it will open node details in a popup inside the tree (Like tree sub node) Any ideas ???? I'm

  • How can I use predefined headers inside a Silverlight treeview for each item? 2010-12-16

    For my Silverlight TreeView's items source I have a collection of Order items, and each Order has two collections, OrderItems and Commissions. So I want a treeview that looks kind of like Order #1 - Order Items - Order Item #1 - Order Item #2 - Order

  • WPF/Silverlight XAML template for a glass button 2009-04-15

    It seems like a simple thing - but... I want to create a WPF/Silverlight XAML template for a glass button that contains an image and a label - both the image and the label use template binding so that different images and labels can be specified for

  • Silverlight TreeView detect node expansion 2009-05-28

    I must be missing something obvious - how can I detect when a node is expanded in a Silverlight TreeView? --------------Solutions------------- Unfortunately "SelectedItemChanged" is not a routed event yet. So the closest you could get is using this:

  • Silverlight Encoder Templates, is it possible to change the background colour? 2009-10-28

    Is it possible to change the default background colour of black in Silverlight Encoder Templates? We have a website that requires a white background, instead of the default black bars for aspect ratio video. I'm using Expression Studio 3. Any help wo

  • How to Edit a Silverlight treeview data bound to ria services then to Entity Framework and SQL recursive table 2010-09-27

    I am searching for guidance on how to edit add, update and delete on a Silverlight treeview connected to a simple hierarchical sql server table using entity framework, ria services and data binding. --------------Solutions------------- I've looked th

  • Does the Silverlight Navigation template work with running out of browser? 2011-01-14

    Does the Silverlight Navigation template work when running out of browser? --------------Solutions------------- Sure it does. And you can use the NavigationServices functions to create a custom "Back" or "Forward" button great example here : Link Cre

  • Silverlight TreeView using MVVM pattern has large footprint 2011-01-19

    I have a Silverlight TreeView where each node is a TreeNodeViewModel. The properties on the TreeNodeViewModel's are, Text, IsSelected, ImageUri, and Parent. I'm loading about 700 to 1000 TreeView items. What seems to be happening is that after loadin

  • How do I disable dragging between items in Silverlight treeview? 2011-08-11

    Using the Silverlight treeview with the TreeViewDragDropTarget in the SL Toolkit enables me to drag & drop both into nodes as well as in between nodes. However, in my implementation, I only want dropping onto nodes ... not in between. Is there a

  • Edit the default VS 2010 Silverlight Project Template 2011-09-07

    Does anyone know where I can find the default Silverlight Project Template used in Visual Studio 2010. Every time I create a new SL project I need to add one namespace in MainPage.xaml, so I thought it would be nice to add it straight into the templa

  • TreeView template for a tree with circular type reference 2012-01-07

    I need to display a tree bound to this kind of hierarchical objects: public class Node { public string Name public List<Connector> Connector; } public class Connector { public string Name public List<Node> TrueChildren; } so the actual ch

  • Silverlight Business Template | Authentication (User, Roles) | WCF Services | Not WCF RIA 2012-02-08

    I am using Silverlight Business Template for creating a Silverlight application. I have multiple services (WCF Plain, not WCF RIA). When we create Silverlight Business Template type application, we get login stuff (more like boilerplate code). I want

  • Silverlight : Custom template for a hierarchy treeview 2009-04-09

    I am using silverlight and want to dynamically generate a hierararchy tree in the following format : Since Silverlight controls are lookless,how can I structure a template that ultimately look like the image? --------------Solutions------------- I've

  • Silverlight TreeView ScrollBars disappear inside a StackPanel 2009-01-28

    I'm building a project that loads data from a webservice into a TreeView Control. When the TreeView is contained on the LayoutRoot grid by itself and it's height is set to Auto, if the contents extend beyond the vertical or horizontal limits of the t

  • Custom expand/collapse symbols in Silverlight TreeView using HierarchicalDataTemplate 2010-08-09

    I have a TreeView control where nodes are dynamically built using a HierarchicalDataTemplate. In other words, no TreeViewItems are explicitly defined in the XAML. TreeViewItems are instead created automatically when the data are bound at runtime (I c

  • How can I have multiple types of children in a single Silverlight TreeView node? 2010-11-30

    Short Vesion: I have to display a hierarchy (TreeView) of items of different types, and am not sure how to do this cleanly in Silverlight. In WPF, it's straightforward to define templates (HierarchicalDataTemplate) based on types, but this feature is

  • How can I maintain the current selection in a sorted silverlight treeview? 2010-12-06

    I have a silverlight 4 TreeView control with a hierarchy of data. I want the items in each level to be sorted alphabetically, so I am using a CollectionViewSource, but don't actually care how the sorting is accomplished. The CollectionViewSource seem

  • Mixing dynamic and fixed items in Silverlight TreeView 2010-12-21

    I'm attempting to create a TreeView in Silverlight that contains both fixed elements and databound ones. I am able to produce one that creates the desired effect, but it's not perfect - it highlights parent+child nodes as a single TreeViewItem. The e

  • Silverlight TreeView with Multiple Objects 2011-09-08

    I am having a bit of an issue with the TreeView in SilverLight. I need to be able to have multiple datatemplates on the tree because different objects are going to need to display different data on the tree. This isn't possible right out of the gate

Copyright (C), All Rights Reserved.

processed in 0.122 (s). 11 q(s)