Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabView SelectedItem Issue #4999

Open
lhLife opened this issue Dec 26, 2024 · 0 comments
Open

TabView SelectedItem Issue #4999

lhLife opened this issue Dec 26, 2024 · 0 comments

Comments

@lhLife
Copy link

lhLife commented Dec 26, 2024

Describe the bug

After selecting any content in TabView, navigate to other pages, and when returning, the index cannot be found

`

    <TabView
        Grid.Row="1"
        Padding="0"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        AddTabButtonCommand="{Binding AddCommand}"
        TabItemsSource="{Binding Works}"
        SelectedItem="{Binding SelectedWork,Mode=TwoWay}"
        TabWidthMode="Equal">
        <interactivity:Interaction.Behaviors>
            <core:EventTriggerBehavior EventName="TabCloseRequested">
                <core:InvokeCommandAction Command="{Binding CloseCommand}" />
            </core:EventTriggerBehavior>
        </interactivity:Interaction.Behaviors>
        <TabView.TabItemTemplate>
            <DataTemplate x:DataType="local:WorkViewModel">
                <TabViewItem Header="{x:Bind Title}" IconSource="{x:Bind Icon}">
                    <local:WorkPage DataContext="{x:Bind}"/>
                </TabViewItem>
            </DataTemplate>
        </TabView.TabItemTemplate>
    </TabView>

`

Steps to reproduce the bug

1.Create TabView( Page.NavigationCacheMode="Required")
2.Selected items
3.Navigate to other pages
4.Return to page

Expected behavior

No response

Screenshots

No response

NuGet package version

Windows App SDK 1.6.3: 1.6.241114003

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant