Is this really the version you are looking for? Kentico Xperience 10 API is no longer updated. Use the switcher in the header to choose your product version.
List of examples:
// Creates a new form control object
FormUserControlInfo newControl = new FormUserControlInfo();
// Sets the form control properties
newControl.UserControlDisplayName = "New control";
newControl.UserControlCodeName = "NewControl";
newControl.UserControlFileName = "~/CMSFormControls/Basic/TextBoxControl.ascx";
newControl.UserControlType = FormUserControlTypeEnum.Input;
newControl.UserControlForText = true;
// Saves the form control to the database
FormUserControlInfoProvider.SetFormUserControlInfo(newControl);// Gets the form control
FormUserControlInfo updateControl = FormUserControlInfoProvider.GetFormUserControlInfo("NewControl");
if (updateControl != null)
{
// Updates the form control properties
updateControl.UserControlDisplayName = updateControl.UserControlDisplayName.ToLower();
// Saves the changes to the database
FormUserControlInfoProvider.SetFormUserControlInfo(updateControl);
}// Prepares a where condition for loading form controls whose code name starts with 'NewControl'
string where = "UserControlCodeName LIKE N'NewControl%'";
// Loads the form controls into a strongly typed data set
InfoDataSet<FormUserControlInfo> formControls = FormUserControlInfoProvider.GetFormUserControls(where, null);
// Loops through the form controls
foreach (FormUserControlInfo modifyControl in formControls)
{
// Updates the properties of the form control
modifyControl.UserControlDisplayName = modifyControl.UserControlDisplayName.ToUpper();
// Saves the changes to the database
FormUserControlInfoProvider.SetFormUserControlInfo(modifyControl);
}// Gets the form control
FormUserControlInfo deleteControl = FormUserControlInfoProvider.GetFormUserControlInfo("NewControl");
// Deletes the form control
FormUserControlInfoProvider.DeleteFormUserControlInfo(deleteControl);