Wpf Prism Resize Interaction Window - request

I am currently using the InteractionRequest feature of Prism to get confirmed data from DialogWindow.
Everything is fine until here.
The problem is user can resize the interaction window.
I could not find a easy way to do that.
Is there any idea ?
Any help will be appreciated.

Related

WPF Multiple Instances of Windows and MVVM

How do I use multiple windows in an WPF MVVM app?
I have a Main Window with a menu control that needs to open up new instances of the window each time the item it is selected. I need to be able to show windows next to each other, it is a requirement and not page or usercontrol navigation.
Does anyone have an example of doing this?
I've read it is not recommended UI design but it is the requirement I have to implement.
Actually I have this working by using the WindowManager from Caliburn.Micro which seems like an very excellent framework for this type of application. I did look into prism but it seems over complicated and Caliburn is very easy to understand which did meet the requirements. I looked into MVVM Light but the documentation is horrible and lacks examples and I don't have time to figure it out.

Modal Dialog in WPF

Here is my problem: I am migrating an application from Windows Forms to WPF, but I am totally new in WPF technology.
I have been lucky creating a ribbon also have been able to add some elements to it, but right now I am struggling to create a modal dialog.
How can I achieve this? I have already created all the design of the dialog, but I cannot get it open as a modal window.
Besides, since this application has to be developed under MVVM pattern, where could I place that code? According to what I've read, that code has to be place in the view class, am I right?.
Thank you in advance.
You show a WPF Window modally using Window.ShowDialog. Also this WPF Window Overview will help.
Besides, since this application has to be developed under MVVM
pattern, where could I place that code?
Look under the Related questions to your right, there are many answers to this question in there. For example:
Open dialog in WPF MVVM

wpf WindowsFormHost

Hi Every Body
Am Working With WPF Application
I Needed To Use MS Reports In My Application So I Used WindowsFormsHost
But The Problem Is That The WindowsFormsHost Can'nt Handle Touch Events
How I Can Handle Touch Events In My Report In WindowsFormsHost
Please I Need Ur Help
Thanks
The question is as old as multi touch. As long as the control doesn't support it, you have to trick. Whether that's going to work depends on the control. The BING map control was successfully made to respond to touches. I think there's a touch enabled layer that takes touches and translates them to window messages. This can get a real mess.
Please keep in mind, that even if you can get such a solution to work, you won't get a touch optimized control. The control will probably have a bad, bad user experience...
If it's all about displaying data, I've described a possible alternative implementation on my post: for answer How to display a PDF document in a Microsoft Surface application?

WPF Menu on Winforms

Is it possible to show WPF Context menu on WinForms?
If yes, how could we do that?
OK, so I've found the answer myself... (I tried to give a 50 point bounty, but I don't think I can award myself :P)
We have a lot of legacy WinForms... forms... still in our project at work. And here's the secret code that is needed to display a WPF Context Menu in a WinForms project!
var myMenu = new System.Windows.Controls.ContextMenu();
myMenu.Items.Add("One");
myMenu.Items.Add("Two");
myMenu.Items.Add("Three");
myMenu.IsOpen = true;
Tada!!! - There is no secret code needed... you can write this code in a WPF App or a WinForms app and it works the same.
And there's your answer :)
You can mix the 2 technologies using WindowsFormsHost (WinForm inside WPF window) and ElementHost (WPF inside WinForm window).
You will not encounter the Airspace issue as you are adding a WPF menu into a Winform application. But you will if you create WPF windows with Winform UserControls. This Blog post has some ideas about solving it, but it is not pretty.
I don't know if it can be done, but this article might help point you in the right direction. As a WPF developer, it seems strange to me to want to mix winforms and wpf, but i can see the case for re-use.

block script debugging for wpf browser control

I have used browser control for my WPF browser application.I want to disable the script error message.Please let me know exactly as I am very new to this application.
Thanks in advance.
Answer other than disabling script message on advance tab of internet option.
The problem here is that the WPF WebBrowser did not implement this property as in the 2.0 control.
Your best bet is to use a WindowsFormsHost in your WPF application and use the 2.0's WebBrowser property: SuppressScriptErrors. Even then, you will need the application to be full trust in order to do this.
Not what one would call ideal, but it's pretty much the only option currently.

Resources