Popup Authentication Window In Maui Blazor - c#

I'm using blazor maui to develop a windows application and need to authenticate the user with graph, I can open up the URL in the default browser but would like a popup window instead as is the norm in GUI applications such as Outlook etc when having to login.
The WebBrowser control for winforms seems to do what I need but is for winforms and doesn't appear to support .net 6 and maui. Webview2 also seems to do what I need but I can't get it to work in Maui as the ressources i've found are mainly focused on WPF.
Is there anything like this in Maui and how would I go about implementing it?

By creating a new contentpage and the showing it in a new window as shown here and in the contentpage having a webview as documented here. I achieved what I wanted, just remember to have height request and width request in your webview or it won't show.

Related

Handle AxHost events designed for WebBrowser (C#)

We've got an ActiveX control that was designed primarily for web browsers (MSN Chat Control), and we've embedded it in our Windows Forms (.Net Core 6) application.
Traditionally, when the ActiveX control is within a web browser, the Chat Control is able to redirect the main page (hosting the frame), open new windows, etc.
It's a long shot, but I'm wondering if anyone is able to suggest how we can capture these for handling within our application?

Is there any way to fully control browser from application?

I was trying to make a pc application that helps people more conveniently when they are using a browser(e.g Chrome, Firefox, Edge ...)
For example, the application shows the default browser and let user can choose another browser as default if they want to, and the app shows all windows that are currently opened; Overmore, when the user clicks a specific window then app will focus the window.
user can select default browser
user can see all windows categorized by browser type
So, my initial planning was using Election js; however, I've found that there is no way to control a browser from the Electron application since Node js cannot access the users' system(this thinking could be wrong since I have poor English😥)
After some research, I'm guessing C# can do that by using windows api. I've saw this post that saying by using DDE, we can get tabs urls.
But I'm wondering if C# can fully control a browser; for instance, create a new window, notice if music or video is playing in the tab, request to browser for getting favorites list.
If it cannot, how about requesting api to the browser from pc application?
You cannot fully control a browser. Internet Explorer was the only browser that had a documented and supported API to control, inspect and automate. Internet Explorer is dead so this is a dead end. The basic DDE control interface is also outdated.
Accessing favorites and the content of open tabs is limited because evil people would use such APIs to inject and spy. If you want to access the favorites you will have to write custom code for each browser.
Using the accessibility and UI automation APIs is the only reliable and supported way of interacting with modern browsers. SetWinEventHook can be used to detect window creation and primitive state changes. MSAA/UI Automation needs to be used to get more information from each browser window.
The thumbnail API and/or magnifier API can be used to get the preview image.
To open a new tab, execute a new process with the URL on the command line. Some per-browser customization might be required (-new-tab parameter etc).
Use IApplicationAssociationRegistration::QueryCurrentDefault to detect the default browser.

Hosting WPF usercontrol in asp.net

Is there any toolbox item or control or any other way by which I can host a wpf usercontrol inside an asp.net web site? I can host wpf inside win form but I want it done in asp.net.
You can't host a WPF usercontrol inside any website. The closest thing is the use of Silverlight, which runs in a browser. But Silverlight isn't maitained and developed anymore...

C# WinForm application supporting Google Checkout?

I am working on a project where entire application is C# WinForm desktop application. Now our client want to support an action on a form which results in user being charged via his/her Google checkout account. I am wondering if I can provide a checkout interface similar to web browser using windows form or not. If so, How?
have you tried the native winforms WebBrowser control?
The WebBrowser control lets you host Web pages and other browser-enabled documents in your Windows Forms applications. You can use the WebBrowser control, for example, to provide integrated HTML-based user assistance or Web browsing capabilities in your application. Additionally, you can use the WebBrowser control to add your existing Web-based controls to your Windows Forms client applications.
http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx

can we run javascript in .net window application

hi I am developing a application in which i want to show pop up and loading image . for this i need to use jquery can it possible to run these script in .net window application form as iam not using asp .net .
You can add in an internet browser control onto your windows form and load/run the javascript within the browser control.
It's not possible. You must open a popups in windows applications byc creating new form instances.
new PopupForm().Show();

Categories

Resources