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
210
XamDockManager floating window custom style
posted

First of All, I want to mention I am Referring this Post and asking further questions. And applying custom style on XamDockManager floating window.

  1. If we resize the Floating Window, the outer border color is not changing. Which style we can use for this.? (Refer below Screenshot )


  2. How can we change Floating window title text Font Size and Font Style (e.g. Pane 2) (Refer below Screenshot)


  3. How can we set the Vertical alignment to Center for Floating window Title and Close button. Currently it's Bottom aligned.


  4. How to change styling for Dropping button as displayed in the below screenshot:
Parents
  • 34430
    Offline posted

    Hello Narendra,

    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.

    Please let me know if you have any other questions or concerns on this matter.

    0116.XamDockManagerCloseBtnCase.zip

Reply Children
No Data