Show PleaseWait Popup in Catel Orchestra + MahApps.Metro - mahapps.metro

I am trying to show a PleaseWait popup in a Orchestra app the same way it is shown in Catel without Orchestra but im unable to do so.
I know that the PleaseWaitService shows the progress and text in a status bar on the bottom of the window, but is does orchestra have something similar to what Catel has?

The reason for this is that we replace the default Catel one by the Orchestra one. We do this for 2 reasons:
It's less intrusive (use the mouse cursor instead of a full blocking animation)
We support progress notifications in the bottom of the app (again, less intrusive).
If you want to use the old one, you must "re-overwrite" the registration in the service locator:
var serviceLocator = ServiceLocator.Default;
serviceLocator.RegisterType<IPleaseWaitService, Catel.Services.PleaseWaitService>();

Related

Keyboard focus problems

I am needing to use the DotNetBrowserControl inside of another application (I am an add-in in the application). The application is written in WPF and has some WinForms components.
When I try to use the WPFBrowserView in the app I can never get focus to go into the Browser Window at all (even when clicking on a the google search box for example).
When I try to use the WinformsBrowserView inside of a WindowsFormsHost control I am able to get focus into the google search box by clicking on it. However once I click focus out of the browser control (to a WPF textbox for example) I can never get Keyboard focus back into the browser (even when clicking on a textbox in the browser).
It seams I am closest on getting the WInformsBrowserView working. Does anyone have any advice on how to force focus into the browser window? Even if I could programmatically force this to happen it would be a huge help.
We have implemented force focus feature for DotNetBrowser, but it is not yet present in the current version. We plan to add it to the next version of DotNetBrowser. If you need a build with this feature present, please get in touch with us via DotNetBrowser support email, and we will provide you with a preview build.

Embedding of Webbrowser in WPF Form with Address bar + Buttons

I wouldlike to embed a webbrowser in a WPF application. The browser should look like a normal browser, with address bar, back and forward button and status bar. Is there a way how that could easily written in XAML, with a direct databinding of the address to a textbox, with a direct routing of events from the buttons to the webbrowser object, and the enabling back?
Why not?
Here and here are uploaded some screenshots from our application which has WebModule inside and is able to work like browser.
In our implementation we used Windows Forms WebBrowser control as browser engine and MVVM as communication pattern. Model has navigation commands (forward, back, ...) that raise proper events. View is handling this events and delegate requested actions to inner WebBrowser component. Additionally view is handling WebBrowser's events (NewWindow, DocumentCompleted, Navigating, Navigated) and setting up model's state.
Model and view together contain about 500 lines of code (I don't think it's very much, do you?).
Of course, I should mention, that due to using IE engine this browser could have some problems on complicated web-sites.
P.S. We didn't use System.Windows.Controls.WebBrowser because it does not provide access to NewWindow event.
P.P.S. I've posted this answer from browser in our WPF application. Good luck!

What is the difference between "User Control" and "Page" in Silverlight?

I am really new to Silverlight. I am working through some of the sample codes I found online.
I notices sometimes a new "Page" is added, and sometimes a new "User Control" is added.What are the differences between those 2?
Btw, when I tried specifying the URL for a hyperlink as "www.apple.com", there is an error saying "www.apple.com" can not be found. Are there anyway of specifying an URL for a website for a HyperlinkButton?
Thanks :)
In SL3 and up; a Page correlates to the Navigation framework whereas a UserControl is a control providing a defined set of functionality using multiple controls which can then be used within a Page.
User Control:
When you build your project , any user control that you created will appear in the toolbox also. You can drag and drop it like any other control (like a button or a grid).User controls are used for enhanced flexibility. You can customize your controls, set as many properties you want , and it really simplifies things without going for creating custom controls.
Page:
However, when you come to a Page, you can use it mostly for Navigation . It can contain other controls , but it is mainly intended for Navigation within Frames.

opening a silverlight childWindow overlay on the viewport of the browser

I would like place a silverlight contol on an HTML page --- something about the size of a typical calendar control. However when the user selects a day on the control a bigger canvas opens up on top of the containing page --- something like a modal dialog box that you might find with the AJAX.
I'm wondering if this is even possible with Silverlight, or is the silverlight content limited in size to the DIV element on the host page?
UPDATE: after doing some poking around, I think the answer will involve using the ChildWindow control introduced with Silverlight 3. However I'm still at a loss how to have the ChildWindow display ontop of the existing content
I know one way, you will need javascript event on the page itself to expand a silverlight object to fit the whole page then build you silverlight event accordingly.

Stop Dragging from a WPF WebBrowser control

I have a WPF application which contains a WebBrowser control.
Currently, the user can select something within the WebBrowser and can copy the content by dragging it out to another application and dropping it there.
I'd like to be able to stop the user doing this. I'd assumed that there would be a "DragStart" event that I could capture and cancel - but I haven't been able to find something so simple.
Is it possible to capture the start of drag event and cancel it?
Is there a better way to achieve this?
You can implement IDocHostUIHandler::FilterDataObject and filter out common clipboard formats
You don't get access the WPF browser's native interface until the document is ready. Not sure if it would work with the WPF browser class. There is also a bug in Windows Forms to prevent you from customizing its implementation of IDocHostUIHandler.
You can try some wrapper class of the webbrowser ActiveX, such as the one described at http://www.codeproject.com/KB/miscctrl/csEXWB.aspx

Resources