I've followed the guide for implementing tri-state checkbox logic using MVVM in the link below. While the logic itself works great, it completely breaks the calls to the Checked and Unchecked events from the treeview control.
http://www.telerik.com/help/silverlight/radtreeview-howto-tri-state-mvvm.html
I attempted to remedy that by also binding to the CheckState of the treeview container, but that doesn't seem to have helped. Here is my current binding setup
And here is a sample tree view declaration.
Is there a way for me to fire off the Checked/Unchecked events for the treeview when the checkbox in the ItemTemplate is checked? The events are bound programmatically so I would prefer a method that would allow me to continue doing it programmatically. My code currently needs the actual RadTreeViewItem for the item being checked so I can't simply fire something off in the bound data item that would tie it back to the corresponding treeview control.
http://www.telerik.com/help/silverlight/radtreeview-howto-tri-state-mvvm.html
I attempted to remedy that by also binding to the CheckState of the treeview container, but that doesn't seem to have helped. Here is my current binding setup
<
telerik:ContainerBindingCollection
x:Key
=
"TreeViewCheckStateContainerBinding"
>
<
telerik:ContainerBinding
PropertyName
=
"CheckState"
Binding
=
"{Binding CheckedStatus, Mode=TwoWay}"
/>
<
telerik:ContainerBinding
PropertyName
=
"IsExpanded"
Binding
=
"{Binding IsExpanded, Mode=TwoWay}"
/>
</
telerik:ContainerBindingCollection
>
<
telerik:HierarchicalDataTemplate
x:Key
=
"FilterTreeItem"
ItemsSource
=
"{Binding Children}"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource TreeViewCheckStateContainerBinding}"
>
<
StackPanel
Orientation
=
"Horizontal"
VerticalAlignment
=
"Center"
>
<
CheckBox
IsChecked
=
"{Binding IsChecked, Mode=TwoWay}"
/>
<
TextBlock
Text
=
"{Binding Name}"
Foreground
=
"Black"
FontSize
=
"13"
/>
<!--ToolTipService.ToolTip="{Binding Code}"-->
</
StackPanel
>
</
telerik:HierarchicalDataTemplate
>
And here is a sample tree view declaration.
<
telerikNavigation:RadTreeView
x:Name
=
"InvHomeCatTree"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
ItemTemplate
=
"{StaticResource FilterTreeItem}"
IsLineEnabled
=
"True"
IsOptionElementsEnabled
=
"False"
IsRootLinesEnabled
=
"True"
animation:AnimationManager.IsAnimationEnabled
=
"False"
IsExpandOnSingleClickEnabled
=
"True"
/>
Is there a way for me to fire off the Checked/Unchecked events for the treeview when the checkbox in the ItemTemplate is checked? The events are bound programmatically so I would prefer a method that would allow me to continue doing it programmatically. My code currently needs the actual RadTreeViewItem for the item being checked so I can't simply fire something off in the bound data item that would tie it back to the corresponding treeview control.