This question is different from this question - How to calculate the size of a piece of text in Win2D - because that method has the result attached to the draw event of a Win2D CanvasControl. Specifically, it requires the DrawingSession of the arguments.
I want to know if it is possible to know the size of the text without having the draw function called. This is desired because I need the various CanvasControls I am using widths or heights to be able to be set by the size of the text.
Create an instance of the CanvasTextLayout class with the text and format and get the DrawBounds property of it.