Possible enhancements

The Flag renderer example is deliberately kept simple. You could make various enhancements, for example:
  • Visibility
    If a node changes its visibility, the flag remains visible. This may seem to be what is wanted at first sight, because the flag is raised even if the node is not present. However, a dangling flag seems strange. Therefore, a better implementation is to listen to the IlvManager. property changes on its objects, and then set the visibility of the flag according to the visibility of the node.
  • Position
    You can position the flag somewhere other than the top-left corner. For example, you can set the flag location as an offset when you create it, and use another graphic property, FlagAnchor, to set the position of the corner of the node to which the flag is to be attached.
  • Several flags
    You can add several flags to the same node. Make sure that you control the layout of the flags so that they operate in a coherent way.