5

I am use Awesomium web control to view a web page inside my WPF application. I want to Copy HTML form it but I can`t find any way. I search Google about it but unfortunate I find only one result And that is not working for me.

I am follow this Link interacting with awesominum webcontrol But it is not working.

I am try following code :

private void Button_Click(object sender, RoutedEventArgs e)
 {
    Clipboard.Clear();
    MyWebControl.SelectAll();
    MyWebControl.CopyHTML();
    var html = Clipboard.GetText();
    MessageBox.Show(html);
 }

<Custom:WebControl x:Name="MyWebControl"   HorizontalAlignment="Left" Source="www.google.com" Margin="32,83,0,0" VerticalAlignment="Top" Width="425"/>

I Set Platform Target : 86x

I am using :

awesomium_1_7_2_sdk_win

Visual Studio 2012

.NET 4.5

thank`s In advance.

Community
  • 1
  • 1
Hasanuzzaman
  • 1,822
  • 5
  • 36
  • 54

2 Answers2

0

awesomium_1_7_5_1_sdk_win

Visual Studio 2015

.NET 4.5

var html=MyWebControl.HTML.ToString(CultureInfo.CurrentCulture);
Kampai
  • 22,848
  • 21
  • 95
  • 95
gorniv
  • 180
  • 2
  • 8
0

Try

string HTML_content = MyWebControl.HTML;

You may need to set the HTML in the listener bellow.

private void webcontrolEventListener(object sender, EventArgs e){}

Hope this helps.