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
45
Nesting in XamDataTree
posted

Hello,

I have a data class like this:

public class UICameraTree : NotificationObject
{
    private string _stakeholderName;
    private ObservableCollection<UICamera> _cameraList = new ObservableCollection<UICamera>();
    private ObservableCollection<UICameraTree> _cameraTree = new ObservableCollection<UICameraTree>();

    public string StakeHolderName
    {
        get { return _stakeholderName; }
        set
        {
            _stakeholderName = value;
            base.RaisePropertyChanged(() => StakeHolderName);
        }
    }
    public ObservableCollection<UICamera> CameraList
    {
        get { return _cameraList; }
    }
    public ObservableCollection<UICameraTree> CameraTree
    {
        get { return _cameraTree; }
    }
}

And XAML like:

<ig:XamDataTree x:Name="CameraDataTree" Grid.Row="1" Style="{StaticResource DASXamDataTree}" ItemsSource="{Binding UICameraTree.CameraTree}" IsDraggable="True">
    <ig:XamDataTree.CheckBoxSettings>
        <ig:CheckBoxSettings CheckBoxVisibility="Hidden" />
    </ig:XamDataTree.CheckBoxSettings>
    <ig:XamDataTree.GlobalNodeLayouts>
        <ig:NodeLayout Key="GroupLayout" TargetTypeName="UICameraTree" DisplayMemberPath="StakeHolderName"/>
        <ig:NodeLayout Key="ItemLayout" TargetTypeName="UICamera" DisplayMemberPath="CameraList\CameraName />
    </ig:XamDataTree.GlobalNodeLayouts>
</ig:XamDataTree>

How can I get rid off "GroupLayout" and "ItemLayout" from the tree?

Thank you!

David