WPF TabControl memory issues

If I have the next TabControl and everything works correctly, and when I switch to the second tabitem, it just shows without problems.

<TabControl>
   <TabItem> //datagrid </TabItem>
   <TabItem> //datagrid2 </TabItem>
<TabControl>

But if I have this xaml, when I click the second tabitem, the memory gets out of control

<TabControl>
   <TabItem> //datagrid </TabItem>
<TabControl>
<TabControl>
   <TabItem> //datagrid2 </TabItem>
<TabControl>

What am I missing?

+3
source share
2 answers

Posting a response on request :-).

You need to show a little more of your XAML - we need to see Panelwhich one you use around TabControl- shooting from the hip, I would say what DataGrid2 TabControlis inside Grid Rowwith Height="Auto"or Height="*".

0
source

Waiting for more haml / code in question (another shot from the hip):

, TabControl WPF TabItems ( ) , , / ? DataGrids TabControls :

<TabControl>
   <TabItem> //datagrid </TabItem>
<TabControl>
<TabControl>
   <TabItem> //datagrid2 </TabItem>
<TabControl>

, .NET

<TabControl>
   <TabItem> //datagrid </TabItem>
   <TabItem> //datagrid2 </TabItem>
<TabControl>

, DataGrids TabItems TabControl () , , DataGrid, .

0

Source: https://habr.com/ru/post/1761089/


All Articles