9:30, just wrote to 1, 2. It's time to go home and finish writing tomorrow.
We still need what operation, message said, no I continue to add tomorrow.
Long time no play devexpress, today downloaded a play, found unexpectedly updated to 14.2.5. I'll go.
Topics in this chapter:
- Create Project, form build
- Add a toolbar to Richeditcontrol
- To create a custom toolbar button item
- Image parsing operations
- Correcting document fonts
- Content search function
- Import Export function (text/html/word)
- Official related API
Don't say much nonsense, get to the point.
I. Create project, form build
1. Create a new c#.net WinForms application and remove the default form:
2. Right-click Project-"ADD DevExpress Item"-"New Item ...":
3. Open the New DevExpress Entry window, select "Form", create a new DevExpress form item, name the form, here I set "Frmmain":
4. Expand Toolbox-"Rich Text editor", Find Richeditcontrol and drag and drop to form:
5. Set Richeditcontrol related properties:
> renamed Richeditcontrol, Name property changed to: "Richeditmain"
> Set the dock to fill the entire form with fill.
> Change the default text and modify the text value to "Welcome to the lone Shadow blog!" ”
> Remove the default ruler, set the Activeviewtype property to "simple", the control is more compact, the default is "printlayout" Printing format:
Second, add a toolbar to Richeditcontrol
Since it is a rich text editor, there are a few toolbar options like the blog Park Editor:
How do we set it up? Do you have to write one by one? Of course not.
DevExpress's Richeditcontrol provides us with very, very rich tool options, which are available in two ways.
The first is the form of the Ribbon menu:
The other is an option group in the form of a toolbar:
Personal feeling is still very good, according to the project needs to choose the specific type of. Here's how to add these two separately:
The first is the first option group in the Ribbon Stretch menu form:
With the Richeditcontrol control selected, the Black Triangle menu item appears in the upper-right corner, and a two-level menu option pops up when clicked:
We'll start by clicking on "Create Ribbon", creating a Ribbon menu, and then clicking the upper-right corner of the triangle again, and there are a lot of new options:
At a glance, the first "create all Tabs" must be for us to create all the menu options, and each of the following, such as "File Tabs", is the options related to the operation of the files, this according to the needs of everyone to add, I for the demonstration, add all:
Then, let's look at the option group in the form of a toolbar:
Then the rest of the Add option, and the above is the same, click on the small triangle again, select "Create ...." Tabs "can:
This is the Add tool option, isn't it very simple and powerful? Oh.
However, personal advice, do not want to appear so strong and all the same to add, otherwise it seems very messy.
Moreover, these options are already default with the event processing, basically do not need us to write other code, so, the use of what options to add, do not have to delete it.
Iii. Creating custom Toolbar Options
What about the funeral? Continue tomorrow ...
9:30, just wrote to 1, 2. It's time to go home and finish writing tomorrow.
We still need what operation, message said, no I continue to add tomorrow.
"This article from The lone Shadow ' Blog:http://www.cnblogs.com/lonelyshadow, the code word is not easy, reproduced please indicate the source." 】
Graphic devexpress Richeditcontrol Use of rich Text, with source code and official API