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

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

Sets the state of a single SnapMode.

Syntax
public void SetSnapMode( 
   SnapMode snapMode,
   bool isSet
)
Public Sub SetSnapMode( _
   ByVal snapMode As SnapMode, _
   ByVal isSet As Boolean _
) 

Parameters

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

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LayerSnapModes Class
LayerSnapModes Members