Select to view content in your preferred language

Listen for GraphicsLayer.Count() change

682
2
08-24-2011 05:04 AM
deleted-user-ATjHIWsdQYmT
Deactivated User
Is there an event handler that can be added which will listen for a specific GraphicsLayer Count to change?
0 Kudos
2 Replies
LanceCrumbliss
Frequent Contributor
Is there an event handler that can be added which will listen for a specific GraphicsLayer Count to change?


Since the graphics property of a graphics layer is an observablecollection, add a handler to the observablecollection's changed event for that graphics layer.

AddHandler MyGraphicsLayer.Graphics.CollectionChanged, AddressOf MyGraphicsLayer_GraphicsCollectionChanged


lance
0 Kudos
deleted-user-ATjHIWsdQYmT
Deactivated User
Awesome.  That did it.  Thanks Lance!
0 Kudos