(As it is too simple) there is no sample how to use
public string RotationExpression {get; set;}.
Somehow, I did not know how excatly one should initialize this property, I was thinking about much more complicated approaches.
API says:
//
// Summary:
// Gets/sets the expression describing how a Graphic's attributes are translated
// into a rotation to be applied to the Graphic.
Example usage is:
var renderer = new UniqueValueRenderer()
{
RotationType = SymbolRotationType.Geographic,
RotationExpression = "[Direction]",
//Direction is an attribute added to a graphic object, like:
// graphic.Attributes.Add("Direction", <double>);
Field = "MyLayer",
Infos = {
new UniqueValueInfo()
{
Value = 0,
Symbol = new SimpleMarkerSymbol() { Color = red,Style=SimpleMarkerSymbol.SimpleMarkerStyle.Cross, Size=20, }
},
};