Silverlight: Creating a modal control
I have a window with some contents. I'd like to click a button and another control (a grid/bord开发者_JAVA技巧er) slides up. But i'd like the contents of the window that is under this slided up control to be modal. I cannot click or use keyboard to activate anything.
Thank you.
For a modal window I would use the ChildWindow class. Microsoft provides the templates used for all of their major controls and objects so one can take what they did and change it. The ChildWindow template and styles page has a pretty good explanation of the layout so one can figure out what to change. You should just be able to instantiate a new ChildWindow, set its template to your custom template, and rock out!
Sounds to me you could do with using the ChildWindow
control instead, which handles most of this for you. Make a copy of its template and tweak it up to get your slide-in effect.
You can create a control filling the complete canvas and make it transparent.
精彩评论