c# - Item template for TabControl -
i'm using tabcontrol
present data different datatable
s. xaml code:
<tabcontrol margin="5, 5, 5, 5" horizontalalignment="stretch" dockpanel.dock="top" itemssource="{binding path=iteminfoviewmodels}"> <tabcontrol.itemtemplate> <datatemplate> <stackpanel> <textblock text="{binding editingtable.name}"></textblock> <contentcontrol> <partials:iteminfo /> </contentcontrol> </stackpanel> </datatemplate> </tabcontrol.itemtemplate> </tabcontrol>
i view looks this:
which wrong. - header text , content - displayed header
shown. how can change xaml, should?
try using contenttemplate
instead of itemtemplate
. itemtemplate
applied header
of each tabitem
, contenttemplate
used display selected tab.
you alternatively set itemcontainerstyle
, manipulate settings on tabitems
more directly.
Comments
Post a Comment