Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

WPF Webbrowser

$
0
0
I have a webbrowser that hosts a winform.

I have another page that hosts a winform.

From one page I want to navigate to another page in the same browser.

I can open that page from a button click, but only as a popup.

xaml page
Code:

Imports solution
Imports System.Windows.Controls
Imports System.Windows.Forms.Integration
Imports System.Windows.Forms

Class web_Contacts

    Private ReadOnly mainForm As New frmContacts

    Public Sub New()
        InitializeComponent()

        mainForm.WindowState = FormWindowState.Maximized
        mainForm.TopLevel = False
        contactsHost.Child = mainForm
    End Sub

End Class

Winform Button
Code:

  Dim nw As New NavigationWindow()
            Dim Uri = New Uri("web\web_Contacts.xaml", UriKind.Relative)
            nw.Navigate(Uri)
            nw.WindowState = WindowState.Maximized
            nw.ShowsNavigationUI = False
            nw.ShowInTaskbar = True
            nw.Show()

Everything works fine, I just don't want to show as a popup page.

Any help apprecaited

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>