Ribbon for WinForms
BeginUpdate メソッド (RibbonGalleryItemCollection)

C1.Win.Ribbon.4.5.2 アセンブリ > C1.Win.Ribbon 名前空間 > RibbonGalleryItemCollection クラス : BeginUpdate メソッド
Maintains performance while items are being added or removed from the collection.
シンタックス
'宣言
 
Public Sub BeginUpdate() 
public void BeginUpdate()
解説

When adding a large number of items to the collection, you should use the BeginUpdate method to prevent the collection from updating its internal state each time an item is added to the list. Once you have completed the task of adding items to the list, call the RibbonItemCollectionBase.EndUpdate method to resume regular processing.

This way of adding items dramatically improves performance and is recommended when adding more than 10 or 20 items to the list.

使用例

The code belows populates a RibbonComboBox with items containing the names of all the fonts installed in the system.

You can run the sample as-is, then comment out the calls to BeginUpdate and EndUpdate to see the difference in performance.

参照

RibbonGalleryItemCollection クラス
RibbonGalleryItemCollection メンバ