|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Provides properties to determine what runtime environment was used to open the form template.
Assembly: Microsoft.Office.InfoPath (in Microsoft.Office.InfoPath.dll)
The class provides the IsBrowser and IsMobile properties which enable you to determine what editing environment was used to open a form template. If both properties return false, the form template was opened in Microsoft InfoPath 2010. If either property returns true, the form template was opened from an appropriately configured document library on Microsoft SharePoint Server 2010 running InfoPath Forms Services in the program for the corresponding property: a Web browser (IsBrowser property) or a mobile browser (IsMobile property).
In the following example, a basic pattern is shown for checking the values of IsBrowser and IsMobile properties to conditionally run code depending on which environment and program was used to open the form.