Is it possible to create a UWP app that can view and edit docx documents?

Image_8466_1720846419258

Is it possible to create a UWP application that can view and edit docx documents?


Can syncfusion provide a control that allows users to view and edit docx applications? For example, we can use PDF Viewer to view and edit PDF documents. Is there a similar component for docx?


In addition, I need it to support dark mode


3 Replies

SN Sudharsan Narayanan Syncfusion Team July 15, 2024 01:43 PM UTC

Hi Shompinice,

We have checked the reported query from our end. In Syncfusion UWP, the SfRichTextEditor control will match your requirement to view and edit the Docx file. However, the dark theme will not be supported for this control. We have logged this as a feature request. Please check with the suggested control and let us know if you have any concerns.

Documentation:
Import and Export in UWP RichTextBox control | Syncfusion

Feedback Link: https://www.syncfusion.com/feedback/53322/support-for-dark-mode-in-the-wpf-sfrichtextboxadv

Regards,
Sudharsan



SH Shompinice replied to Sudharsan Narayanan July 15, 2024 02:07 PM UTC

Could you please provide an example that includes opening and displaying a docx document, modifying it and saving it as a docx document?



KG Kalaivannan Ganesan Syncfusion Team July 16, 2024 01:32 PM UTC

Shompinice, In the UWP SfRichTextBoxAdv control, you can open DOCX and other supported format documents at the UI level by using the shortcut Ctrl + O or in the code-behind using the built-in APIs.

Please use the below API link to know more about loading documents in the code behind with various parameters. Load(StorageFile storageFile)


To edit the opened document, you can use the shortcut keys as you would in MS Word, and you can use the built-in commands to perform these actions.

Please use the below link to know more about the available commands in the SfRichTextBoxAdv.
Commands in UWP RichTextBox (SfRichTextBoxAdv)


To save the document at the UI level, you can use the shortcut key Ctrl + S or the built-in APIs in the code-behind.

Please use the below API link to know more about loading documents in the code behind with various parameters.

Save(StorageFile storageFile)


We have created a sample application where you can load and save the document in the code-behind and use the built-in commands to perform basic editing operations such as applying bold, italic, and highlight color. Please use the application as a reference to apply commands based on your needs.


Attachment: SfRichTextBoxAdv_UWP_c874748d.zip

Loader.
Up arrow icon