TabControl and my Adorner
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: TabControl and my Adorner

  1. #1
    Join Date
    Mar 2008
    Location
    Atlanta, GA
    Posts
    49

    TabControl and my Adorner

    The main content of my app is a custom TabControl that I've re-templated and styled the heck out of. One of the design decisions of this application is that it should have no modal windows (the previous application did.) But, there are a few places where I need decisions to be made that are "modal" to the current tab in the tabcontrol. So, I wrote a custom Adorner that I lay a fake modal on top of (and disable everything behind it) so the user has to deal with that "modal" on that tab, but can still move to other tabs if their fancy strikes.

    The Adorner I wrote and the controls I stick in it work great. They open and close great and I even added a fancy blur effect to the controls sitting under the modal.

    The problem lies when I change tabs. I go to a different tab, then back to the tab I adorned and the blur effect is still there and the controls are all still disabled, but my adorner is gone. I used Snoop to find that the adorner seems to have been removed from the visual tree altogether. This is bad, because I still need the user to make a decision from the modal, but, as I said, the modal is now shuffled off the visual layer and nowhere to be found.

    Does anyone have any words of wisdom for me here? One thing I haven't done is written my own AdornerLayer so I could have whatever sits on there persist through the tab changes, but I just didn't foresee the adorner state being cleared in this case. Would that help, I wonder?

    Any help you guys could impart would be greatly appreciated.

  2. #2
    Join Date
    Jan 2009
    Posts
    36

    Re: TabControl and my Adorner

    This my provide the answer you seek:

    http://karlshifflett.wordpress.com/2...hing-tabitems/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center