x
Main Site login Signup

Add Webcontrol at runtime

Hi

first I want to apologize for my bad english. I try to add a WebControl at runtime but it seems I missing something, when I run my programm I cant see the control or website, no errors. I tried to add the control at the designer and that works fine, i can see the website and change the Source but not when I add the control at runtime. I have already searched the wiki and Forum but could not find a solution. Im using Visual Studio 2015, VB.Net as Language and WPF.

My Code:

 Imports Awesomium.Core
 Imports Awesomium.Windows.Controls

...

 Private WithEvents wcDetails As New WebControl

...

 Dim wPrefs As WebPreferences = New WebPreferences()
 Dim wSession As WebSession = WebCore.CreateWebSession(wPrefs)
 
 wcDetails.ViewType = WebViewType.Window
 wcDetails.SetValue(Grid.RowProperty, 0)
 wcDetails.SetValue(Grid.ColumnProperty, 2)
 wcDetails.Margin = New Thickness(3)
 wcDetails.Visibility = Visibility.Visible
 wcDetails.WebSession = wSession
 wcDetails.Source = "https://www.google.com".ToUri()
 
 grid.Children.Add(wcDetails)

From the Debuglog:

 [1122/101319:INFO:(0)] WebCore is now online.
 [1122/101319:INFO:(0)] Running Awesomium 1.7.5.1

When I add any other Control to grid like I did with the WebControl that works fine. Probably I simply misunderstood or overlooked something, im not a proffessional developer.

Thank you!

asked Nov 22, 2016 at 11:18 AM avatar image Simon 0
more ▼
(comments are locked)
10|1100 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.