Page 1 of 1

Sticky Note CreatedBy- CreatedDate Display

Posted: Thu Sep 27, 2018 4:00 pm
by nickstarlight
I have looked through the Sticky Note Annotations, and see the CreatedBy and Created Date properties.

I have been attempting to display those properties preferably above, or even below the note itself.

Is there currently a way of accomplishing this, and how?

Re: Sticky Note CreatedBy- CreatedDate Display

Posted: Thu Sep 27, 2018 5:40 pm
by Yuri
Hi,

Set the text of StickyNote when you create it:

Code: Select all

 StickyNoteAnnotationData stickyNote = new StickyNoteAnnotationData();
 stickyNote.FillBrush = new AnnotationSolidBrush(Color.Yellow);
 stickyNote.CreatedBy = Environment.UserName;
 stickyNote.CollapsedTextData.Text = string.Format("CreatedBy '{0}', {1}", stickyNote.CreatedBy, stickyNote.CreationTime);
then add it into the image annotation collection or begin to build it.

Regards,
Yuri

Re: Sticky Note CreatedBy- CreatedDate Display

Posted: Thu Sep 27, 2018 5:53 pm
by nickstarlight
Thank you, Yuri. Though my concern with setting the CollapsedTextData.Text with the created by and time information would be that the user would be able to edit that information.

Logically in the code, when enter the ExpandedTextData from the StickyNote it allows you to edit the text from the CollapsedTextData.

Re: Sticky Note CreatedBy- CreatedDate Display

Posted: Fri Sep 28, 2018 10:33 am
by Yuri
Hi again,


Please describe in precise details the behavior and logic you want to get from StickyNoteAnnotation. And so we will be able to provide you a quick solution.


Regards,
Yuri