Class Utils
Utils contains static method to perform utility functions
Inheritance
System.Object
Utils
Namespace: Syncfusion.Windows.Edit
Assembly: Syncfusion.Edit.Wpf.dll
Syntax
public static class Utils : Object
Remarks
The Util class used to bound the objects and also it has format methods like GetWidth, GetFormattedText.
Methods
GetFormattedText(String, FontFamily, Double, Brush, Double)
Declaration
public static FormattedText GetFormattedText(string text, FontFamily fontFamily, double fontSize, Brush foreground, double pixelperDip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Windows.Media.FontFamily | fontFamily | |
System.Double | fontSize | |
System.Windows.Media.Brush | foreground | |
System.Double | pixelperDip |
Returns
Type | Description |
---|---|
System.Windows.Media.FormattedText | Returns the formatted text. |
GetFormattedTextDecoration(String, FontFamily, Double, Brush, ISnippetFormat, Double)
Declaration
public static FormattedText GetFormattedTextDecoration(string text, FontFamily fontFamily, double fontSize, Brush foreground, ISnippetFormat format, double pixelperDip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Windows.Media.FontFamily | fontFamily | |
System.Double | fontSize | |
System.Windows.Media.Brush | foreground | |
ISnippetFormat | format | |
System.Double | pixelperDip |
Returns
Type | Description |
---|---|
System.Windows.Media.FormattedText | Returns the formatted and decorated text |
GetHeight(String, FontFamily, Double, Brush, Double)
Declaration
public static double GetHeight(string text, FontFamily fontFamily, double fontSize, Brush foreground, double pixelperDip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Windows.Media.FontFamily | fontFamily | |
System.Double | fontSize | |
System.Windows.Media.Brush | foreground | |
System.Double | pixelperDip |
Returns
Type | Description |
---|---|
System.Double | Returns the formatted text width. |
GetWidth(String, FontFamily, Double, Brush, Double)
Declaration
public static double GetWidth(string text, FontFamily fontFamily, double fontSize, Brush foreground, double pixelperDip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | |
System.Windows.Media.FontFamily | fontFamily | |
System.Double | fontSize | |
System.Windows.Media.Brush | foreground | |
System.Double | pixelperDip |
Returns
Type | Description |
---|---|
System.Double | Returns the formatted text width. |