Changing Properties from Code
Our sample projects and report templates can help you learn the basics of working with our products.This example is outdated, you can check out the many other new examples in this category.This example shows how to change properties from code.
private StiForm ChangeFormProperties(StiForm form)
{
var labelCompanyName = form.GetElementByName("CompanyName") as StiLabelElement;
labelCompanyName.Text.Expression = "My Company";
labelCompanyName.Text.Font = new System.Drawing.Font("Arial", 20);
//Save-load form just for sample
var savedForm = form.SaveToString();
var loadedForm = new StiForm();
loadedForm.LoadFromString(savedForm);
return loadedForm;
}