The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
DJDavis Jebaraj Syncfusion Team 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
DJDavis Jebaraj Syncfusion Team 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