Tuesday, December 22, 2009

XBAP Restrictions

XBAP Restrictions
XBAP application have some restrictions on what .NET features they can use. Since they run in partial trust they are restricted to the same set of permission granted to any InternetZone application. However 99% of standard WPF functionality is available to an XBAP application. Therefore most WPF UI features are available.


Permitted


UI Controls
Text Input controls (including RichTextBox).
Flow documents and associated readers.
XPS documents
2D drawing
3D
Animation
Audio
Video
Pages
MessageBoxes
OpenFileDialog
Internal Drag and drop (mouse driven).
Calls to WCF services.
Calls to ASMX services.


Not Permitted


Stand-alone Windows.
Most standard dialogs.
Interop with Windows controls or ActiveX controls.
Access to OS drag-drop.
Bitmap Effects (these are deprecated in .NET 3.5 SP1).
Shader Effects

Differences between XBAP, WPF Standalone and Silverlight

Differences between XBAP, WPF Standalone and Silverlight
WPF applications are divided into two categories.
• Standalone WPF Application
• XAML browser applications (XBAPs)
There is always a confusion between WPF, XBAP and Silverlight. Developers get confused which one to go for while designing a project. Here I will explain all the 3 technologies with the differences

Standalone WPF Application

- WPF applications are installed on end user's machine.
- Appear in Start Menu and Add/Remove Programs.
- Applications can be installed via MSI or ClickOnce.
- User can be offline and use the application. There is no need for Internet connection.
- Newer versions of the application may not be automatically installed in user's machine.
- WPF standalone applications can use WCF for communication.
- Applications run in its own window as other windows applications.

XAML Browser Application(XBAP)

- These type of applications are not installed in user's machine.
- They do not appear in the in Start Menu or Add/Remove Programs.
- Applications can be automatically deployed via ClickOnce.
- Applications are hosted in the browser process.
- Can be run only in IE and Firefox.
- Newer versions are always installed automatically into the user's machine.
- User must be online to use the application.
- XBAP is Windows only. We can run the application in Windows operating system only.
- XBAPs cannot use WCF.
- The user machine should have .NET framework 3.0 components.

Silverlight

- XBAP is IE and Firefox only. But Silverlight can run in any browser and platform.
- Silverlight is used for creating rich UI web application.
- User's machine don't need .NET framework.
- Can be embedded in HTML markup and rendered in any browser using the silverlight plug in.
- XABP has 99% features of WPF. But Silverlight is just a subset of WPF.