Share via


RichEditTextDocument.SetMath(String) Method

Definition

Sets the RichEditBox content to the specified MathML.

Important

Windows 11, version 23H2 and earlier: the math mode APIs are part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, please use the LAF Access Token Request Form.

public:
 virtual void SetMath(Platform::String ^ value) = SetMath;
void SetMath(winrt::hstring const& value);
public void SetMath(string value);
function setMath(value)
Public Sub SetMath (value As String)

Parameters

value
String

Platform::String

winrt::hstring

The MathML content for the RichEditBox.

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v10.0)

Remarks

This method fails if current math mode of the RichEditBox is set to NoMath.

Math mode enables users to have input automatically recognized and converted to MathML while being received. For example, "4^2" is converted to "42", and "1/2" is converted to "½".

Math mode might change formatting (fonts), context menus, and other aspects of the input.

Applies to

See also