c# - Defer form updates -
Is there a way to postpone a form by updating / restoring while manipulating controls?
I am using
It depends on the control; Look for BeginUpdate
/ EndUpdate
or BeginEdit
/ EndEdit
, etc. (and try them try
/ ultimately
blocks). Note, however, there are only these methods in some controls, and they are not bound to an easy interface, so this is a little manual. For example:
listView.BegginUpdate (); Try {{int i = 0; i & lt; 100; i ++} {listView.Items.Add ("item" + i); }} Finally {listView.EndUpdate (); }
Note that data-bound controls may have other mechanisms to disable data-related changes; For example, the binding list
RaiseListChangedEvents
, which lets you turn off notifications when you edit the data, you can see things like "virtual mode."
Comments
Post a Comment