Binding in raddocking documenthost panel

0 Answers 75 Views
Docking General Discussions
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Deltaohm asked on 28 Jun 2023, 07:44 AM

I think that this is a general question: I have a RadDocking with document host. Generally I can load many tab inside the panel, every tab has his viewmodel that it is an instance of the same class.
When I binding a control property to a viewmodel property I need to bind it to the correct instance.
Now I use binding in code behind using a variable index such as 

pane.SetBinding(RadPane.HeaderProperty, new Binding()
{
    Path = new($"MainVM.Partitions[{_vm.MainVM.PartitionAttiva.Partition.Id}])
});
Is not important the meaning of pieces, the important is the dynamic index that stand for the tab index.

My question is if is there a more standard method to achieve this goal
Thank you 
Luigi
Martin Ivanov
Telerik team
commented on 30 Jun 2023, 03:29 PM

I am not familiar with your view models structure, the RadDocking setup and the exact expected result, so I can't give a very specific suggestion. However, you can take a peek at the PaneSource support and see if this is what you are looking for. If this doesn't help, you can share the beforementioned information, so I can see if I there is a more concrete idea that I can suggest.

No answers yet. Maybe you can help?

Tags
Docking General Discussions
Asked by
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Share this question
or