Tuesday 15 June 2010

c# - How to set font in TextOut in AfterDraw event using MonoTouch and TeeChart -



c# - How to set font in TextOut in AfterDraw event using MonoTouch and TeeChart -

i trying add together custom text chart. have difficulties setting font in monotouch.

chartfont fontline1 = new chartfont(); fontline1.brush.color = style.colorstyle4; fontline1.drawingfont = style.valueitemtitle.toctfont(); g.textout(fontline1, currentx, currenty, annotationlabel);

style.colorstyle4 white (cgcolor); .toctfont conversion routing convert uifont ctfont.

however, text still little (size should 18) , font name not correct.

if don't set chartfont same result.

so, how set proper font writing text in afterdraw event?

you can modify or add together custom text (color,font,size) using onafterdraw event. code below shows how can it:

private void chart_afterdraw(object sender, steema.teechart.drawing.graphics3d g) { g.font.name = "arial"; g.font.color = uicolor.red.cgcolor; g.font.size = 18; g.textout(xpos, ypos, "label"); }

hoping help.

thanks in advance, regards.

c# ios teechart

No comments:

Post a Comment