Click here to Skip to main content
15,924,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Basically I want multiple WPF apps to have a common textbox to which users can edit text into in real time and it will be reflected in all the textboxes simultaneously. I am just looking for some ideas as to what can be done or any other projects that implement something similar.

What I have tried:

Haven't tried much but what I think is that there would be a server which has an instance and receives messages from all the textboxes to what is being edited. This way I can also send messages from the server regarding the position of the cursors in the other applications and even inject text if required and resolve any conflicts.
Posted
Updated 7-Jan-20 22:55pm

Not an answer... but I think it would be a real pain in the butt to have someone typing within the same document that I am simultaneously...

Perhaps you would be better off with a "collaboration" screen where a user has their version of the document to edit and have other displays to see a real-time version of what the collaborator(s) have done.

One way to do this would be to have the individual text-boxes tied into a DB, and update the DB field on something akin to an 'onchange' event
 
Share this answer
 
You have already answered your question in your own words:
Quote:
there would be a server which has an instance and receives messages from all the textboxes to what is being edited. This way I can also send messages from the server regarding the position of the cursors in the other applications and even inject text if required and resolve any conflicts.
You need to code this out. WPF provides the Keyboard control at only one cursor, so you would need to abstract the direct control of the keyboard and mouse events too. See this thread for more on this, Collaborative WPF Application - Multiple Keyboards and Mice - Stack Overflow[^], but it is not impossible. Just a lot hard and tough to do that.

If I had to do this, I would start with a single user editing the document and a central server handling the edit-events and performing those actions on a central document. Then, from there, increase the user count one by one up to 5-10. A normal document editor provides support for a limited number of users because you need to lock the document or provide concurrent access. As already mentioned in Solution 1, this would require a complete article/project to explain how it would work in WPF, a QA is not a fit for this. Try searching for an article in the top-right corner.

Check this too, Collaborative editing - Wikipedia[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900