Hi there,
My customer would like to have a "HardCoded" text as one of the child node.
I have a RadTreeview with 3 to 4 level deep of treeview items. First 3 levels are dynamically populated. At the end I would like to have
"HardCoded" text as another treeview item. Something like this.
AccountWkb -> AccountInformation -> Balances (My ViewModel has a observable collection of property for each Items.)
AccountWkb -> OtherOrders -> MutualFund
Now I would like to add a "HardCoded" text as another treeview item.
For E.g Output should be
AccountWkb -> AccountInformation -> Balances -> Fields
AccountWkb -> OtherOrders -> MutualFund -> Fields
(So when I expand the "Balances" node or "MutualFund" node, it should populate "Fields" as its sub node. So that I can populate list of fields for respective location.)
I have attached my Xaml where I defined my RadTreeview.
Also I have attached a screen shot of how my location should look like.
Myself and my customer will highly appreciate your timely help.
Thanks in advance.
My customer would like to have a "HardCoded" text as one of the child node.
I have a RadTreeview with 3 to 4 level deep of treeview items. First 3 levels are dynamically populated. At the end I would like to have
"HardCoded" text as another treeview item. Something like this.
AccountWkb -> AccountInformation -> Balances (My ViewModel has a observable collection of property for each Items.)
AccountWkb -> OtherOrders -> MutualFund
Now I would like to add a "HardCoded" text as another treeview item.
For E.g Output should be
AccountWkb -> AccountInformation -> Balances -> Fields
AccountWkb -> OtherOrders -> MutualFund -> Fields
<
UserControl.Resources
>
<
ResourceDictionary
>
<
Style
x:Key
=
"RADTreeViewItemStyle"
TargetType
=
"telerik:RadTreeViewItem"
>
<
Setter
Property
=
"HorizontalAlignment"
Value
=
"Left"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Left"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"CheckState"
Value
=
"Off"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"1"
/>
<
Setter
Property
=
"Padding"
Value
=
"1 0 5 0"
/>
<
Setter
Property
=
"IsDropAllowed"
Value
=
"True"
/>
<
Setter
Property
=
"ItemsOptionListType"
Value
=
"Default"
/>
<
Setter
Property
=
"IsEnabled"
Value
=
"True"
/>
<
Setter
Property
=
"MinHeight"
Value
=
"24"
/>
<
Setter
Property
=
"Template"
Value
=
"{StaticResource TreeViewItemDefaultTemplate}"
/>
<
Setter
Property
=
"ItemsPanel"
>
<
Setter.Value
>
<
ItemsPanelTemplate
>
<
telerik:TreeViewPanel
VerticalAlignment
=
"Bottom"
/>
</
ItemsPanelTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
<
telerik:ContainerBindingCollection
x:Name
=
"BindingsCollections"
>
<
telerik:ContainerBinding
PropertyName
=
"IsSelected"
Binding
=
"{Binding IsSelected, Mode=TwoWay}"
/>
<
telerik:ContainerBinding
PropertyName
=
"IsExpanded"
Binding
=
"{Binding IsExpanded, Mode=TwoWay}"
/>
<
telerik:ContainerBinding
PropertyName
=
"IsLoadOnDemandEnabled"
Binding
=
"{Binding IsLoadOnDemandEnabled, Mode=TwoWay}"
/>
</
telerik:ContainerBindingCollection
>
<
telerik:HierarchicalDataTemplate
x:Key
=
"AvailableFieldTemplate"
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
telerik:HierarchicalDataTemplate
>
<
telerik:HierarchicalDataTemplate
x:Key
=
"FunctionTemplate"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource BindingsCollections}"
ItemTemplate
=
"{StaticResource AvailableFieldTemplate}"
ItemsSource
=
"{Binding AvailableFields}"
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
telerik:HierarchicalDataTemplate
>
<
telerik:HierarchicalDataTemplate
x:Key
=
"FeatureTemplate"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource BindingsCollections}"
ItemTemplate
=
"{StaticResource FunctionTemplate}"
ItemsSource
=
"{Binding Functions}"
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
telerik:HierarchicalDataTemplate
>
<
telerik:HierarchicalDataTemplate
x:Key
=
"ApplicationTemplate"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource BindingsCollections}"
ItemTemplate
=
"{StaticResource FeatureTemplate}"
ItemsSource
=
"{Binding Features}"
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
telerik:HierarchicalDataTemplate
>
</
ResourceDictionary
>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<!--<StackPanel>-->
<
telerik:RadTreeView
x:Name
=
"LocationsView_RadTreeView"
VerticalAlignment
=
"Top"
ItemContainerStyle
=
"{StaticResource RADTreeViewItemStyle}"
ItemsSource
=
"{Binding RelativeSource={RelativeSource AncestorType=uc:BaseMainView}, Path=DataContext.FieldEditorViewModel.SelectedProductCatalog, Mode=TwoWay}"
ItemTemplate
=
"{StaticResource ApplicationTemplate}"
SelectionMode
=
"Single"
IsLoadOnDemandEnabled
=
"True"
LoadOnDemand
=
"LocationsView_RadTreeView_LoadOnDemand"
IsExpandOnSingleClickEnabled
=
"True"
SelectedItem
=
"{Binding Path=SelectedItem, Mode=TwoWay}"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
>
</
telerik:RadTreeView
>
<!--</StackPanel>-->
</
Grid
>
</
Grid
>
(So when I expand the "Balances" node or "MutualFund" node, it should populate "Fields" as its sub node. So that I can populate list of fields for respective location.)
I have attached my Xaml where I defined my RadTreeview.
Also I have attached a screen shot of how my location should look like.
Myself and my customer will highly appreciate your timely help.
Thanks in advance.