Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 213867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:19:10+00:00 2026-05-11T18:19:10+00:00

How to create a WPF application that can be deployed as either a XBAP

  • 0

How to create a WPF application that can be deployed as either a XBAP or as a native Windows application with as little overhead as possible? XBAPs are binary compatible with WPF Windows applications and run on top of the same CLR (Unlike Silverlight). They still differ in some ways.

From deployment point of view their largest difference is that a XBAP has a Page control as the main container while a Windows application has a Window control. It would be rather trivial to make the Windows application use the Page control but I feel (Feel free to disagree) that using a Page navigation method in a Windows application is rather unintuitive.

The second major difference is that XBAPs by default are executed in a partially trusted environment. This can be bypassed though and the XBAPs can be made run in full trust mode. The partial trust mode with XBAPs means you cannot access for example remote web services or native code from the XBAPs directly.

What would be an easy and maintainable way to achieve the following with the above issues?

Requirements

  1. Deployable in both ways: as a XBAP over http and as a stand-alone WPF executable.
  2. Shows information from a remote web server such as flickr or through an unmanaged API.
  3. If possible, the deployment methods should remain faithful to their platforms. That is to say: Use Pages in XBAP where those make sense and dialogs in the Windows app where those make sense.

Restrictions

  1. Platform optimised. The stuff required by the XBAP shouldn’t affect the Windows client and vice versa.
  2. The deployment options share as much code as possible. This helps in testing and maintenance.
  3. Running the XBAP should be as simple as possible. Certificate prerequirement would defeat the purpose of a XBAP.

What I have gathered is that first requirement requires two separate projects. The second restriction could be worked upon by having a user control project which contains all the UI and is referenced by the two deployment projects. A WCF web service could work around the limitations of XBAPs.

If employing a solution similar to the above lines the first restriction would require some work as the Windows client could do without the WCF service as it’s already running in full trust mode. Also the third requirement would need some deployment specific code so all the UI code cannot be in the user control project.

I’d like to know what solutions could be used to resolve these problems. Feel free to ignore the partial solution. It’s there mainly to explain the point and to prevent the “Thought of this already” comments. So just to clarify, I’m interested in all solutions to this problem, not just those that abide to the partial solution.

The reason for interest to this is that a solution would mean there’s no need to ponder between a WPF Windows app and a XBAP as these both could be created with little more effort and the client could choose whichever suits them best.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:19:10+00:00Added an answer on May 11, 2026 at 6:19 pm

    You may want to take a look at Prism (at codeplex)
    It helps to target Wpf, Xbap and Silverlight with minimum code changes (the amount of extra work depends on your project).

    Here’s how to use it to create Wpf and Xbap application: Prism and XBap Applications

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 111k
  • Answers 111k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assuming you are talking about a Windows Forms DataGridView, I'm… May 11, 2026 at 9:47 pm
  • Editorial Team
    Editorial Team added an answer You are correct that you need to use a UIWebView.… May 11, 2026 at 9:47 pm
  • Editorial Team
    Editorial Team added an answer Your issue is likely that the string->binary conversions are using… May 11, 2026 at 9:47 pm

Related Questions

At work, I want to create a WCF Windows Service that runs on a
I need to create a Web-based Dashboard tool for a LOB application. Essentially users
I'm looking for a way to create an it will look cool effect for
I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on
I'm working on a simple application to start learning my way around WPF. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.