Silverlight : Rectangle / Annotation tool edit

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Priya Hatipkar
Newbie
Newbie
Posts: 46
Joined: Wed Jan 28, 2009 12:00 am

Silverlight : Rectangle / Annotation tool edit

Post by Priya Hatipkar » Fri Jul 24, 2009 10:00 am

hi

I am trying to make a simple feature where a user can add a rectangle tool to the chart , edit the text , later delete the annotation/rectangle tool

so i will have methods like addAnnotation , removAannotation and am planning to add editing using the AllowEdit = true and using Keydown event as follows
(below "annotation" can be rectangletool or annotation)
void annotation_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
currentAnnotationTool.EndEdit();
if(e.Key == Key.F2)
currentAnnotationTool.StartEdit();
}

is the below logic correct?
------------------------------
Have a flag to set which tool is selected - defalt = false
Add a annotation and set the flag to false
On click of the annotation , set the flag to true and set the currentannotation = selectedannotation
on keydown startedit on enter and endedit on F2(key can be any key)
in deleteAnnotation , remove the annotation from the chart tool collection

I am not able to hit the keydown event , I am able to hit the click event . do we have a sample to show how to use rectangletool for editing .

Also I saw that the rectangle shape "roundrectangle" is available , but the Shape property for rectangletool is readonly , so how can i have a round rectangle on my chart .
What is the use of EditorKey() eventhandler .

thanks,
Aniket

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Silverlight : Rectangle / Annotation tool edit

Post by Narcís » Fri Jul 24, 2009 1:33 pm

Hi Aniket,
is the below logic correct?
Yes, it seems fine to me.
I am not able to hit the keydown event , I am able to hit the click event . do we have a sample to show how to use rectangletool for editing .
I've checked that KeyDown event and RectangleTool editing doesn't work in TeeChart.Silverligh.dll. I've added these to the wish-list to be enchanced for future releases. In such circumstances, the only solution I can think of for editing a RectangleTool is using a textbox and assigning the text to the tool.
Also I saw that the rectangle shape "roundrectangle" is available , but the Shape property for rectangletool is readonly , so how can i have a round rectangle on my chart .
Code below works fine for me here.

Code: Select all

			rectangle1.Shape.ShapeStyle = Steema.TeeChart.Silverlight.Drawing.TextShapeStyle.RoundRectangle;
What is the use of EditorKey() eventhandler.
It's is for checking which key has been pressed in an editor.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Priya Hatipkar
Newbie
Newbie
Posts: 46
Joined: Wed Jan 28, 2009 12:00 am

Re: Silverlight : Rectangle / Annotation tool edit

Post by Priya Hatipkar » Mon Jul 27, 2009 6:38 am

Hi Narcis,

Thanks for the roundrect comment , it does work , I must have set someting else :).

On the annotation/rect editing .....
" I've checked that KeyDown event and RectangleTool editing doesn't work in TeeChart.Silverligh.dll. I've added these to the wish-list to be enchanced for future releases. In such circumstances, the only solution I can think of for editing a RectangleTool is using a textbox and assigning the text to the tool "

I checked in windows samples for the annotation/rect editing it works (canedit), shouldnt it be a bug for silverlight implementation ? I mean the logic i am trying to implement is because "CanEdit" is not working , even the Keydown event works in windows samples , so request teechart to take it as a bug . Am sure people will want to add and edit annotations/text set for thier charts , specially financial charts , in place editing should work the same way as in wondows samples .

which release will this fix/feature be a part of ? this is part of my (must have)requirements so need it quickly mate .

Thanks for the textbox suggestion , I did try the same , it works but , it doesnt provide the same utility/effect as the "in place" editing of recttool/annotation , which we have in windows .

thanks,
Aniket

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Silverlight : Rectangle / Annotation tool edit

Post by Narcís » Mon Jul 27, 2009 8:49 am

Hi Aniket,
I checked in windows samples for the annotation/rect editing it works (canedit), shouldnt it be a bug for silverlight implementation ? I mean the logic i am trying to implement is because "CanEdit" is not working , even the Keydown event works in windows samples , so request teechart to take it as a bug . Am sure people will want to add and edit annotations/text set for thier charts , specially financial charts , in place editing should work the same way as in wondows samples .
Yes, we know that works with Windows Forms applications. However Silverlight is almost and independent framework so, even though TeeChart.Silverlight.dll reuses TeeChart.dll code, I'm not sure if this should be considered a bug or just needs to be reworked to be supported in TeeChart.Silverlight.dll.
which release will this fix/feature be a part of ? this is part of my (must have)requirements so need it quickly mate .
I understand your position but I'm not able to provide an estimate date for now. I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's fixed and included on them.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply