hello
here is my xaml
<ig:XamOrgChart ItemsSource="{Binding SelectProClass}" DisplayMemberPath="Name"> <ig:XamOrgChart.GlobalNodeLayouts> <ig:OrgChartNodeLayout Key="ProtocolClasses" TargetTypeName="ProtocolModel" DisplayMemberPath="Name"> <ig:OrgChartNodeLayout.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Data.Name}"/> </DataTemplate> </ig:OrgChartNodeLayout.ItemTemplate> </ig:OrgChartNodeLayout> </ig:XamOrgChart.GlobalNodeLayouts></ig:XamOrgChart>
Binding Class is ObservableCollection<ProtocolClass> SelectProClass
but I can't see anything
Maybe it's because I'm not using datacontext.
However, because my viewmodel uses prism mvvm , it cannot be used as a data context.
Is there any way to do binding without using this?
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
<ig:XamOrgChart.DataContext>
<data:DepartmentViewModel />
</ig:XamOrgChart.DataContext>
Hello Kim,
Thank you for your post. You have to bind the chant though the DataContext , this is how controls are designed to do binding .
Here is our online help document of XamOrgChart if you want to have a look.