Custom TabItem #19246
pzelektron
started this conversation in
General
Custom TabItem
#19246
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I just create custom TabItem that inherits from TabItem item XML:
c# :
But when I add this control to TabControl :

<TabControl Grid.Row="1" ItemsSource="{Binding ListaPaneli}"/>
ListaPaneli.Add(new TabItem() { Header = "TabControl", Content = new TextBox() { Text = "TabItem" } }); ListaPaneli.Add(new MyTabItem() {Header="My tab item" });
All content of MyTabItem goes to Header
How can I fix that?
I can inherits from Panel and then do something like that : ListaPaneli.Add(new TabItem() { Content = new MyPanel(), Header = "My Panel" });
but this is only a half-solution.
Beta Was this translation helpful? Give feedback.
All reactions