All Questions
Tagged with modal-dialog wpf
176 questions
0
votes
0
answers
34
views
Stop PriorityBinding when Dialog closes
I have a Dialog that shows images in a ListView's data templates using async PriorityBindings as the image source. (The PriorityBinding has two bindings, the first shows an immediately available ...
2
votes
2
answers
2k
views
How to handle dialogs following the MVVM design pattern
I'm using Material Design for WPF to show a dialog which receives some inputs from the user, and I would like to return a value when it's closed. Here is the sample code:
VM's method that opens the ...
0
votes
1
answer
439
views
Message box/dialog/pop-up approach in MVVM
I want to find a way to implement different forms of modals in MVVM WPF application. Like dialogs with returning results, message boxes or modal sub-windows with some controls inside.
Can you give me ...
-1
votes
1
answer
255
views
How do you bind an observable collection to a listview located in a modal/window?
I have a wpf application that I want to be able to launch a separate window in which I will have a listview bound to an observable collection. However I am unable to get the collection values to ...
4
votes
1
answer
3k
views
Opening child window in WPF MVVM pattern - correct solution?
I was struggling with opening new window in MVVM pattern without violating it's rules for a month. I have read I think every post here and watch every video about this, but as a amateur programmer I ...
0
votes
1
answer
280
views
Prism Library Dialog Service
The following sample never worked for me:
https://prismlibrary.com/docs/wpf/dialog-service.html
Where the dialogService comming from?
public MainWindowViewModel(IDialogService dialogService)
{
...
0
votes
0
answers
105
views
How to open a WPF modal window if a method taking more time
I am recently started to create a c# code to obtain the details or familiarize web-specific controls. In that code, I am having an XPath finding scenario, which may or may not take time based on the ...
0
votes
0
answers
55
views
Dialog box shown furtively when called at WPF application startup in App.xaml.cs
I've a problem when showing a dialog box in a WPF startup application in App.xaml.cs.
I'm checking if another instance is running then if yes, I display a dialog box to the end user to inform him. ...
1
vote
1
answer
2k
views
Change Owner of Prism DialogWindow
I have implemented the new IDialogService in WPF using MVVM. My dialogs are working fine, for the exception that when I have another window open in the foreground, the dialog will appear in the center ...
0
votes
0
answers
161
views
Modal dialog always misses first button tap after opening from double tap
I am displaying a modal dialog when the user double taps inside a TextBlock. Its a backdoor to a hidden settings panel. The TextBlock is contained in a Popup. I am finding that it is always necessary ...
0
votes
0
answers
693
views
CefSharp in a window opened with ShowDialog doen't work
In WPF, I use CefSharp for WinForm that runs in a WindowsFormsHost in a Window. Everything works like charm when I display the Window using Show(). But if I use ShowDialog(), CefSharp seems not to ...
1
vote
1
answer
3k
views
WPF MVVM - how to inject a service into the ViewModel
I'm fairly new to WPF and MVVM and I need to create a simple dialog feature that allows me to popup a confirmation message on the screen such as "Confirm delete?" with y/n buttons. I created a dialog ...
0
votes
0
answers
139
views
Prevent user interaction with modal dialog while automating UI?
I am automating a "save as" dialog through win32 API in a WPF project. The dialog is called internally from the IOleCommandTarget interface of InfoPath 2013. So I do not have access to how the save as ...
1
vote
0
answers
405
views
Disable minimize, maximize and close buttons of parent window when a modal dialog is shown on a WPF parent
I have a WPF parent window that opens a modal dialog with the ShowDialog method when a button is clicked on the view. The parent window is blocked as expected until interaction with the pop-up ends, ...
1
vote
0
answers
343
views
How can I hide a window WITHOUT Visibility property?
I have an application that has a lot of modal popup windows. Some are custom windows displayed with .ShowDialog(), other are generic message boxes using a 3rd party tool (DXMessageBox.Show(...)), and ...
1
vote
2
answers
2k
views
Blocking launch of WPF Dialog from a different thread
We want to create and launch a modal dialog box over the main window. This process is initiated from a different thread - for some reason. This different thread calls the execute method - and must be ...
0
votes
1
answer
133
views
Is there a way to pass existing view model as a data context to recently opened dialog window, when using autofac?
I have a project, using Autofac. There is created a BootStrapper file that is called on application run:
public class BootStrapper
{
public IContainer BootStrap()
{
...
0
votes
1
answer
260
views
WPF application with modal MainWindow
i am wondering if there are any drawbacks, in showing a modal mainwindow in a WPF application with .ShowDialog() instead of Show().
This is the usual way to manually show the mainwindow:
private ...
3
votes
0
answers
597
views
How to get current Modal window in WPF
In my project I have a Mainwindow. In that mainwindow there is a button to open the modal window. In that Modal window there is a button to open another modal window in the same view. I have used ...
1
vote
1
answer
741
views
Implementing ShowDialog which is work in the same thread
I am developing a WPF application and i want to show Dialogs in the active Window using a PopUp or a Different grid (by changing ZIndex in this grid).
currently my solution works using Event and ...
0
votes
0
answers
330
views
Simulating ShowDialog in WPF
I'm working on Dialogs in WPF. I want to implement a DialogCenter which is responsible to change Active Window and show my custom dialog.
Here is my DialogCenter:
internal static class ...
0
votes
0
answers
104
views
modal window turned blurry with no apparent reason
I can't figure out why, but my modal window turned blurry. Have no idea of what is causing this and it's frustrating me at this point. I did not notice this (which i suppose i would have) at any time ...
0
votes
0
answers
19
views
wpf determine dialog show type? [duplicate]
I have a window in a WPF project that is used in a couple different places. Depending on the use I would like to be able to show it modal (ShowDialog()) or non modal (Show()). When a particular ...
2
votes
6
answers
5k
views
How to close modal window after a Task completes?
I have two default windows. I want one window starts a work, shows another window in the modal (dialog) form (progress indicating, but now it is not important), then closes it after this work has been ...
0
votes
1
answer
86
views
Textblock Text clears only on ShowDialog window is invoked WPF
I am trying to clear a TextBlock text which is inside a WPF window, before showing the Window as Dialog.
But the Text on TextBlock shows the Previous Value for a second, and then gets cleared ...
2
votes
1
answer
1k
views
Restyling the WPF Extended Toolkit's ChildWindow
I have a modal dialog I am displaying using the WPF Extended Toolkit's ChildWindow but I don't like the default look of the window since it doesn't support System Colors correctly (it has a forced ...
4
votes
0
answers
873
views
Why is a Wait cursor being displayed for a modal dialog in wpf
I am launching a modal dialog from the MainWindow in a WPF application by doing something like this.
SomeView view = new SomeView();
view.ShowDialog();
The Modal dialog contains a combo box inside ...
0
votes
1
answer
201
views
Enable events in main windows while modal window is active
In a WPF window I implemented a component that gives an indication of all active errors in the system.
The component is located in the task bar and
If one hovers over the component a tool-tip is ...
0
votes
2
answers
1k
views
How to get the topmost window if it is modal and inactive
I want to prevent users to run my application multiple times on the same machine so I used a solution from this thread: What is the correct way to create a single-instance application?
This works OK, ...
0
votes
2
answers
2k
views
C# - WPF modal window
Is it possible to switch or activate other windows when modal window is open?
Window1 window = new Window1();
window.ShowDialog();
1
vote
2
answers
2k
views
How to show Spinning Modal in WPF
I have an application which contain below code in its MainWindow.xaml to show the spinning modal using FontAwesome icon:
<Grid Visibility="{Binding SpinningModalVisibility}">
<...
4
votes
1
answer
1k
views
WPF modal dialog on touch screen
I am using a custom modal dialog in a WPF application, that will run on a touch device (Windows 10). I am using the MVVM pattern.
My problem:
I experience different touch behavior depending on from ...
0
votes
1
answer
211
views
ShowInputAsync is not showed sometimes
I realized an interface in WPF Page and I want to call ShowInputAsync in the MainWindow, which is where the Page is. In order to do that, I raise event in Page and block function with AutoResetEvent:
...
0
votes
1
answer
428
views
MVVM Dialogs and where to call them from?
Hoping that someone can help me further my understanding of Dialogs and how to apply them to the App I am working on (for learning purposes). Apologies in advance - I do not have a great working ...
3
votes
2
answers
2k
views
Separate project for view models to "enforce" MVVM: How do I open dialogs?
Opening dialogs while adhering to the MVVM pattern seems to be one of the regular questions (here and elsewhere). I know there are frameworks like MVVM light who have answers to that problem, but I'm ...
2
votes
1
answer
2k
views
WPF modal window in Visual Studio Extension blocking input
Using the following tutorial, within a VSIX project, I created a WPF window that inherits from Microsoft.VisualStudio.PlatformUI.DialogWindow, and I display this modally using the following code:
var ...
1
vote
1
answer
491
views
Make FloatingWindow modal
I am using the AvalonDock control to show my views as tabs. In some cases I want to open a new window instead. At the moment, I'm handling that in the LayoutInitializer:
public void ...
0
votes
1
answer
2k
views
How to add 'Notification', 'Warning' and 'Error' icons on Prism 6.2 WPF modal dialog?
In my Prism 6.2 WPF MVVM application I use notification and confirmation modal dialogs. Below is a definition of the View of a notification modal dialog used in my application:
<UserControl x:...
0
votes
1
answer
349
views
Can I set text-wrapping mode for a long-text message to transfer the text to the next line in Prism 6.2. modal dialog?
Sometimes the text of notification message for modal dialog is very long as you can see on the figure below.This is not custom modal dialog but simple notification modal dialog which has a very long ...
0
votes
4
answers
3k
views
Close WPF dialog without user interaction
I would like to show dialog during some IO operations and after it, close the dialog with code.
Something like:
DialogWindow dialog = new DialogWindow();
dialog.ShowDialog();
.... do some file ...
1
vote
1
answer
1k
views
Can a dialog be modal across multiple windows in WPF?
I am working on a WPF application where multiple windows can be present at one time. The Windows are shown using the Dispatcher and thus each Window has its own UI Thread, according to the WPF ...
0
votes
1
answer
562
views
How do you make modal ProgressBar using C#/WPF?
I am aware that ShowDialog will let me have the modal behavior and
progressBar.Visibility = System.Windows.Visibility.Visible;
await Task.Run(action);
progressBar.Visibility = System.Windows....
1
vote
2
answers
357
views
WPF dialog blocking input after closing
I have a WPF window in a VSIX application that I show as follows:
var myWindow = new MyWindow(this.CurrentWorkspace)
{
Owner = Application.Current.MainWindow
};
myWindow .ShowDialog();
However, ...
2
votes
0
answers
679
views
Compatibility issue with Expression.Blend.Sdk 1.0.2 System.Windows.Interactivity.dll
I'm developing a WPF with Visual Studio 2015 Community, C#, .NET Framework 4.6.1 and Prism.Wpf 6.1.0, Prism.Core 6.1.0 and Expression.Blend.Sdk 1.0.2.
I'm following: Implement a confirmation dialog ...
1
vote
1
answer
3k
views
C# WPF) how to minimize a parent window after child modal window is showed by showdialog()?
I've searched some posts on stackoverflow and some discussion concluded as there's no way to do this as it's standard behavior of WPF modal Window.
Isn't there really a solution to minimize(control) ...
0
votes
1
answer
430
views
Why does PopupWindowAction class sustain modal mode poorly for dialogs in Prism 6?
I use PopupWindowAction class for creation of modal dialog windows (customized and predefined) in my Prism 6 WPF modular application with Unity. (I have Windows 10 on my computer and use MS VS 2015 ...
0
votes
0
answers
394
views
Setting DialogResult is some cases raises exception
In my WPF application is some cases setting DialogResult = true raises an Exception telling that DialogResult cannot be set on unvisible window.
Window is launched:
Window.ShowDialog()
Neither ...
1
vote
3
answers
6k
views
WPF+PRISM How to make the popup window owner as main window
I am having trouble setting the owner of Popup window to Application Main window.
Here what I did.
Created a Main Window with custom PopupWindow.
<Window x:Class="MainWindow"
...
<...
5
votes
1
answer
3k
views
How to change MahApps.Metro dialog style?
I would like to change the style of a message dialog. I used this: How to change MahApps.Metro dialog content template width?
I want different styles for some dialogues. How can I change the style of ...
1
vote
2
answers
2k
views
ProgressDialogController mahapps, problems closing popup
I am creating a WPF project using Mahapps Metro .
My problem is that I would launch from DetailPage.xaml frame , which is embedded in MainWindow.xaml , the wait modal mahapps provides.
So I did two ...