Hi, I am trying to achieve selected behavior when using SfTabview with some overflow tabs. I have set my visible header amount to 3, so I can see the overflow tab. I thought to use a dynamic resource to set the color, then use the selection changed event to update the color. See my sample code below. It is not working. Even on first load, the color is showing white. Its not being set to the color I associate in the dynamic resource ("Orange" in the below example). I have verified that the selection change event is working as expected and is updating the dynamic color (I associated with a different element on the page to verify this).
Xaml code:
...
<ResourceDictionary>
<Color x:Key="selectedOverflow">Orange</Color>
</ResourceDictionary>
...
<tabview:SfTabView.OverflowButtonSettings>
<tabView:OverflowButtonSettings BackgroundColor="{DynamicResource selectedOverflow}" />
<.tabview:SfTabView.OverflowButtonSettings>
______________________________________________________________________
Code behind file:
private void SfTabView_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
var selectedIndex = e.Index;
if (selectedIndex > 2)
{
this.Resources["selectedOverflow"] = Color.Blue;
}
else
{
this.Resources["selectedOverflow"] = Color.Orange;
}
}
______________________________________________________________________
Please advise. Is dynamic resource not supported for setting colors on SfTabView?
George