Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
How to rename a Tab in the DockManager?
posted

I have a DockManager that adds ContentPanes through code. I need to be able to double click the header and edit it. 

Any help would be appreciated, the other threads similar to my questions do not include solutions.

Thanks

Parents
No Data
Reply
  • 6120
    Offline posted

    Hello Sach Na,

    After investigating for a way to edit a Tab header in the DockManager by double clicking on it and doing some research, this has been determined to be a product idea. You can suggest new product ideas for future versions by emailing ideas@infragistics.com.

    Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com.

    Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case.  You can also link back to this thread for additional details.

    Thank you in advance to submitting your product idea.

    However, if you want to rename a Tab at runtime it is possible by doing something like this:

    [Code]

            <Style TargetType="igDock:ContentPane">
                        <Setter Property="TabHeaderTemplate">
                            <Setter.Value>
                                <DataTemplate>
                                    <DockPanel x:Name="pnl">
                                        <Button x:Name="closeBtn" DockPanel.Dock="Right"
                                                Visibility="Visible" Margin="3,3,0,3"
                                                Command="{x:Static igDock:ContentPaneCommands.Close}"
                                                CommandTarget="{Binding Path=Pane,RelativeSource={RelativeSource AncestorType={x:Type igDock:PaneTabItem}}}"
                                                Style="{DynamicResource {x:Static igDock:TabGroupPane.DocumentCloseButtonStyleKey}}" />
                                        <TextBlock Text="{Binding}" />
                                    </DockPanel>
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>               
                          </Style>

                 
                    <Style TargetType="igDock:PaneTabItem">                   
                        <EventSetter Event="MouseDoubleClick" Handler="Pti_MouseDoubleClick"/>
                    </Style>

      private void Pti_MouseDoubleClick(object sender, MouseButtonEventArgs e)
            {
                PaneTabItem pti = sender as PaneTabItem;
                ContentPane pane = pti.Pane as ContentPane;
                pane.TabHeader = "SOMETHING!";
               
            }

    [/Code]

    Please let me know if I may be of further assistance.

    Sincerely,
    Sahaja Kokkalagadda
    Associate Software Developer

Children