I'm looking for a good BalloonCallout example / tutorial / sample. edit: Using C# with ArcEngine 10 edit #2:
What are the main steps when building a balloon callout using ArcObjects in arcengine 10?
Here's what I've tried so far:
This happens in a dynamic data layer
DynamicGlyphFactory dynamicGlyphFactory = (DynamicGlyphFactory)dynamicDisplay;
IDynamicSymbolProperties2 dynamicSymbolProps = dynamicDisplay as IDynamicSymbolProperties2;
IFillSymbol fillSymbol = new SimpleFillSymbolClass();
TextSymbolClass textSymbol = new TextSymbolClass();
IBalloonCallout balloonCallout = new BalloonCalloutClass();
simpleFillSymbol.Color = rgbColor;
dynamicSymbolProps.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolFill, fillSymbol as IDynamicGlyph);
dynamicSymbolProps.SetColor(esriDynamicSymbolType.esriDSymbolFill, 20f, 20f, 20f, 255);
IDynamicGlyph fillGlyph = dynamicGlyphFactory.CreateDynamicGlyph((ISymbol)fillSymbol);
balloonCallout.AnchorPoint = anchorPoint;
balloonCallout.Style = esriBalloonCalloutStyle.esriBCSOval;
balloonCallout.Symbol = fillSymbol;
balloonCallout.LeaderTolerance = 10;
textSymbol.Background = (ITextBackground)balloonCallout;
dynamicSymbolProps.TextBoxUseDynamicFillSymbol = true;
IDynamicGlyph glyph = dynamicGlyphFactory.CreateDynamicGlyph((ISymbol)textSymbol);
dynamicSymbolProps.set_DynamicGlyph(esriDynamicSymbolType.esriDSymbolText, glyph);
iDynamicDisplay.DrawText(point, someString);