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. Image for the cookie policy date

Binding TabItemSelectedBackground

 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"));
            
        }



1 Reply

SM Subashini Mahendran Syncfusion Team March 23, 2017 02:36 PM UTC

 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. 


Loader.
Up arrow icon