This example shows how to add components from code.
private void AddLogoAndCompanyName(StiForm form)
{
	var image = new StiImageElement()
	{
		Geometry = new Stimulsoft.Form.Properties.StiRectangleGeometry(0, 0, 200, 100),
		Image = System.IO.File.ReadAllBytes(@"Data\Logo.png")
	};

	var companyName = new StiLabelElement()
	{
		Geometry = new Stimulsoft.Form.Properties.StiRectangleGeometry(0, 20, 400, 70),
		};
	companyName.Text.Expression = "Company Name";
	companyName.Text.Font = new System.Drawing.Font("Arial", 22);
	companyName.Text.HorizontalAlignment = Stimulsoft.Form.StiHorizontalAlignment.Left;

	form.Pages[0].Elements.Add(image);
	form.Pages[0].Elements.Add(companyName);
}

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.