xaml DataTemplate conditionel
Salut,
j'ai ceci en
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <TabControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="12" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="12" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
</Grid>
</DataTemplate>
</TabControl.ItemTemplate> |
Mon datatemplate peut contenir soit 3 onglets, soit 5, dans le cas où 3 onglets sont présent présent, le template si dessus est préconisé. Par contre j'aimerais changer celui ci si j'ai 5 onglets par exemple avec une nouvelle ColumnDefinitions... mais je vois pas trop comment faire ? un petit conseil svp ?