
Types of WPF applications
WPF applications can be of two types: desktop-based applications and web-based applications. The desktop applications are normal .EXE executables, whereas the web-based browser applications are the .XBAP files which can be deployed in web servers and run inside any supported browser. The .NET framework is mandatory to run any of these application outputs.
Each WPF application starts with two threads. The UI thread uses System.Threading.DispatcherObject to create the messaging system to maintain the queue of UI operations. Just like Win32 message pumping, it performs the UI operation sorted by the priority set to it. The other thread is the background thread to handle the rendering engine, which is being managed by WPF. It picks up a copy of the visual tree and performs action to show the visual components in the Direct 3D surface. After that, it calls all UI elements to determine the size and arranges the child elements by their parents.