When a node in my TreeView has multiple lines, the TreeView bullet gets vertically centered.
How can I top-align the TreeView bullet?
<pages:BasePage.Resources>
<data:HierarchicalDataTemplate x:Key="OutlineTemplate"
ItemsSource="{Binding OutlineDocumentObjects}">
<TextBlock Text="{Binding Line}"
TextW...
I am having problems populating my treeview beyond the first level when the xml is using the same class name to have unlimited levels. I have used Xsd2Code to create the object class.
To keep this post from being 3000 lines long, I am including a link for downloading the project. It can be downloaded here
My XML example
<Testing>
...
Hello Everyone. the problem i have is somewhat difficult to explain i will try my best: i am using a custom control called "TasklItem" (derived from Panel). this control renders itself hierarchically in a treeview using following HierarchicalDataTemplate:
<Grid Name="TaskItemTempl...
I am using a HierarchicalDataTemplate to bind my classes to a TreeView with checkboxes. I have the code working fine and everything is displayed fine, but I'd like to be able to get a list of children of an item in my treeview.
When a checkbox is clicked, I want to be able to select the parent nodes and child nodes. If I had access to...
I needed to build a custom treeview as a user control. I called it for the sake of the example TreeViewEx :
<UserControl x:Class="WpfApplication4.TreeViewEx"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="root">
<...
Hi, how can I get the constituent controls making up the TreeViewItem in code if they are inside a hierarichicaldatatemplate?
<HierarchicalDataTemplate DataType="{x:Type local:Module}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<Image Width="16" Height="16" Margin="3,0" Source="I...
Hi!
I have a WPF TreeView with 2 levels of data and 2 HierarchicalDataTemplate to format each level. From the HierarchicalDataTemplate at the second level, I need to bind a property in the class of the first level. I have tried in this way, but it dosn't work:
Text="{Binding Path=Ori, RelativeSource={RelativeSource TemplatedParent}}"
wi...
First, sorry for my bad english.
I have an EF entity that looks like:
class Item
{
public Guid Id { get; set; }
public string Title{ get; set; }
public Guid? ParentId { get; set; }
public ICollection<Item> Items { get; set; }
}
Now i want to load the data from that entity on a treeview... the best I could get is...
This problem has been solved before, but I'm just not getting it with examples I'm finding online.
I have a class, lets say 'ClassA', this class has 2 string properties, 'Property1' and 'Property2' as well as an IEnumerable where 'ClassB' also has 2 properties. The list of ClassB will all be displayed in a nested treeview
I want these ...
I have a bit of a complex situation with WPF Treeview Binding. I have spent the last 2 days trying Google it, and this is the closed I came up with, but it doesn't solve the issue.
Here is the situation:
I have an object that looks like this:
public class Category
{
public string Name { get; set; }
public List<Category> Categorie...
Given that:
DataTemplates cannot be assigned by TargetType
StaticResource references can only reference previously
How does one template the following situation in a TreeView?
class Resource {
public string Name {get;}
public IEnumerable<Property> Properties {get;}
}
class Property {
public string Name {get;}
public IEn...
I am relatively new to the Silverlight experience and am trying to create a MVVM app with a DomainService that returns POCOs as the models. I have a UserControl that has a TreeView with the ItemsSource set to bind to an ObservableCollection of a type that has an ObservableCollection as one of it's properties, and that collection is of a ...
I have a huge issue with the WPF TreeView. I have setup a tree that is similar to this.
<TreeView DataContext="{Binding Projects}">
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="True" />
</Style>
<TreeView.Resources>
<HierarchicalDataTemplate x:Key="LoadTemplate">
<Grid>
...