How to show a WPF modal window over a WPF popup? - wpf

I have a WPF app where I make my screen dark and show the user a popup for him to fill in some data.
One of the controls hosted in that popup might raise a modal window asking the user to confirm some validation results, when that modal is raised it doesn't show because the popup takes precedence in the UI.
Is there a way to force the modal be shown over the popup?

Related

WPF Window flash notification?

I've started using the XCEED MessageBox recently, which uses custom chromes (<-I think that's their name) for the title bar, and it seems that there is no handling for the case when a dialog window (or modal dialog in Win32 terms) needs to flash in response to the user trying to click on the (disabled) parent window.
The flashing border animation is usefull to notify a user that he must respond to a dialog before continuing and to give a hint on which dialog window is that.
Is there a way to get notified when a window needs to perform the flash animation in WPF or set XAML triggers for it?

Silverlight - Open dropdown only clicking on Toggle button

Can anybody tell me how I can open popup by clicking only on Toggle button. Usually, combobox opens popup when you click anywhere. In our project we need to open popup only when user clicks on Toggle button. It's kinda urgent.
One approach would be to create a custom control. This would give you more control over all the parts that make up your combobox. http://blogs.msdn.com/b/sburke/archive/2008/03/22/tutorial-writing-a-templated-silverlight-2-control.aspx

Hide wpf popup when click on a Winform control

I have an ElementHost object in a WinForm dialog.
This elementhosts child is a Popup.
I want to hide or close the Popup when the user clicks anywhere. I can do it when the click happened in the Popup. How to close it when the user clicks outside the popup, on a WinForm control?
Did you try StaysOpen=false?

How to force control ignore any gui events in Silverlight

I have a simple page with canvas control.
Inside canvas I have some SL controls like buttons, textboxes etc.
Also I cover the controls by semi-transparent Image control. So, when I click on some button, the click message doesn't reach the button, because I click on Image.
Is there a way to say the Image that it must not handle any gui events ?
p.s I use SL4
You should add IsHitTestVisible="False" to your image.

How to prevent WebBrowser control from stealing focus from other text box in my WPF form

My WPF app has a window with various text boxes and a WebBrowser control.
The WebBrower control is used to show a web site (I doesn't own) and then a Login button in the WPF window fills the fields in the site from the text boxes.
The problem is that the web site calls focus() method on one of its input fields on load, and that still the focus from the text box in my WPF window. I want the focus to be on the WPF window field and not in the web page within the WebBrowser control.
I tryed calling MyTextBox.Focus() in the WebBrowser's LoadCompleted event, but to no avail. Setting the WebBrowser's IsEnabled or even Visibility properties didn't help either.
Does anyone have an idea how I can overcome this and move the focus to the WPF control instead of the web page input field?
Don't think you can extend the control site to add IProtectFocus to the site. Try interop the Windows Forms version of the webbrowser control and override the CreateWebBrowserSiteBase method to provide your own control site.

Resources