EDIT: lol - well, after just finishing writing this reply it struck me that maybe it is _not_ the "show selection graphic behavior" that you are after! Somewhat presumptive on my part, apologies - that said, just in case, and/or if someone else _is_ (who reads this post) I will leave my reply...and we will still add this to the SelectionEnvironment at 3.4.
it looks like this was never exposed in the selection environment public api - https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14140.html
What you are looking for is the equivalent to the "Display the interactive selection graphic" checkbox on the Application selection settings UI.
I will pass this on to the dev team for 3.4.
In the meanwhile, this will work (but requires use of an internal namespace) - maybe do this in the tool activate and set it back to the previous setting when your tool is deactivated - your call.
//fyi
using ArcGIS.Desktop.Internal.Mapping;
...
internal class MySelectionTool : .... {
...
public void SetShowInteractiveSelectionGraphic(bool showGraphic) {
var map_module_internal =
FrameworkApplication.FindModule("esri_mapping") as
IInternalMappingModule;
//Must be called on the QueuedTask! or will throw
//CalledOnWrongThreadException
map_module_internal.SelectionSettings.
SetShowInteractiveSelectionGraphic(showGraphic);
}
public bool GetShowInteractiveSelectionGraphic()
{
var map_module_internal =
FrameworkApplication.FindModule("esri_mapping") as
IInternalMappingModule;
//should be fine being called from the UI thread
return map_module_internal.SelectionSettings.
ShowInteractiveSelectionGraphic;
}
...
//usage
internal bool _keepShowSelectionGraphicSetting = false;
//somewhere - perhaps tool activation
QueuedTask.Run(() => {
_keepShowSelectionGraphicSetting =
this.GetShowInteractiveSelectionGraphic();
if (!_keepShowSelectionGraphicSetting)
this.SetShowInteractiveSelectionGraphic(true);
...
});
//somewhere - perhaps tool deactivation
QueuedTask.Run(() => {
if (_keepShowSelectionGraphicSetting !=
this.GetShowInteractiveSelectionGraphic())
this.SetShowInteractiveSelectionGraphic(
_keepShowSelectionGraphicSetting);
...
});