Can I set different title for content pane when docked and floating?
Example: When docked state, the title is "Docked", and when move to floating, the title is "Floating"
Hello,
I have been looking into your question and created a small sample with a XamDockManager and a ContentPane whose header changes based on the pane being docked or floating.
To achieve this, I added a style targeting the ContentPane to the XamDockManager’s resources. The style first sets the default header, which is “Docked” as the ContentPane is initially docked on application startup. Then the ”Floating” header is set, with the help of data triggers monitoring the PaneLocation property of the ContentPane. The PaneLocation changes upon docking and floating and its value is “FloatingOnly” when the pane is initially floated and “Floating” after right mouse click on the pane title bar -> Select “Dockable”.
<Style TargetType="{x:Type igDock:ContentPane}" x:Key="changedLocationStyle"> <Setter Property="Header" Value="Docked"/> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource self}, Path=PaneLocation}" Value="Floating"> <Setter Property="Header" Value="Floating"/> </DataTrigger> <DataTrigger Binding="{Binding RelativeSource={RelativeSource self}, Path=PaneLocation}" Value="FloatingOnly"> <Setter Property="Header" Value="Floating"/> </DataTrigger> </Style.Triggers> </Style>
You can find the sample attached below. Please test it on your side and let me know if I may be of any further assistance.
Sincerely,
Bozhidara Pachilova
Associate Software Developer
8877.XDMChangeFloatingPaneHeader.zip
Hi Bozhidara Pachilova,
Thank you for your your support.
I tested the sample and that is my expected.
Hi,
I am glad that you find my suggestion helpful.
Thank you for using Infragistics components.
Regards,