i implemented a usercontrol containing the new webview2 control and made it "comvisible". when I use the usercontrol in a winform application, and navigate to an url, the right page is shown. But when i try to insert the registered control in the activeX Test container, i do not get any paged displayed. After that I added a button and some other standard controls to the user control. this controls are shown. If i replace the webView2Ctrl with the WebBrowserControl, everthing works. So what is the difference between the controls?
Thx,
coontry_boy
Related
I am trying to make some customized controls that can be add to the Toolbox. I tried making User controls, but the problem is that when I define the Content property for any of the controls, they just simply disappear. I looked online and I solved this problem by making Custom controls. But I want to make user controls that can inherit( or extend) the standards from existing controls such as Button.
Can this be done? User Control inheriting from Other Controls?
I am using a control from a dll in my html page as
<object id="ATT" width="100%" height="100%"
classid="CLSID:E20EC898-E4EE-4A20-A5A5-E10144FDC6BA"
codebase="AvtechMediaControl.cab#version=1,1,7,6" VIEWASTEXT>
</object>
But I want to access the same into my WPF application.
When I try to choose the DLL in the toolbox, i get the following error,
“The following controls were successfully added to the toolbox but are not enabled in the active designer”
I need a way to add it into my WPF project. I do not want to go with the webbrowser control.
ActiveX controls cannot be directly added to a WPF view, but then can be hosted inside of Windows Form control. And WPF can host WinForms controls. Microsoft has a walk through describing the process.
The short description of this is that you'll add a WindowsFormHost to you XAML view. The MSDN walk though shows this being done in the code behind, but the WindowsFormHost can be added in the XAML. Then you'll set the Child of the WindowsFormHost to the ActiveX control. This will have to be done in the code behind as there is no support for adding ActiveX controls in the XAML editor.
You also need to be aware of the behavior of a hosted control in WPF. No WPF content can overlap the hosted control. The hosted control will always draw over top of your WPF content.
We have a WPF user control that provides drag and drop functionality. We’ve also used an adorner to provide visual drag/drop feedback to the user about the framework element being dragged. If the hosting application for our user control is WPF, we can drag from the user control and drop to the target control that is hosted in the WPF form and we see the adorner. We have no issues with this scenario.
However, we have an issue because we need this WPF user control to be inside a VB.NET windows form. For our Windows Form project, We added a reference to the WindowsIntegration assembly and added a WPF control inside an ElementHost. This works great and we can drag and drop but the one issue we can’t solve is that when we drag from the user control to the target element hosted in the VB.NET windows form, the adorner doesn’t show.
Please help!
we are using
System.Windows.Forms.WebBrowser
in my wpf application but that control is placed topmost(which is know for it), which leads to awkward UI.
in alternative to that we have used
System.Windows.Controls.WebBrowser
the ui issue has been resolved. But it din't full fill the necessary functionality.
We need to copy a web page content into our wpf control without losing any format and it should highlight all links. In particular, we have to open a ie process with the link clicked.
Is there any wpf control for above requirement..
Hy!
I create a WPF application. I have a Windows Form element. This control displays the WebCamera picture.
I put it in canvas, 'cause I have to show the recodring time, so I also put a textblock into the canvas. My problem is that, I've already done everything with the From control, for example I set the ZIndex etc., send back, but the WebCam image always the highest lay. I cant send it behind. This element is a System.Windows.Forms.Integration.WindowsFormsHost
Can anybody help me? I hope I could write my problem understandable.
That's not possible. WindowsFormHost is HwndHost, and according to MSDN
HwndHost will appear on top of other WPF elements in the same
top-level window. However, a ToolTip or ContextMenu generated menu is
a separate top-level window, and so will behave correctly with
HwndHost.
Consider following options:
adding overlay controls to WinForms control
placing your overlay WPF controls inside a Popup window (you'll have to handle that window location manually)
look for a WPF control alternative for your WinForms control (or implement your own)