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
990
Adorner on dock panel
posted

Do adorners not work with the DockManager? If I try:

AdornerLayer layer = AdornerLayer.GetAdornerLayer(mycombobox);

I just get NULL. Works fine when the combobox is not inside a dock manager.

John

  • 54937
    Offline posted

    That method just walks up the visual tree looking for an adornerdecorator or a scrollcontentpresenter. The default template for a Window has an AdornerDecorator so that one should have been found. If this is a pane in a floating window then its possible we didn't put one in the template. It could also be that you're trying to do this too early since as I mentioned that method goes up the visual tree so you might try delaying that call until the Loaded event.