Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
290
XamDataTree with ViewModel itemsource and Checkboxes
posted

Hello, I have a XamDataTree defined as follows:

                       

<ig:XamDataTree x:Name="_MenuTree"
                        ItemsSource="{Binding Menus}"
                       SelectedDataItems="{Binding SelectedMenuItems}"
                        NodeLineVisibility="Visible"
                         IsExpandedMemberPath="IsExpanded"
                        NodeCheckedChanged="TreeNodeCheckedChanged">
                    <ig:XamDataTree.CheckBoxSettings>
                              <ig:CheckBoxSettings CheckBoxVisibility="Visible"
                                                           CheckBoxMode="Auto" />
                    </ig:XamDataTree.CheckBoxSettings>
                    <ig:XamDataTree.SelectionSettings>
                                          <ig:TreeSelectionSettings NodeSelection="Multiple" />
                     </ig:XamDataTree.SelectionSettings>
                     <ig:XamDataTree.GlobalNodeLayouts>
                                              <ig:NodeLayout Key="MenuLayout"
                                                                       TargetTypeName="clsMenuItem"
                                                                       DisplayMemberPath="Description"
                                                                       CheckBoxMemberPath="IsSelected">

                                               </ig:NodeLayout>
                        </ig:XamDataTree.GlobalNodeLayouts>
</ig:XamDataTree>

The Menus property is in the ViewModel and is an ObservableCollection of clsMenuItem. clsMenuItem has the following properties: ID (int), Description (string) and ChildItems (ObservableCollection(of clsMenuItem))

I looked at one of the other similar posts on the forums board, but in my case, I don't see anything on the screen when then form loads, even though the Menus property has proper stuff in it.

What am I missing / doing wrong?