I've been told that I can use the control's BeginInit() to add the items and not render them. How do I use this if the control has already been initialized and is displayed?
SuspendLayout to Form and Control
In WPF I have a task that executes a function that loads about 150 titles into a DevExpress NavBar control and a ComboBox. The function takes a long time to finish and it seems that it is because the NavNar control takes a long time to render all the items on the screen. I need a way to do SuspendLayout to the Form and the Control. For the Form I use:
// SuspendLayout.
System.Windows.Threading.Dispatcher MyDispatcher = System.Windows.Threading.Dispatcher.CurrentDispatcher;
System.IDisposable MyThread_IDisposable = MyDispatcher.DisableProcessing();
// ResumeLayout.
MyThread_IDisposable.Dispose();
But it doesn't seem to do anything because the control is rendering the items on the screen. It's because the screen form is not locked. But I don't actually want to lock the form, just the control. I don't know of a way to do SuspendLayout to the control.