Loop through controls in a diagram

Hi,
I tried to loop on all controls (RoundRect) in a diagram, but it seems the controls are in a 'Protected view', my code is as follows, any suggestion? Thank you in advance - Nicolas

For Each rect As RoundRect In Diagram1.Model.Children.Members

rect.LineStyle.LineColor = OC_BorderColor.SelectedColor

Next


2 Replies

NI Nicolas October 2, 2016 09:13 PM UTC

ok got it resolved! - Nicolas

For i = 0 To Diagram1.LayoutManager.Nodes.Members.Count

If Diagram1.LayoutManager.Nodes.Members(i).GetType Is GetType(RoundRect) Then

'do something here

end if

Next



NG Naganathan Ganesh Babu Syncfusion Team October 3, 2016 06:01 AM UTC

Hi Nicolas, 
 
Thanks for letting us know that issue got resolved. Please reach us if you need any further assistance. 
 
Regards, 
 
Naganathan K G 


Loader.
Up arrow icon