I've configured a button to appear on the layer context menu, so that it calls CopyUVRToStyle on the module, which it does successfully and examines ContextMenuDataContext without any issues.

However ... when it accesses the CanCopyUVRToStyle property, ContextMenuDataContext is always null.

The documentation suggests keeping an _enabled variable.
ProConcepts Framework · Esri/arcgis-pro-sdk Wiki · GitHub
Is there an event that fires somewhere (like OnContextMenu?) that the module can subscribe to and examine the ContextMenuDataContext and set the _enabled variable accordingly?
https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#delegate-commands