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
Which style needs to be changed for xamDockManager floating window title bar color
posted

Hi,

We have an Application, in which we are using xamDockManager, this can be float. Once we drag and make it Floating window, it's title bar color changed to default blue color. We want to change this default blue color to Black. As suggesred in other post we need to add styling in App.xaml file. But as we are hosting WPF forms from WinForm, so that it's hard to set the styling in App.xaml as we are not adding styling here.

Do we have any alternate way, while we are creating object of WPF form or in any other place in code we can set Color for it's title bar.

We are using default.isl file for application level styling in WinForm. Can we set style for Floating window in that file? If yes then please provide the style for it. That would work for us.

Parents
  • 2500
    Verified Answer
    Offline posted

    Hello Narendra,

    Thank you for posting to Infragistics Community!

    I have been looking into your question and I believe you are referring to this recent forum thread as the suggested solution to style a Floating window, is this correct?

    Please, note that the current forum is the “Ignite UI for Angular” subforum, and as your question is regarding the XamDockManager, please, create further threads on related matters in the dedicated Ultimate UI for WPF subforum. This implies better organization of the forum discussions and allows the community to benefit from them by searching the relevant knowledge areas.

    To address your question, you are correct that the App.xaml file is not present when creating a WPF User Control Library and therefore the suggested in the linked thread approach becomes not as straightforward. After further investigation, I found this blog post on “Managing Application Resources when WPF is Hosted”. There you will find three solutions to implementing application-level resources for your hosted WPF control. The article provides detailed information and code-snippets.

    In an effort to test this, I went ahead and created sample WinForms project hosting such a WPF user control with a XamDockManager and the resource dictionaries, provided in the linked thread. You can find the archive, containing both projects attached below.

    On my side, everything is working as expected and the custom styling is working for floating windows in the hosted control as well. One thing to watch out for is the URI to the resource dictionary to include. Make sure it follows the path “*TheDLLName*;component;*filename.xaml*”.

    In conclusion, please check out the referenced article and sample and let me know if I can be of any further assistance. Also, make sure to build the WPF project and add the relevant DockManager and WPF Infragistics assemblies before building and running the WinForms project.

    Best regards,
    Bozhidara Pachilova
    Associate Software Developer

    0880.XDMWFAndWPF.zip

Reply Children