Skip to content

What is tihe best way to use the current version of TabView (2.0.0-preview6)? #344

Answered by amwx
Tryanks asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately, a side effect of the new ItemsControl design upstream meant that I can't create TabViewItems from the ItemTemplate property anymore (since container creation is handled outside of my logic). I think there is some work that might make this possible again that's open upstream, so I'll re-evaluate after that's complete. This means you can't set a TabViewItem as the ItemTemplate as in WinUI, as it just ends up getting put into a generated TabViewItem.

Instead, what I'm suggesting as an interim solution is to using the styling system to set the properties you need, which is similar to what you'd do in WPF.

<Style Selector="ui|TabViewItem">
    <Setter Property="Header" Value="{B…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tryanks
Comment options

Answer selected by Tryanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants