XAML Browser Applications
Encyclopedia
XAML Browser Applications (XBAP, pronounced "ex-bap") are Windows Presentation Foundation
(.xbap) applications that are hosted and run inside a web browser
such as Firefox
or Internet Explorer
. Hosted applications run in a partial trust sandbox environment
and are not given full access to the computer's resources like opening a new network connection or saving a file to the computer disk and not all WPF
functionality is available. The hosted environment is intended to protect the computer from malicious applications
; however it can also run in full trust mode by the client changing the permission. Starting an XBAP from an HTML
page is seamless (there is no security or installation prompt). Although one gets the perception of the application running in the browser, it actually runs in an out-of-process executable (PresentationHost.exe) managed by the CLR
. In the initial release of .NET Framework 3.0
, XBAPs only ran in Internet Explorer. With the release of .NET Framework 3.5 SP1
which includes an XBAP extension, they also run in Mozilla Firefox.
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 of the WPF UI
features are available.
Windows Presentation Foundation
Developed by Microsoft, the Windows Presentation Foundation is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI...
(.xbap) applications that are hosted and run inside a web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...
such as Firefox
Mozilla Firefox
Mozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. , Firefox is the second most widely used browser, with approximately 25% of worldwide usage share of web browsers...
or Internet Explorer
Internet Explorer
Windows Internet Explorer is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95 that year...
. Hosted applications run in a partial trust sandbox environment
Sandbox (computer security)
In computer security, a sandbox is a security mechanism for separating running programs. It is often used to execute untested code, or untrusted programs from unverified third-parties, suppliers, untrusted users and untrusted websites....
and are not given full access to the computer's resources like opening a new network connection or saving a file to the computer disk and not all WPF
Windows Presentation Foundation
Developed by Microsoft, the Windows Presentation Foundation is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI...
functionality is available. The hosted environment is intended to protect the computer from malicious applications
Malware
Malware, short for malicious software, consists of programming that is designed to disrupt or deny operation, gather information that leads to loss of privacy or exploitation, or gain unauthorized access to system resources, or that otherwise exhibits abusive behavior...
; however it can also run in full trust mode by the client changing the permission. Starting an XBAP from an HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....
page is seamless (there is no security or installation prompt). Although one gets the perception of the application running in the browser, it actually runs in an out-of-process executable (PresentationHost.exe) managed by the CLR
Common Language Runtime
The Common Language Runtime is the virtual machine component of Microsoft's .NET framework and is responsible for managing the execution of .NET programs. In a process known as just-in-time compilation, the CLR compiles the intermediate language code known as CIL into the machine instructions...
. In the initial release of .NET Framework 3.0
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
, XBAPs only ran in Internet Explorer. With the release of .NET Framework 3.5 SP1
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
which includes an XBAP extension, they also run in Mozilla Firefox.
XBAP limitations
XBAP applications have certain restrictions on what .NET.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
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 of the WPF UI
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...
features are available.
Permitted
- 2D drawing
- 3D
- Animation
- Audio
- Calls to ASMX services.
- Calls to Windows Communication FoundationWindows Communication FoundationThe Windows Communication Foundation , previously known as "Indigo", is an application programming interface in the .NET Framework for building connected, service-oriented applications.-The architectures:...
(WCF) services. - Flow documents and associated readers.
- Internal drag and drop (mouse driven).
- MessageBoxes
- OpenFileDialog
- Pages
- Text Input controls (including RichTextBox).
- UI Controls
- Video
- XPS documents
Not permitted
- Access to OS drag-and-dropDrag-and-dropIn computer graphical user interfaces, drag-and-drop is the action of selecting a virtual object by "grabbing" it and dragging it to a different location or onto another virtual object...
. - Bitmap Effects (these are deprecated in .NET 3.5 SP1).
- Direct Database communication (unless application is fully trusted)
- Interoperability with Windows controls or ActiveXActiveXActiveX is a framework for defining reusable software components in a programming language-independent way. Software applications can then be composed from one or more of these components in order to provide their functionality....
controls. - Most standard dialogs.
- Shader Effects
- Stand-alone Windows.