This question is locked. New answers and comments are not allowed.
Hello,
I have created a class which is compilcated to bind to the PanelBar, so i need few advices from you.
Here is my class :
In fact, I want each PanelBarItem has :
- the header binded on Organization property
- contains a TreeView where first parents nodes are each FolderType in Items property and childs of each parent node is the DataItemTreeViewCollection associate.
Ex :
- FolderType01
----DataItemTreeViewCollection01
- FolderType02
----DataItemTreeViewCollection02
I can set the header of each item by setting the ItemTemplate like this in RadPanelBar
But i can't set the content.
DataItemTreeViewCollection class is a recursive class who works fine with HierarchicalDataTemplate Do you understand, what i want ? Best regards, Guillaume
I have created a class which is compilcated to bind to the PanelBar, so i need few advices from you.
Here is my class :
public class FlowTreeModel : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private Organization _organization; private Dictionary<FolderType, DataItemTreeViewCollection> _items; public Organization Organization { get { return _organization; } set { _organization = value; OnPropertyChanged("Organization"); } } public Dictionary<FolderType, DataItemTreeViewCollection> Items { get { return _items; } set { _items = value; OnPropertyChanged("Items"); } } public FlowTreeModel() { Items = new Dictionary<FolderType, DataItemTreeViewCollection>(); } /// <summary> /// Called when [property changed]. /// </summary> /// <param name="propertyName">Name of the property.</param> public void OnPropertyChanged(string propertyName) { if (this.PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }In fact, I want each PanelBarItem has :
- the header binded on Organization property
- contains a TreeView where first parents nodes are each FolderType in Items property and childs of each parent node is the DataItemTreeViewCollection associate.
Ex :
- FolderType01
----DataItemTreeViewCollection01
- FolderType02
----DataItemTreeViewCollection02
I can set the header of each item by setting the ItemTemplate like this in RadPanelBar
ItemTemplate="{StaticResource HeaderDataTemplate}"<DataTemplate x:Key="HeaderDataTemplate"> <Grid> <TextBlock Text="{Binding Organization.Name}" Margin="5,5,0,5"/> </Grid> </DataTemplate>DataItemTreeViewCollection class is a recursive class who works fine with HierarchicalDataTemplate Do you understand, what i want ? Best regards, Guillaume
