SPSite.UIVersionConfigurationEnabled Property
SharePoint 2010
Gets or sets a Boolean value that specifies whether to enable the visual upgrade user interface (UI) for changing the UI version of the site collection.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online