Show / Hide Table of Contents

Method SyncSourceSettings

SyncSourceSettings()

Synchronizes the SourceSettings collection based on ISnapSource objects in the currently connected Map.

Declaration
public void SyncSourceSettings()
Remarks

Call this method to populate SourceSettings with a SnapSourceSettings for each valid ISnapSource present in the MapView currently connected to this SnapSettings via SnapSettings, and GeometryEditor. If there is no connected MapView, or the map view and the associated map contains no ISnapSource objects valid for snapping, then the collection will be empty after this method returns.

The order of SnapSourceSettings objects will match the order that the associated ISnapSource objects appear in the OperationalLayers and GraphicsOverlays collections, with objects from OperationalLayers appearing first, followed by GraphicsOverlays objects, in order. The collection will not contain a SnapSourceSettings for any loadable ISnapSource which is not yet Loaded when SyncSourceSettings() is called.

Subsequent calls will update the existing collection, accounting for ISnapSource objects that have been added, removed, or moved since the last call to the same connected map. Any changes made to existing SnapSourceSettings objects, for example setting IsEnabled, will be preserved.

See Also
SourceSettings

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.4 - 200.8
.NET200.4 - 200.8
.NET Windows200.4 - 200.8
.NET Android200.4 - 200.8
.NET iOS200.4 - 200.8
.NET Framework200.4 - 200.8
UWP200.4 - 200.8

SyncSourceSettings(SnapRules, SnapSourceEnablingBehavior)

Synchronizes the SourceSettings collection based on ISnapSource objects in the currently connected Map and the SnapRules affecting them.

Declaration
public void SyncSourceSettings(SnapRules rules, SnapSourceEnablingBehavior snapSourceEnablingBehavior)
Parameters
Type Name Description
SnapRules rules

The rules to apply to the ISnapSource objects.

SnapSourceEnablingBehavior snapSourceEnablingBehavior

snapSourceEnablingBehavior

Remarks

Call this method to populate SourceSettings with a SnapSourceSettings for each valid ISnapSource present in the map view currently connected to this SnapSettings via SnapSettings, and GeometryEditor. If there is no connected map view, or the map view and the associated map contains no ISnapSource objects valid for snapping, then the collection will be empty after this method returns.

The order of SnapSourceSettings objects will match the order that the associated ISnapSource objects appear in the OperationalLayers and map view's GraphicsOverlay collections, with objects from OperationalLayers appearing first, followed by GraphicsOverlay objects, in order. The collection will not contain a SnapSourceSettings for any loadable ISnapSource which is not yet Loaded when SyncSourceSettings() is called.

For each ISnapSource which is described in the SnapRules:

  • RuleBehavior becomes RulesPreventSnapping or RulesLimitSnapping
  • IsEnabled is set to true if snapSourceEnablingBehavior = SetFromRules.

See Also
SourceSettings

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.7 - 200.8
.NET200.7 - 200.8
.NET Windows200.7 - 200.8
.NET Android200.7 - 200.8
.NET iOS200.7 - 200.8
.NET Framework200.7 - 200.8
UWP200.7 - 200.8
In This Article
Back to top Copyright © 2022 Esri.