Thanks for the input. The property UpdatingControl never changes.
I've been poking further and found that the
self.layerticklist1.Content
is a System.Windows.Controls.ListBox. I found that it has an object "System.Windows.Controls.ItemContainerGenerator" which provides an event "StatusChanged".
Waiting for it and checking its status I can now set the checkboxes once the itemlist is repopulated.
self.layerticklist1.Content.ItemContainerGenerator.StatusChanged += self.layer1populated
def layer1populated(self, sender, e):
# generator status - 0-not started; 1-generating; 2-generated/done; 3-error
if int(sender.Status) == 2:
self.layerticklist1.SelectedSerialsX = selectedserials
------------------------------
Ronny Schneider
------------------------------
Original Message:
Sent: 11-22-2024 16:23
From: Bryce Haire
Subject: is there a specific event that signals if the content of Trimble.Vce.UI.Controls.Wpf.CheckedListBoxEntityPicker is fully updated - how to wait for it
Hi Ronny,
We tried taking a look and not sure totally sure of what is happening on what you are seeing. The thought was `SetExcludedEntities` is run on the main UI thread, and the method would have returned when the UI is set/processed. Based on your description, that may not be the case in your situation it appears.
One potential solution is looking at the property UpdatingControl on the CheckedListBoxEntityPickerController and seeing if it goes from false -> true -> false.
Unfortunately, there is no event emitted, so you would probably need to setup a poller between the SetExcludedEntities and the reset of that value to false. Maybe the first step is logging the value of this and seeing if it changes during your testing and/or if it is the trigger for what you need.
Hope this helps some.
------------------------------
Bryce Haire
------------------------------