I had a same problem and followed recommended answer by Longsam @HuyNA : I followed your comment for answer by Longsam. It works but it clears the document. My requirement is like chromeTabs. My richtextbox is inside the Tab and for each Tab It should be dock and undock from main window. SO contents must not be cleared.