In my XAML i bind directly to the treeview's CheckState with my business object, like so:
See attached screenshot. When bound to my observable collection it all works well (on, off, inderminate), but if I expand Toplevel2 and check Cat1 the checked event is fired only for Cat1 and not it's children. If I expand Cat1 first and then check it, all three items have their checked event fired. If I remove the bindingscollection the treeview behaves as expected - both when Cat1 is expanded or collapsed (all three items fire their event). Is this intended behaviour? It seems a little odd to me and I don't want to manually code if I don't have to.
<
telerik:ContainerBindingCollection
x:Name
=
"BindingsCollection"
>
<
telerik:ContainerBinding
PropertyName
=
"CheckState"
Binding
=
"{Binding ToggleState, Mode=TwoWay}"
/>
</
telerik:ContainerBindingCollection
>
<
telerik:RadTreeView
x:Name
=
"RadTreeView1"
Checked
=
"CheckBoxChecked"
Unchecked
=
"CheckBoxChecked"
ItemsOptionListType
=
"CheckList"
IsOptionElementsEnabled
=
"True"
IsDragDropEnabled
=
"False"
SelectionMode
=
"Single"
IsTriStateMode
=
"True"
IsEditable
=
"False"
BorderThickness
=
"1"
telerik:AnimationManager.IsAnimationEnabled
=
"False"
>
<
telerik:RadTreeView.ItemTemplate
>
<
telerik:HierarchicalDataTemplate
ItemsSource
=
"{Binding ChildItems}"
telerik:ContainerBinding.ContainerBindings
=
"{StaticResource BindingsCollection}"
>
<
Grid
>
<
TextBlock
Text
=
"{Binding name}"
ToolTipService.ToolTip
=
"{Binding description}"
/>
</
Grid
>
</
telerik:HierarchicalDataTemplate
>
</
telerik:RadTreeView.ItemTemplate
>
</
telerik:RadTreeView
>
See attached screenshot. When bound to my observable collection it all works well (on, off, inderminate), but if I expand Toplevel2 and check Cat1 the checked event is fired only for Cat1 and not it's children. If I expand Cat1 first and then check it, all three items have their checked event fired. If I remove the bindingscollection the treeview behaves as expected - both when Cat1 is expanded or collapsed (all three items fire their event). Is this intended behaviour? It seems a little odd to me and I don't want to manually code if I don't have to.