Home > Enterprise >  C# UWP How to "refresh" Tab in TabView?
C# UWP How to "refresh" Tab in TabView?

Time:04-16

I have tab in TabView which changes it's content, but when I set something new as content, I have to click to other tab and then back to see change. How can I refresh tab without need for clicking away and back?

Opening new tab (gif)

CodePudding user response:

I had the same problem and fixed it with this:

int selectedindex = tabcontrol.SelectedIndex;
tabcontrol.SelectedIndex = -1;
tabcontrol.SelectedIndex = selectedindex;

All I did here, was setting the index to -1, which means no tab is selected and then back to the original selected tab.

  • Related