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
1540
Floating ContentPane doesn't use ResourceDictionary at head of visual tree
posted

I am using a ResourceDictionary at the head of a visual tree to specify a Style Setter on a control type used in several ContentPanes further down the visual tree.

However, when I make a ContentPane floating, the Style Setter no longer applies to the control within it.

How do I resolve this without duplicating the ResourceDictionary or the Style Setter in more than one place?

I've attached a project demonstrating this.  All XamTextEditor controls have a DarkBlue Background until the ContentPane they are within is floated.

Thanks,

Jason

FloatingContentPane.zip
Parents
  • 54937
    Verified Answer
    Offline posted

    When the panes are floating they are not within the tree of the xamDockManager - this is true whether you are using it in a windows app or in xbap. If you put that ResourceDictionary into the Application.Resources it will affect both so that's the easiest option. Alternatively you would create a separate ResourceDictionary file and reference that from multiple places. I've attached a modified version of the sample that does this.

    FloatingContentPane.zip
Reply Children
No Data