First of All, I want to mention I am Referring this Post and asking further questions. And applying custom style on XamDockManager floating window.
Hello Narendra,
Looking at the screenshot, I am under the impression that you have one of the performance options in your Windows 10 settings turned off. This performance option is “Show window contents while dragging.” Shutting this off will cause the outline while resizing different windows.
We unfortunately have no control over this outline color with this setting – it is controlled by the operating system, and it appears to be the negative color to whatever the background of the border is over at a particular point. In this case, the light gray is the negative color to the dark gray border around the ToolWindow, and it is the reason that the border is Black when over the white portion of your application. If you do not wish to have this border, I would recommend opening the “Performance Options” window on your machine and enable the “Show window contents while dragging” option.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thanks for the response. For the point 1, it's reproducable at my end with your sample too. See below screenshot. Outer border color is light gray while resizing it.
We are using Infragistics WPF 20.2 version with Windows 10 OS.
I have been investigating into the behavior you are seeing, and much of the behavior you are looking to achieve in this case will require some re-templating of the elements that make up the XamDockManager. I will answer your questions in the order that they were asked.
1. I have attempted to reproduce this bit using both of the samples from the forum thread that you linked, but I was unable to do so. It would be most helpful if you could provide an isolated sample where this is reproduced so I may look into it further. If I had to guess at the moment though, this appears to be an issue with the ToolWindow, but again, it was not something I could reproduce on my end.
2. In order to change the Window title, you can utilize the ToolWindowLoaded event and set the e.Window.Title property, where ‘e’ is the event arguments of the event. The text Font size and style will require you to re-template the ToolWindow, though, as they are currently pulled from your System fonts.
The ToolWindow’s default style can commonly be found in the PrimitivesGeneric.xaml file at the following directory with Infragistics controls installed:
C:\Program Files (x86)\Infragistics\<version>\WPF\DefaultStyles\Windows
In order to change the font properties of the title, I would recommend modifying the TextBlock in the ControlTemplate with the x:Name of “txtCaption.” Please note that there are a few triggers in the ControlTemplate that modify parts of the “txtCaption” TextBlock depending on whether or not the ToolWindow is active or not.
3. This will also require you to re-template the ToolWindow, as mentioned above. In the default template, the CardPanel named “PART_Caption” that makes up the caption area is placed within a Grid.RowDefinition that has its Height set to Auto, and there is a margin applied. I would recommend moving that margin to the DockPanel named “captionPanel” and setting your desired height on the “captionRow” RowDefinition. This will allow you to center the “PART_Caption” CardPanel.
I am attaching a sample project to demonstrate points 2 and 3 in this case. Judging by the other forum thread, it sounds like you are doing some interesting behaviors with Windows Forms and hosting WPF, and so I gave the ToolWindow Style an x:Key so that it can be retrieved and applied in the ToolWindowLoaded event. I hope this helps.
4. This will also require re-templating of a part of the control. There are quite a few templates for this requirement that would need to be modified, and they can be found in the DockManagerGeneric.xaml file commonly found at the following directory with Infragistics controls installed:
C:\Program Files (x86)\Infragistics\<version>\WPF\DefaultStyles\DockManager
The templates in question are the ones for DockingIndicator. There is also a Style for DockingIndicator that I would recommend that you include. Each indicator is currently a CardPanel with a Path making up the overall shape and visual of the indicator.
0116.XamDockManagerCloseBtnCase.zip