Framework version 3.5 and earlier, but like .NET Framework 4.0, the CoreCLR instance included in Silverlight can be hosted with another instance of one of the desktop CLRs in one single process. With this, the XAML layout markup file (.xaml file) can be augmented by code-behind code, written in any .NET language, which contains the programming logic. It can be used to programmatically manipulate both the Silverlight application and the HTML page which hosts the Silverlight control. The XAML markup, as well as the code, is compiled into CLI assemblies which are then compressed using ZIP and stored in a .xap file. Silverlight ships with a lightweight class library which includes features such as extensible controls, web services, networking components and Language Integrated Query (LINQ) APIs. This class library is a subset of, and is considerably smaller than, .NET Framework's Base Class Library (BCL). Silverlight code runs in a sandbox, thus preventing the invocation of platform APIs. The version of .NET Framework in Silverlight adds a subset of Windows Presentation Foundation (WPF) UI-programming model, including support for shapes, documents, media and animation objects of WPF. Beta 2 onwards, it ships with more than 30 UI controls (including TextBox, CheckBox, Slider, ScrollViewer, and Calendar controls), for two-way databinding support, automated layout management (by means of StackPanel, Grid, etc.) as well as data-manipulation controls, such as DataGrid and ListBox. UI controls are skinnable using a template-based approach. Third-party libraries of expanded UI-control sets are also available. The included BCL provides classes for collections, reflection, regular expressions, string handling and data access. It also supports LINQ, with full support for LINQ to Objects and expression trees. Almost all of the System.Linq and System.Linq.Expression namespaces are exposed. It also supports serialization of objects, for data persistence. Silverlight can handle data in RSS or JSON format, in addition to XML. The BCL provides enhanced support for working with XML data, including the XMLReader and XMLWriter classes. Silverlight 2 also supports asynchronous programming via the use of the threading libraries. Silverlight also includes classes for data access over web services, REST, Windows Communication Foundation (WCF) Services and ADO.NET Data Services. The networking support in Silverlight can be used by Silverlight applications to communicate using HTTP, or at the lower socket level. Cross-domain communication is supported. Silverlight uses an XML-based configuration file to control the cross-domain resource-access policy, for both HTTP and socket connections. It can be