We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How binding a ViewModel property to SelectedItem

Thread ID:

Created:

Updated:

Platform:

Replies:

127690 Dec 2,2016 04:04 PM UTC Dec 21,2016 11:26 AM UTC WPF 3
loading
Tags: TabControlExt
CSharpino
Asked On December 2, 2016 04:04 PM UTC

Hello,

I'm trying to binding the TabControlExt.SelectedItem to my property in my viewmodel but if I add a new tab or select an existing tab the SelectedItem isn't update.

My Xaml is this:

    <sync:TabControlExt ItemsSource="{Binding Path=Items}" 
                        CloseButtonType="Hide" 
                        ItemTemplate="{StaticResource CustomHeaderTemplate}"  
                        SelectedItem="{Binding Path=ItemSelected, Mode=TwoWay}"/>

How can I do?

Victory Jessie Selvam D [Syncfusion]
Replied On December 5, 2016 09:36 AM UTC

Hi CSharpino,

Thank you for using Syncfusion products.

We have checked bounding the SelectedItem property of TabControlExt in ViewModel class property and it is working as expected from our side. We have prepared a sample and video to demostrate the same and you can download them from the following link:

Sample: TabControl_SelectedItem_Binding

Video: Video

Please get back to us the modified sample reproducing the issue along with replication steps and Essential Studio version so that we can proceed further on this.

Regards,
Jessie

CSharpino
Replied On December 20, 2016 11:43 AM UTC

Sorry for the delay in replying, 

I modified your example to reproduce the error.

The problem occurs if the collection is not populated in the constructor but then with the ADD button.



Attachment: TabControl_SelectedItem_Binding_8a046be5.zip

Victory Jessie Selvam D [Syncfusion]
Replied On December 21, 2016 11:26 AM UTC

Hi CSharpino,

We were able to reproduce the reported issue, "SelectedItem property binding is not working when items are populated at run time" and have logged a defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents  

Please let us know if you have any questions.

Regards,
Jessie

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;