We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Optimizing render speed when applying style changes to elements

Thread ID:





24255 Jan 31,2005 03:05 PM UTC Feb 4,2005 04:50 PM UTC WinForms 2
Tags: HTMLUIControl
Adam Flynn
Asked On January 31, 2005 03:05 PM UTC

When changing the class of an element in order to change its css display style, what is the best way to ensure good performance. Example 1: htmlUiControl.SuspendLayout(); element.Attributes["class"].Value = cssClassName; htmluiControlMain.PerformLayout(); Example 2: htmlUiControl.BeginUpdate(); element.Attributes["class"].Value = cssClassName; htmluiControlMain.EndUpdate(); If neither of these sequences are correct, do you recommend another method?

Davis Jebaraj [Syncfusion]
Replied On February 1, 2005 01:02 PM UTC

Hi, If you are making multiple attribute changes, you can call the BeginUpdate / EndUpdate methods. The HTMLUIControl will not update its interface till the EndUpdate method is called. Regards, Davis

Davis Jebaraj [Syncfusion]
Replied On February 4, 2005 04:50 PM UTC

Hi Adam, I just realized that you can optimize the style changes by setting the htmluiControl1.Document.BeginUpdate(); and htmluiControl1.Document.EndUpdate(); We can change the behavior so that the BeginUpdate and EndUpdate methods of the HTMLUIControl also have the same effect. Thanks, Davis


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon