How to add the Attachment Image Silverlight control
Please follow these steps:
- Upload the xap as a web-resource
- Create a text-field that is not searchable to store the annotationid (guid)
- Add the Web-Resource to the form
- Check the checkbox to pass the id and type, etc.
- In the parameters add the fields and their values seperated by a pipe |
- Example: field=new_imageattachmentid|subject='Contact''s Image'|prefix='img-'
- Available fields are:
- field - The name of the field you are using to store the annotationid of the attachment. It is required, and the field
MUST BE ON THE FORM (it does not need to be visible).
- subject - The subject for attachments - the following substitutions are available
- %s - The name of the file
- prefix - The prefix for all attachment images (this is used to filter the results, etc)
- hidebuttons - Used to hide the buttons that are in the silverlight control so that you can use the ribbon to control the application
- webcam - Set to true if you want to enable the webcam it is not currently tide to hidebuttons
- savefirst - Used to set the message that is displayed on a form that is in Create Mode
- max-width- maximum width for all images
- max-height - maximum height for all images
- max-webcam-width - maximum webcam image width, overrides max-width for web-cam images
- max-webcam-height - maximum webcam image height, overrides max-height for web-cam images
Currently there is not an example of the ribbon integration - once created & tested it will be included.
The delete button does not delete the image from the attachments it only unlinks it, clearing the ID. If you want it to delte the note, that could be done with a little bit more code in the Delete method.