showdialog

Is there an event or something i can use when a showdialogwindow is blocking the window i try to access

六月ゝ 毕业季﹏ 提交于 2019-12-10 15:57:12
问题 I have 2 windows. Lets call them A and B. A is opening B with a ShowDialog(). So I am opening B - When the user minimizes B or gets it into the back somehow and he tries clicking window A again its blocked (as it should be), but is there an Event that I can catch up onto when this happens ? I am trying to achieve bringing the blocking window B into the front when hes trying to access window A with window B opened. Codeexample: Thats how Window A is opened from the Mainwindow WindowA windowA =

How to use showDialog() and DatePickerDialog() inside a Fragment?

前提是你 提交于 2019-12-06 12:46:07
问题 Inside an Activity, I am calling different fragments depending on which radiobutton is checked, different fragments are opened with different stuff that the user should input. For this one of the user must "Set Date" and "Set Time". I am using the code from here... click here. It was working fine when I tried it in an Activity.. but when I put the code inside a fragment, showDialog(DATE_DIALOG_ID); and showDialog(TIME_DIALOG_ID); have the error The medthod showDialog(int) is undefined for the

WPF ShowDialog returns null immediately on second call

本秂侑毒 提交于 2019-12-05 15:02:26
问题 I think this is a bug in the WPF framework, without going into depths of my program and why I am doing what I am doing, I wrote a simple test application to prove my theory. Can this issue be confirmed? What are possible workarounds for a series of dialogs to be executed before putting the application into its run loop? using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Windows; namespace ShowDialogWindow { ///

Which is a better way to call Form.ShowDialog()?

老子叫甜甜 提交于 2019-12-05 14:28:39
问题 Which is a better way to show a modal dialog? form1 frm=new form1(); frm.showDialog() or (new form1()).showDialog(); 回答1: Neither one is "better" than the other; they are perfectly equivalent! However, in this particular case, both are wrong . The ShowDialog method requires you to call the Dispose method on the form. Unlike the Show and Close combination, this is not done automatically. From MSDN: When a form is displayed as a modal dialog box, clicking the Close button (the button with an X

Unexpected behaviour of System.Windows.Window.ShowDialog() when no other windows are open. Any idea why?

北城余情 提交于 2019-12-05 05:56:14
问题 I picked up on this (with some effort) when my WPF MVVM application tried to show two consecutive error dialog windows before the main window was launched: After OKing the first window, the application went into a loop and the second error dialog never showed up. I fixed the problem, but I was hoping someone could enlighten me as to why this happened. It seems that, if there are no non-modal open windows, if one dialog window has been closed, all new dialog windows are immediately closed,

Which is a better way to call Form.ShowDialog()?

≡放荡痞女 提交于 2019-12-04 00:48:17
Which is a better way to show a modal dialog? form1 frm=new form1(); frm.showDialog() or (new form1()).showDialog(); Neither one is "better" than the other; they are perfectly equivalent! However, in this particular case, both are wrong . The ShowDialog method requires you to call the Dispose method on the form. Unlike the Show and Close combination, this is not done automatically. From MSDN: When a form is displayed as a modal dialog box, clicking the Close button (the button with an X at the upper-right corner of the form) causes the form to be hidden and the DialogResult property to be set

WPF ShowDialog returns null immediately on second call

旧巷老猫 提交于 2019-12-03 23:21:23
I think this is a bug in the WPF framework, without going into depths of my program and why I am doing what I am doing, I wrote a simple test application to prove my theory. Can this issue be confirmed? What are possible workarounds for a series of dialogs to be executed before putting the application into its run loop? using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Linq; using System.Windows; namespace ShowDialogWindow { /// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App : Application {

WPF Routed Commands and ShowDialog Windows

心已入冬 提交于 2019-12-03 22:15:52
I was wondering how a window opened through ShowDialog is treated in the Visual Tree. For example, Window A opens Window B through a ShowDialog. When firing a routed command on Window B, Window A does not receieve the command (even though it is listening for it). Is there any way to make this work? Thanks! Jon We run into this situation all the time in our application. We use the Window.Owner property and ICommandSource.CommandTarget property for this. For example, in Window A: DialogWindow windowB = new DialogWindow(); windowB.Owner = this; windowB.ShowDialog(); Then, in DialogWindow, all the

SaveFileDialog silently crashes WinForms app on WindowsXP

人走茶凉 提交于 2019-12-02 17:26:35
问题 I'm developing WinForms app using C#, .NET 4.0, and DevExpress components. On Windows 7 everything is working just fine. On Windows XP SP3, few seconds after SaveFileDialog is shown and closed, application will silently exit. There is no unhandled exception, Application exit event will not fire, I'm only getting message in the Visual Studio Output window: The program '[3164] MyApp.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0). Code that is causing this issue is very simple:

SaveFileDialog silently crashes WinForms app on WindowsXP

别等时光非礼了梦想. 提交于 2019-12-02 08:21:49
I'm developing WinForms app using C#, .NET 4.0, and DevExpress components. On Windows 7 everything is working just fine. On Windows XP SP3, few seconds after SaveFileDialog is shown and closed, application will silently exit. There is no unhandled exception, Application exit event will not fire, I'm only getting message in the Visual Studio Output window: The program '[3164] MyApp.vshost.exe: Managed (v4.0.30319)' has exited with code 0 (0x0). Code that is causing this issue is very simple: saveFileDialog1.ShowDialog(); Do you have any ideas why is this happening? How can I troubleshoot and