Results 1 to 9 of 9

Thread: WPF for Windows & Web

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    WPF for Windows & Web

    Hi guys! i have a question, is it posible to develop a WPF application that can be deployed in desktop and be hosted in a web browser at the same time?

  2. #2
    Hyperactive Member Pac_741's Avatar
    Join Date
    Jun 2007
    Location
    Mexico
    Posts
    298

    Re: WPF for Windows & Web

    I have the same question, I think you use Silverlight for web apps.
    C# and WPF developer
    My Website:
    http://singlebits.com/

  3. #3
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: WPF for Windows & Web

    There are 3 main choices you have when creating WPF style applications and each one has its strengths and weaknesses.

    1: WPF Desktop application:
    This is basically a windows application that runs on the desktop, you have full access to things like file writing dialog boxes etc.

    2: XBAP (Browser Applications)
    This is a windows application that works in the browser. This type of application is a bit awkward to understand, its basically a very rich client model that is hosted on a server and executed and ran through a browser. The thing with XBAP's is they require the user to have the .NET framework installed. Remember though because this application is ran through the browser things like modal dialogs cannot be used. To be honest if an application needs to be hosted over the web I would skip XBAPS and go straight to silverlight.

    3:Silverlight
    Silverlight is basically a web version of WPF, it obviously has limitations on reading local files, no access to registry the same issues as any RIA.

    You cannot develop a desktop application and just port it to Silverlight because you may be using methods and operations that Silverlight cannot use. Careful planing and consideration of these limitations between both will allow you to make UI's and backround classes that a new silverlight application could consume though. For instance if an application did need to have a web presence you could use pages for the UI and consume them in both the silverlight and desktop application.

    It tends to be best to create the silverlight application first and then the desktop that way you do not run into limitations after spending hours implementing features that are restrictive to silverlight but ran fine in the desktop build.

  4. #4
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: WPF for Windows & Web

    Quote Originally Posted by Pac_741 View Post
    I have the same question, I think you use Silverlight for web apps.
    I had read somewhere that next version of silverlight will support browserless windows. i.e. they can be hosted in their own windows instead of browser windows.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  5. #5
    Addicted Member
    Join Date
    Jul 2007
    Posts
    130

    Re: WPF for Windows & Web

    i make windows wpf app and another xbap app then
    i copy a window of windows app to xbap app then i make the xbap full trust from the security
    and i run it and it shows the window normally

    so i think you can develop your windwo app then grab your forms and run them in xbap app without changes
    please your ideas
    thanks.

  6. #6
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: WPF for Windows & Web

    That is not a good habit to get into... xBaps where not created as windowed versions of desktop applications, they where created to fill a niche in LOB applications and as such should be planned and developed correctly.

  7. #7
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: WPF for Windows & Web

    Quote Originally Posted by macnux View Post
    i make windows wpf app and another xbap app then
    i copy a window of windows app to xbap app then i make the xbap full trust from the security
    and i run it and it shows the window normally

    so i think you can develop your windwo app then grab your forms and run them in xbap app without changes
    please your ideas
    thanks.
    Actually I think it's a lot easier than this.

    Have a look at this page where he shows how to create a silverlight applicaiton and then how to get a desktop version (WPF) out of it.
    http://weblogs.asp.net/scottgu/archi...erlight-2.aspx
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  8. #8
    Addicted Member
    Join Date
    Jul 2007
    Posts
    130

    Re: WPF for Windows & Web

    actually sliverlight has limited capability than wpf because wpf based on the .net framework which is much rich and i can run it on desktop and web as i mention above
    and sliverlight like flash just an extension that run the plugin

    so i think that building apps using wpf and grabbing those forms to a xbap app is better and richer

  9. #9
    Frenzied Member
    Join Date
    Jul 2008
    Location
    Rep of Ireland
    Posts
    1,380

    Re: WPF for Windows & Web

    Some of the limitations of silverlight are there for a reason. If you need an application to be really rich and access portions of the OS well then you should be making desktop applications. As I have already stated XBAP's are a niche item they are for companies who need to power of desktop applications with the ease of update that you get from ASP.NET applications.

    An XBAP should never be used as an application that you intend to distribute to the public at large.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width