ArcGIS Pro 2.7 API Reference Guide
SetSnapMode Method (Snapping)
Example 

ArcGIS.Desktop.Mapping Namespace > Snapping Class : SetSnapMode Method

Sets the state of a single SnapMode.

Syntax
public static void SetSnapMode( 
   SnapMode mode,
   bool value
)
Public Shared Sub SetSnapMode( _
   ByVal mode As SnapMode, _
   ByVal value As Boolean _
) 

Parameters

mode
value
Example
//ensure Midpoint snapping is switched on
Snapping.SetSnapMode(SnapMode.Midpoint, true);
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Snapping Class
Snapping Members