Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qm3 How to add the Winform controls
#3
Thanks for the reminder, it seems that Winform is a bit outdated

I found the WPF code for the control above, but using the code created by visual studio, the CS file and the XAML file are separate

Not a lot of code, I want to know how to achieve the same function in QM3.

Description of the operation in VS:

1.Open your WPF project; 
2.Add reference to EO dlls; 
3.Open a Window in XAML view; 
4.Add "eo" namespace prefix in your XAML file. Simply add the following attribute to your Window or UserControl 
For example, your Window element may look like this: 
XAML
<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:eo="http://schemas.essentialobjects.com/wpf/"
        Title="MainWindow" Height="250" Width="350">
Note the additional "eo" prefix added to the Window element. 

5.Add an "eo:WebControl" element to your Window: 
XAML
<eo:WebControl>
    <eo:WebControl.WebView>
        <eo:WebView x:Name="webView1">
        </eo:WebView>
    </eo:WebControl.WebView>
</eo:WebControl>

Then you can use webView1 in your code: 

//Load Google's homepage into the WebView
WebView1.Url = "www.google.com";

-------------------------------------------------------------------------------------------------------------------------------
C# code:
// script "WebView_OE_WPF.cs" /*/ role exeProgram; outputPath %folders.Workspace%\exe\WebView_OE_WPF; r %dll%\EO\EO.WebBrowser.dll; r %dll%\EO\EO.WebBrowser.WinForm.dll; r %dll%\EO\EO.Base.dll; r %dll%\EO\EO.WebEngine.dll; r %dll%\EO\EO.Wpf.dll; /*/


//Todo: Process xaml

//Load Google's homepage into the WebView
WebView1.Url = "www.google.com";


Messages In This Thread
Qm3 How to add the Winform controls - by Davider - 08-16-2022, 02:29 AM
RE: Qm3 How to add the Winform controls - by Davider - 08-16-2022, 08:41 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)