Question

How can I open a child window and keep the parent window active. I am using Silverlight 5 with the latest version of the toolkit.

I understand that playing with the brushes can help to have the background look normal but the parent window is still disabled.

I am trying to implement a find feature similar to a control F. I want the user to search in a child window and the matches would be displayed on the main display.

Thank you for your help,

Was it helpful?

Solution

ChildWindow is made for modal (disables the parent) use.

It uses a overlay window to make the background appear disabled as you've discovered, however it also marks the Application.Current.RootVisual's IsEnabled to false, which it then restores when the ChildWindow is closed.

This prevents any interaction to the controls of the 'parent' window. The only way around this to make your own style ChildWindow control but leave out this behavior.

FloatableWindow is a codeplex project from Tim Heuer's work, which is a nice quick way to solve your problem. Altho it appears as tho the project hasn't been updated in a while so compatibilty with the latest silverlight version might be in questionable.

DevExpress has a DXDialog control which includes Show and ShowDialog functions for modal and non-modal behavior. I'm sure other silverlight toolkit companies provide similar alternatives, this is just one I'm familar with.

If you don't mind making a custom control you could follow something like Tim Heuer's blog post on the subject to adapt your own control or use a tool like Reflector to reverse engineer the ChildWindow from silverlight itself and remove the parts you don't want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top