I have done a lot of Winform sharing software and have some experience and accumulation in interface design. I am going to open a series of articles on "WinForm interface development, this section describes the Winform interface design and the use of related controls to promote mutual communication for better development and understanding.
In many Winform programs, we may need WYSIWYG editing controls for HTML content, such as FreeTextBox in Asp.net.
After searching, I found that there were very few controls in this area. I found one, which seemed to be charged, and I felt like I skipped it and looked for it again. Then I found that there was a good thing on the CodeProject, click here to modify it and use it as a control. The effect is good. I used it in the email sending system of the QQ number collector, as shown in
Controls Support basic HTML editing operations, such as text, images, arrangement (left alignment, right alignment, center, etc.), project symbols, indentation adjustment, and other operations, as shown in
In addition, the control supports Right-click menu operations, common editing functions, and searching, modifying HTML, viewing content, and inserting HTML elements.
The content search interface is as follows:
Modify the HTML form as follows. You can add the content in the modification. After confirmation, the control content will change again.
The insert image dialog box prompts you to enter relevant information.
We generally use two properties for the control, as shown in the following code:
String bodyHtml = this.txt Content. BodyHtml;
String bodyText = this.txt Content. BodyText;
Finally, present the control file that everyone cares most about. You can use it as usual (the control is not encrypted. You need to modify the source code and decompile it ):
Click to download the source code of this example.