We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bind to SfRichTextboxAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

118548 Mar 18,2015 10:27 AM UTC Mar 26,2015 11:19 AM UTC WinRT 8
loading
Tags: SfRichTextBoxAdv (Universal)
Jen
Asked On March 18, 2015 10:27 AM UTC

Hi,

Would you have any sample on binding to SfRichTextboxAdv using MVVM? 

Kind Regards
Jennifer

Arumuga Perumal S [Syncfusion]
Replied On March 19, 2015 10:23 AM UTC

Hi Jeniffer,

Thank you for your interest in Syncfusion products.

We have prepared a sample to demonstrate binding SfRichTextBoxAdv content to RTF text using MVVM pattern. The ViewModel class contains RTFString property. Whenever this property gets modified explicitly, the RTF contents will be loaded into SfRichTextBoxAdv control. Also whenever SfRichTextBoxAdv content changed, corresponding RTF text will be updated to RTFString property. Please do find the sample from below link. Try running the sample and let us know if this helps you.

Sample link:
Sample.zip

Please let us know if you have any other questions.

Regards,
Arumuga Perumal S.


Arumuga Perumal S [Syncfusion]
Replied On March 19, 2015 11:05 AM UTC

Hi Jeniffer,

Kindly ignore our previous update.

We have prepared a sample to demonstrate binding SfRichTextBoxAdv content to RTF text using MVVM pattern. The ViewModel class contains RTFString property. Whenever this property gets modified explicitly, the RTF contents will be loaded into SfRichTextBoxAdv control. Also whenever SfRichTextBoxAdv content changed, corresponding RTF text will be updated to RTFString property. Please do find the sample from below link. Try running the sample and let us know if this helps you.

Sample link:
Sample.zip

If this is not your requirement, kindly share us the information describing your requirement so that we will provide you with better solution.

Please let us know if you have any other questions.

Regards,
Arumuga Perumal S.

Jen
Replied On March 20, 2015 09:02 AM UTC

Hi Arumuga,

Thank you for your response and sample.  Unfortunately, the solution doesn't build for me as missing reference for the Syncfusion 8.1 controls for Universal XAML.  There are only individual dlls in the installation folders.

Kind Regards
Jennifer

Arumuga Perumal S [Syncfusion]
Replied On March 20, 2015 09:22 AM UTC

Hi Jeniffer, 

Thank you for your update.

We have modified the sample as per your requirement. Please do the sample from below link.

Please let us know if you have any other questions.

Regards, 
Arumuga Perumal S.

Attachment: RTESample_d62b3446.zip

Jen
Replied On March 20, 2015 10:21 AM UTC

Hi Arumuga,

Thank you for your quick response again.  The sample is working now, just wondering in the SfRichTextBoxAdv control are there properties you can bind to the view model instead of setting it in the code behind because my project uses the caliburn mirco for the mvvm model?

Kind Regards
Jennifer

Arumuga Perumal S [Syncfusion]
Replied On March 23, 2015 01:02 PM UTC


Hi Jeniffer,

Thank you for your update.

We have prepared a sample as per your requirement by binding “Document” property of SfRichTextBoxAdv control to the view model.

The View model contains
1. Documents property (Dictionary<string, Stream>) to map document title with document stream.
2. DocumentTitle property (string) to denote the title of current document loaded in SfRichTextBoxAdv.
3. Document property (DocumentAdv) to denote the current document loaded in SfRichTextBoxAdv.

The View contains:
1. ListView whose ItemSource property is bind to Documents.KeyCollection property and SelectedValue property is bind to DocumentTitle property.
2. SfRichTextBoxAdv whose Document property is bind to Document property of ViewModel.


In the sample, whenever the selected value of list value changes, the current document stream will be updated to the dictionary collection and the selected document will be loaded to the SfRichTextBoxAdv control. Please do find the sample from below link.

Sample Link:
Sample.zip

If this is not your requirement, kindly share us the information regarding the properties you need to bind to the view model, so that we can provide you with better solution.

Please let us know if you have any other questions.

Regards,
Arumuga Perumal S.


Jen
Replied On March 26, 2015 11:05 AM UTC

Hi Arumuga,

Thanks for your reply and sample file which had answered my question.

Kind Regards
Jen






Arumuga Perumal S [Syncfusion]
Replied On March 26, 2015 11:19 AM UTC

Hi Jeniffer,

Thank you for your update.

Please let us know if you require any further assistance. We will be happy to assist you.

Regards,
Arumuga Perumal S.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;