Skip to main content

UnitConverter.PixelsToTwips(Int32) Method

Converts a value from pixels to twips.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v23.2.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static int PixelsToTwips(
    int value
)

Parameters

Name Type Description
value Int32

The value in pixels.

Returns

Type Description
Int32

The value in twips.

Remarks

<DxRichEdit @ref="@richEdit" />

@code {
    DxRichEdit richEdit { get; set; }
    @* ... *@
    /* Surround the code that contains an asynchronous operation with a try-catch block to handle
    the OperationCanceledException. This exception is thrown when an asynchronous operation is canceled. */
        try {
        @* ... *@
            int value4 = UnitConverter.PixelsToTwips(500);
            @* ... *@
        }
        catch (OperationCanceledException e) {
            Console.WriteLine($"{nameof(OperationCanceledException)} thrown with message: {e.Message}");
        }
}
See Also