Introduction to XAML Browser Applications (XBAP)
page 5 of 8
by Nihar Ranjan Nayak
Feedback
Average Rating: 
Views (Total / Last 10 Days): 39809/ 605

Creating a sample XBAP Application

Step 1

Start Visual Studio 2008. Click File -> New -> Project. Select the Windows item inside Visual C#. Then choose the WPF Browser Application template and create a project. This template is basically used to create XBAP applications.


Step 2

Inside solution explorer double click the Page1.xaml. Paste this line between the <Grid></Grid>.

<TextBlock Text="This is my first XBAP application." Background="LightGray" 
    Foreground="DarkOrchid"></TextBlock>

Then build your project.

Step 3

Next go to your Debug folder of your Application. Double click on the .XBAP file to run it. It will open in a browser window. If your default browser is not IE or FF then copy the Url from other browser window and paste it in your IE address bar. (because XBAPs run only in IE and FF) You will see the following output. If you get a “Trust Not Granted” error then you will need to disable the PopUp blocker in your browser.



View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 1 and 2 and type the answer here:

User Comments

Title: Nice article   
Name: Neetu
Date: 8/26/2009 3:23:46 AM
Comment:
Good explanation but please specify some more details on applying controls on WPF enabled application(StandAlone)
Title: thanks may fold   
Name: bob
Date: 7/9/2009 7:24:29 PM
Comment:
thanks for this great write up on XBAP, i was in a panic state trying to figure out if i could use XBAP on the WEB and this answered my pressing concerns, now i can sleep!

Thanks Nihar and may great things come your way this year!
Title: Mr   
Name: Nihar
Date: 3/18/2009 2:16:51 AM
Comment:
Hello Ithyan,

XBAp apps run in partial trust mode. So they can't use WCF services in .NET framework 3.0. But framework 3.5 has some improvements over 3.0. So in framework 3.5 we can use WCF in partial trust mode for.

Thanks.
Title: Mr   
Name: Ithyan
Date: 3/18/2009 12:29:22 AM
Comment:
hi,

i hope XBAPs can use WCF.

am completley taken aback on seeing this."XBAPs cannot use WCF."
please check.
Title: Mr.   
Name: Satyadeep Kumar
Date: 3/11/2009 5:37:04 AM
Comment:
Nice, but i'm confused about one line in conclusion: "WPF doesn't require the framework"!!!

Product Spotlight
Product Spotlight 






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/21/2009 3:35:21 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search