RichEditTextDocument.SetMathMode(RichEditMathMode) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures a RichEditBox to interpret input based on the specified math mode.
public:
virtual void SetMathMode(RichEditMathMode mode) = SetMathMode;
void SetMathMode(RichEditMathMode const& mode);
public void SetMathMode(RichEditMathMode mode);
function setMathMode(mode)
Public Sub SetMathMode (mode As RichEditMathMode)
Parameters
- mode
- RichEditMathMode
Specifies whether a RichEditBox interprets input as Mathematical Markup Language (MathML) or text.
Remarks
By default, the RichEditBox control does not interpret input as math. Setting mode to MathOnly
enables UnicodeMath input to be automatically recognized and converted to MathML in real time. For example, entering 4^2
converts to 4²
, and 1/2
converts to ½
. See the WinUI 3 Gallery app for more examples.
Changing the math mode of the RichEditBox clears both the current content and the Undo stack.
In MathOnly
mode, the RichEditBox uses the Cambria Math font family.
In MathOnly
mode, the various GetText and SetText methods can still be used (with limited options).