It was working until ArcGIS Pro 2.7 SDK.
ArcGIS Pro SDK community sample Raster Colorizer doesn't work too.
It throws exception:
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source=mscorlib
StackTrace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.get_Item(Int32 index)
at Colorizer.BtnNewColor.<>c__DisplayClass0_0.<OnClick>b__0() in
\ArcGIS_SDK_Samples\arcgis-pro-sdk-community-samples-master\Raster\Colorizer\BtnNewColor.cs:line 54
at System.Threading.Tasks.Task.Execute()