How to use SelectionAdv.InsertPicture

The rich text box has a new selection.InsertPicture method which takes an object as an input parameter.  What data type is it expecting for this input parameter?  I have tried BitmapImage and StorageFile and a string URL but neither seems to do anything.
Is there a quick sample of how this method is supposed to be used?

1 Reply

AP Arumuga Perumal S Syncfusion Team September 18, 2017 11:43 AM UTC

Hi Andrew,

Thank you for contacting Syncfusion support.

SelectionAdv.InsertPicture(object) API of our SfRichTextBoxAdv control accepts picture provided as paramater of type Stream or byte[]. We will update these details in our online documentation.

Complete API documentation link:
https://help.syncfusion.com/cr/uwp/sfrichtextboxadv

InsertPicture documentation link:
https://help.syncfusion.com/cr/uwp/Syncfusion.UI.Xaml.RichTextBoxAdv.SelectionAdv.html#Syncfusion_UI_Xaml_RichTextBoxAdv_SelectionAdv_InsertPicture_System_Object_
You can also use InsertPictureCommand of our SfRichTextBoxAdv control that supports inserting pictures through command biding and code. We have prepared a sample application that demonstrates inserting picture using both SelectionAdv.InsertPicture API and InsertPictureCommand of our SfRichTextBoxAdv control.

Sample:
Sample.zip

Regards,
Arumuga Perumal S. 


Loader.
Up arrow icon