Is it possible to edit the tab header in place
Hello Aparnache,
I have been looking into this for you and since there is no built-in functionality for that one option would be to add an editor to the TabItemEx’s original control template. The templates can be found in the DefaultStyles folder default path: C:\Program Files (x86)\Infragistics\NetAdvantage 2011.2\WPF\DefaultStyles\Windows e.g.: PrimitivesGeneric.xaml . On option for adding to the ControlTemplate would be to set the ContentTemplate of the ContentPresenter that actually displays the data in the tab header.
Another thing you can use would be, since the Header property is of type object an uses a ContentPresnter, to actually set it to an instance of the editor you’d like to use.
I have created a sample project (TabControl_editable_header.zip) for you describing both option I came up with.
Please let me know if I can be of any further assistance on the matter.
actually we are binding the xamtabcontrol as below
<igWindows:XamTabControl Name="xamTabControl1" TabLayoutStyle="MultiRowSizeToFit" MaximumTabRows="4" MaximumSizeToFitAdjustment="50" MinimumTabExtent="100" InterTabSpacing="2" InterRowSpacing="2" AllowTabClosing="True" ShowTabHeaderCloseButton="True" TabItemCloseButtonVisibility="WhenSelectedOrHotTracked" ItemsSource="{Binding Path=SimulationTabs }" > <igWindows:XamTabControl.ItemTemplate> <DataTemplate> <TabItem Header="{Binding Path=Header}" /> </DataTemplate> </igWindows:XamTabControl.ItemTemplate> <ContextMenuService.ContextMenu> <ContextMenu Name="tabContextMenu"> <MenuItem Header="Close" Command="{Binding Path=CloseCommand}" ></MenuItem> <MenuItem Header="Delete" Command="{Binding Path=DeleteCommand}"></MenuItem> </ContextMenu> </ContextMenuService.ContextMenu> </igWindows:XamTabControl>
we are not using any TabItemEx’s so let me know how to enable the tabitem header editable in place.
Hi again,
I looked into your snippet and when I tested it out I noticed that a whole TabItem is paced inside the tab header, so actually my previous assumption was a bit off. The ItemTemplate isexatly what you are looking for – it sets the visual tree for the TabItemEx’s header and you can set it like so:
<igWindows:XamTabControl Name="xamTabControl1" >
<igWindows:XamTabControl.ItemTemplate>
<DataTemplate>
<TextBox Text="{Binding Header}"/>
</DataTemplate>
</igWindows:XamTabControl.ItemTemplate>...
Also you can take a look at the ContentTemplate property which sets the visual tree for the content area of the TabItemEx.
hi ,
from the below code can u please tell me what are the changes i have to do for to edit the tab in place
<
="GuiControls.View.TabView"
="http://schemas.syncfusion.com/wpf"
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
="http://schemas.microsoft.com/winfx/2006/xaml"
="clr-namespace:GuiControls.Controls"
="Auto"
="clr-namespace:GuiControls.ViewModel"
="http://infragistics.com/Editors"
="http://infragistics.com/Windows">
>
="6" />
="22" />
="*" />
="2" />
Name
AllowTabClosing
="True"
ShowTabHeaderCloseButton
="2">
}">
="Template">
="true">
Border
="Bd"
}"
="1,1,1,0"
="3,3,0,0">
<!--Substitute the ContentPresenter with a XamTextEditor-->
="tbEdit_PreviewMouseDoubleClick"
="Transparent"
="tbEdit_EditModeStarting"
="tbEdit_EditModeEnding"
}}"/>
="Highlight"
="3"
="3,3,0,0"
.TabItemHottrackHighlightLightFillKey}}"
.TabItemHottrackHighlightDarkFillKey}}"
="Collapsed"
="Top"/>
CloseButtonVisibility
="WhenSelectedOrHotTracked">
</
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.