O'Reilly logo

Visual Basic 2012 Programmer's Reference by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PAGE APPLICATIONS

A Page is similar to a borderless Window. It doesn’t provide its own decorations (border, title bar, and so forth), but instead relies on its container to provide those elements.

Often a Page is hosted by a web browser, although the WPF Frame control can also display Page objects.

The following sections explain how you can use Page objects to build WPF applications.

Browser Applications

To make a XAML Browser Application (XBAP, pronounced ex-bap), select the File menu’s New Project command to display the New Project dialog box. On the Visual Basic ⇒ Windows tab, select WPF Browser Application, enter a project name, and click OK.

EXCITING XBAPS
For an interesting site that has lots of information about XBAPs including a FAQ, tutorial, and samples, see XBap.org (http://www.xbap.org).

The new application begins with a single Page class named Page1. You can view and edit this Page exactly as you would view and edit a Window. Open the Solution Explorer and double-click the Page1.xaml entry to edit the Page’s controls. Double-click the Page1.xaml.vb entry to edit the Visual Basic code behind the Page.

To run the application, open the Debug menu and select Start Debugging. Internet Explorer should open and display the initial Page. Visual Studio is nicely integrated with this instance of Internet Explorer so you can set breakpoints in the code to stop execution and debug the code just as you can debug a Windows Forms application or a WPF Window application.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required