Home    |    FAQ    |    Articles    |    Directory    |    Blog    |    Tutorial    |    Samples  


XBAP Tutorial - Getting Started

This step by step tutorial demonstrates how to create a simple xbap application using Visual Studio 2005. Before you start, please make sure the following components are already installed on your system

This tutotial also assumes you are running on Win 2K/XP/Vista and Visual Studio 2005 is already installed on your system.


Step 1) Start Visual Studio 2005 and select File->New Project. The follow screen appears. If the above components are properly installed, you wil be able to see the ".Net Framework 3.0" item under Visual Basic or Visual C#. Choose XAML Browser Application (WPF) and create your project.


Step 2) Inside the Solution Explorer,  right click the Page1.xaml file and choose Open With... XML Editor to display its XML source. Alternatively, you can simply double click the Page1.xaml file and click the XAML tab to display its source. 


Step 3) Paste the following line of code in between the <Grid></Grid> tags that are generated automatically by Visual Studio 2005.

<TextBlock Background= "Lavender">HelloXBAP </TextBlock> </FONT>< /FONT>


Step 4) Click on Debug->Start Without Debugging  to test your xbap application. You should be able to see something similar to the screen below. Close the window.


Step 5) Next, naivigate to the Debug subfolder of your application to locate the .xbap file

For example, our application would be located at


Double click the .xbap file to run it. Congratulations. You have just created your first .xbap application.


If you encounter a "Trust not granted " error,  you will need to disable the Popup Blocker in your browser.

For Internet Explorer 6, this can be done by

  • Going to Tools->Internet Options from the menu
  • Choose the Security Tab and Select the Internet Zone
  • Click Custom Level
  • Under the Miscellaneous Group, Disable "Use Popup Blocker"


Barcode 128