i have a TabViewItem with a UserControl inside it.
<TabViewItem>
<local:ListViewUC x:Name="listView" Chapter="{x:Bind Chapter}"/>
</TabViewItem>
Each time I switch between tabs, the contents of the tab reload and the previous information is lost. Is there a way to disable reload?
CodePudding user response:
TabViewItem Content and Reloading issue
The problem is that TabViewItem reload cause ListViewUC reload animation triggered, you could disable the animation by setting ListView.ItemContainerTransitions with an empty TransitionCollection or remove default ContentThemeTransition.
<ListView x:Name="TestListView">
<ListView.ItemContainerTransitions>
<TransitionCollection/>
</ListView.ItemContainerTransitions>
</ListView>

