Multiple TabViews? In same page
Pmr-precure opened this issue · 0 comments
Pmr-precure commented
Hi, hope you can help.
First of all thank you very much for your TabView sample. its awesome and fits our needs perfectly. But we got 1 problem.
We got a Page where we want multiple TabViews.
<mauiTabView:TabView>
<mauiTabView:TabView.Tabs>
<!-- Tabs for the first TabView -->
<mauiTabView:Tab Title="Tab1" Icon="cat.png">
<mauiTabView:Tab.Content>
<Label Text="Tab1 Label" />
</mauiTabView:Tab.Content>
</mauiTabView:Tab>
<mauiTabView:Tab Title="Tab2" Icon="dog.png">
<mauiTabView:Tab.Content>
<Label Text="Tab2 Label" />
</mauiTabView:Tab.Content>
</mauiTabView:Tab>
</mauiTabView:TabView.Tabs>
</mauiTabView:TabView>
This will work perfect.
But if we add 1 more:
<mauiTabView:TabView>
<mauiTabView:TabView.Tabs>
<!-- Tabs for the first TabView -->
<mauiTabView:Tab Title="Tab1" Icon="cat.png">
<mauiTabView:Tab.Content>
<Label Text="Tab1 Label" />
</mauiTabView:Tab.Content>
</mauiTabView:Tab>
<mauiTabView:Tab Title="Tab2" Icon="dog.png">
<mauiTabView:Tab.Content>
<Label Text="Tab2 Label" />
</mauiTabView:Tab.Content>
</mauiTabView:Tab>
</mauiTabView:TabView.Tabs>
</mauiTabView:TabView>
<mauiTabView:TabView>
<mauiTabView:TabView.Tabs>
<!-- Tabs for the first TabView -->
<mauiTabView:Tab Title="Tab1" Icon="cat.png">
<mauiTabView:Tab.Content>
<Label Text="Tab1 Label" />
</mauiTabView:Tab.Content>
</mauiTabView:Tab>
<mauiTabView:Tab Title="Tab2" Icon="dog.png">
<mauiTabView:Tab.Content>
<Label Text="Tab2 Label" />
</mauiTabView:Tab.Content>
</mauiTabView:Tab>
</mauiTabView:TabView.Tabs>
</mauiTabView:TabView>
We get this exception "Java.Lang.IllegalStateException: 'The specified child already has a parent. You must call removeView() on the child's parent first.'"
I hope you got an idea of what we can do.
BR