I am looking for the following events: LayoutAdded, ElementsAdded, and ElementsRemoved events. Are these going to be in future releases of the Pro SDK?
Thank you,
Tony
These events will be added for 2.3: ElementAdded, ElementRemoved, LayoutAdded.
Thank you for bringing these events to our attention.\
Jeff
Thank you Uma! I will add this and test it out. I appreciate the advice!
Hi Tony
As a workaround you can determine when a new layout has been added by using the ProjectItemsChangedEvent like this:
ProjectItemsChangedEvent<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Subscribe</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>args<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>args<SPAN class="punctuation token">.</SPAN>ProjectItem <SPAN class="keyword token">is</SPAN> LayoutProjectItem <SPAN class="operator token">&&</SPAN> args<SPAN class="punctuation token">.</SPAN>Action <SPAN class="operator token">==</SPAN> System<SPAN class="punctuation token">.</SPAN>Collections<SPAN class="punctuation token">.</SPAN>Specialized<SPAN class="punctuation token">.</SPAN>NotifyCollectionChangedAction<SPAN class="punctuation token">.</SPAN>Add<SPAN class="punctuation token">)</SPAN> System<SPAN class="punctuation token">.</SPAN>Diagnostics<SPAN class="punctuation token">.</SPAN>Debug<SPAN class="punctuation token">.</SPAN><SPAN class="token function">WriteLine</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Layout has been added"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Thank you for your feedback Tony! We did add a couple of new events for Pro 2.2: LayoutRemoving and Layout PausedDrawingChanged but we will strongly consider the 3 events you request for a near term release.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.