Hello Rene,
Since you use data binding you need to update the
ItemsSource collection of the
RadTabControl in order to add item to the control. Please note that the collection must invoke the
CollectionChanged event whenever it has been changed. By doing so your
ViewModel will notify the UI that the
ItemsSource of the control has been changed and the RadTabControl will add/remove the item. The best way to do this is to use
ObservableCollection<T>. This native collection implements the event out of the box and it is suitable for data binding scenarios.
Regarding your second question - please note that the
RadTabControl is designed to load the content of the selected item, only. In other words this is the designed and the expected behavior of the control. However, there may be a better approach in your particular scenario. And I could be able to help you on your way, but I will need you to elaborate more on your requirements. Could you please clarify what you have in mind when you say "
now"? Do you mean the Loaded event of the page?
Thank you for your cooperation.
Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application.
Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>