Edit

Share via


AspectRatio.ConvertToAspectRatio(String) Method

Definition

Converter to take a string aspect ration like "16:9" and convert it to an AspectRatio struct. Used automatically by XAML.

public static Microsoft.Toolkit.Uwp.UI.Controls.AspectRatio ConvertToAspectRatio (string rawString);
static member ConvertToAspectRatio : string -> Microsoft.Toolkit.Uwp.UI.Controls.AspectRatio
Public Shared Function ConvertToAspectRatio (rawString As String) As AspectRatio

Parameters

rawString
String

The string to be converted in format "Width:Height" or a decimal value.

Returns

The AspectRatio struct representing that ratio.

Applies to