The inheritance tree of the inline object is as follows:
Object -- dispatcherobject -- dependencyobject -- contentelement -- frameworkcontentelement -- textelement -- inline -- run span --- italic. Bold... hyperlink. Underline
Contentelement must be presented using the uielement element. Example: TXB (textblock object). inlines. Add (New linebreak ());
The inheritance tree of the button is contentcontrol --- buttonbase -- button. It inherits the clickmode attribute from the buttonbase class to control the time when a click event is generated. One of the three values is recommended. Release hover (click event generated above) Press. Padding and margin control the padding and padding respectively.
The command attribute can be set to applicationcommands, componentcommands, mediacommands, and navigatecommands.
, The static attribute of editingcommands. You can use commandbindings. Add (New commandbinding (applicationcommands. paste, pasteonexecute, pastecanexecute ));
Void pasteonexecute (Object sender, executedroutedeventargs e ){}
Void pastecanexecute (Object sender, canexecutedroutedeventargs e ){}
Buttonbase --- button, gridviewcolumnheader, repeatebutton, togglebutton --- checkbox, radiobutton
You can bind the attributes of the dependent object with the ischecked attribute of togglebutton. For example, BTN (togglebutton). setbinding (togglebutton. ischeckedproperty, someproperty (example; topmost) or bindind object). datacontext determines the object to which someproperty belongs.
Control -- textbase --- Textbox, RichTextBox
You can use the following method to load files in special formats for RichTextBox objects:
Flowdocument flow = RichTextBox. Document;
Textrange range = new textrange (flow. contentstart, flow. contentend );
Range. Load (static attributes of filestream and dataformats );
Range. Save (static attributes of filestream and dataformats );