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.

Binding TabItemSelectedBackground

Thread ID:

Created:

Updated:

Platform:

Replies:

129513 Mar 22,2017 08:39 PM Mar 23,2017 10:36 AM WPF 1
loading
Tags: TabControlExt
nick woods
Asked On March 22, 2017 08:39 PM

 I have been trying to change the Tab Selected Background by the type of ViewModel, but the background does not change when toggling between the ViewModels. Does anybody have any ideas?  

MainWindow.xml
<syncfusion:TabControlExt   x:Name="Tab" TabItemSelectedBackground="{Binding bkTab}"
                                       syncfusion:SkinStorage.VisualStyle="Default"  ItemsSource="{Binding}"  Grid.Row="1" CloseButtonType="Individual"
                                       EnableLabelEdit="False"   >
                <syncfusion:TabControlExt.Style>         
                    <Style TargetType="{x:Type syncfusion:TabItemExt}">
                        <Setter Property="Header" Value="{Binding DisplayName}"/>
                    </Style>      
                </syncfusion:TabControlExt.Style>
  </syncfusion:TabControlExt>

VendorViewModel.cs;
 public VendorViewModel()
 {

                base.DisplayName = "Vendor";
                base.bkTab = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF7FD13B"));
   }
CustomerViewModel.cs:
   public CustomerViewModel()
        {
            base.DisplayName = "Customer";
            base.bkTab = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF3AA9E8"));
            
        }



Subashini Mahendran [Syncfusion]
Replied On March 23, 2017 10:36 AM

 Hi NickWoods, 

Thank you for contacting Syncfusion support. 

We have checked your query ”Binding TabItemSelectedBackground” and we have prepared the sample that tries to meet your requirement. In this sample we have toggling between the ViewModels and TabItemSelectedBackground updated based on the ViewModel. Please download the Sample which we tried to reproduce the issue from the below location. 

If the issue still persists, please update us the issue reproducible Sample with replication steps. This would help us to proceed further. 

Regards,
Subashini M. 


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.

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.

;