Conserving screen real estate via the adorner layer

I spent the weekend building and expanding on my previous work adorning XamDataGrid with editor controls.  I made leaps and bounds of progress, and am very excited about the result.  As much of the functionality that can be abstracted away now lives as an attached behavior, called DisplayAdornerEditors.  I wrote a big post about it on my other blog, so if you’re interested, I highly recommend you check it out here!

WPF is amazing!

5 Responses to Conserving screen real estate via the adorner layer

  1. Looks very nice, Josh. Did you also try to use Popups? They are cool, because they free you from the window boundaries.

  2. Josh Smith says:

    Hi Florian,

    I did not use the Popup class because, as far as I know, when a Popup opens it always takes input focus. I needed to be able to show the editor controls without necessarily giving them focus, so the adorners were a better choice.

    Thanks,
    Josh

  3. Hi Josh, nope I don’t think so. It will only get focus if you say it should.

  4. Josh Smith says:

    Hey Florian,

    I tried Popup out, but, unless I screwed something up, it does not appear to support being transparent and having the child’s drop shadow bitmap effect display properly. I set its AllowTransparency to true, but that didn’t allow the bitmap effect to display “over” the data grid. The only way to make it look OK was to add Margin to the child element, but you can still see the rectangular corners of the Popup window.

    Also, I thought about it more and realized that I *want* the adorning element to not go past the edges of the grid. The problem is that I cannot cover over the scrollbar, because then the adorning element is obstructing the control’s core functionality.

    Thanks for the suggestion, but I am not going to use Popup in this scenario.

    Thanks,
    Josh

  5. Right, the bitmap effects don’t work in that case without something to render on🙂
    Nevermind, adorners are pretty cool, too!

%d bloggers like this: