To achieve dynamic entity rotation with a dictionary renderer in the ArcGIS Maps SDK, you can use a dictionary override to set the rotation of the symbol based on the heading from the data. For a general discussion on working with overrides in dictionary styles, please refer to the Dictionary Renderer Toolkit documentation.
We created a sample app for the DevSummit that uses a DictionaryRenderer with dynamic rotation, which might help. The app demonstrates how to set up the dictionary style and apply the rotation based on a bearing attribute in the data. Here's the custom style used in the sample. The data source for this app was a custom DynamicEntityDataSource, but you should be able to use heading data from an ArcGISStreamService as well.
Here, the symbol has an interior train symbol that doesn't rotate, and an exterior arrow that rotates with the bearing attribute of the entity. The script for the dictionary style returns the Rotation override based on the `bearing` attribute of the entity:
return "TrainArrow" + ";po:colored_fill|Color|" + color + ";po:direction_arrow|Rotation|" + $feature.bearing
This ensures the symbol is colored and rotated according to entity data. When a DictionaryRenderer created with this dictionary style is used as the renderer of a DynamciEntityLayer (DynamciEntityLayer.Renderer), each entity will rotate according to the bearing angle of its latest observation. The rotation will also be updated automatically as the entity receives new observations from the data source.
In your case, you should be able to do something similar. In your custom dictionary style, use the rotation property for the symbol, and set it based on the heading attribute of your entity.