Hello,
we have a problem with the TabControlExt ItemTemplate.
We want to use a Property of our ViewModel (MVVM Style with PRISM) to show the Title of the TabItem.
But as we can see, the TabItem could not reach the properties of the TabControl content.
In the content we display view dynamically loaded.
Is there any option the get the properties or set the title by binding to the viewmodel presented in the content area?
In order to that problem, is there also an option to set the closing icon dynamically with a property of the viemodel?
Not all of our views should be closed by the user itself.
An example of the code:
<sf:TabControlExt x:Name="Tab"
prism:RegionManager.RegionName="{x:Static modinf:ModuleRegionNames.ModulPosteingangTabRegion}"
AllowDragDrop="false"
CloseButtonType="Hide"
EnableLabelEdit="False"
RotateTextWhenVertical="true"
ShowTabItemContextMenu="False"
ShowTabListContextMenu="False"
TabItemLayout="SingleLine"
TabItemSize="Normal"
TabScrollButtonVisibility="Auto"
TabScrollStyle="Extended"
TabStripPlacement="Top">
<sf:TabControlExt.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=DataContext.ViewModelTitel}" />
</DataTemplate>
</sf:TabControlExt.ItemTemplate>
We tried Content.DataContext., only Datacontext. and without.
Thanks and best regards
Ben