You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: wpf/Image-Editor/Text.md
+51-23Lines changed: 51 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -18,10 +18,13 @@ You can annotate an image by adding the desired text to it. This can be done in
18
18
19
19
To add text, click the Text icon (T) in the toolbar. Now, the text will be added at the center of the image along with the selection handle, which helps in resizing. By default, the added text will be in pan mode, so you can position the text anywhere by dragging it. By clicking the text, it will change into typing mode, and you can edit the text directly. Click outside to exit from typing mode.
Using the following properties in TextSettings, text can be customized.
76
92
93
+
*[`Background`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.ImageEditor.TextSettings.html#Syncfusion_UI_Xaml_ImageEditor_TextSettings_Background) - Specifies the background color of the text annotation. The default value is `Brush.Transparent.`
77
94
*[`FontFamily`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.ImageEditor.TextSettings.html#Syncfusion_UI_Xaml_ImageEditor_TextSettings_FontFamily) - Changes the font family of the text.
78
95
*[`FontSize`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.ImageEditor.TextSettings.html#Syncfusion_UI_Xaml_ImageEditor_TextSettings_FontSize) - Changes the font size of the text.
79
96
*[`Color`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.ImageEditor.TextSettings.html#Syncfusion_UI_Xaml_ImageEditor_TextSettings_Color) - Modifies the font color of the text.
@@ -86,29 +103,40 @@ Using the following properties in TextSettings, text can be customized.
86
103
>N Values of bounds will be in percentage. For example (25, 25, 25, 25) will take the position of 25 percent from the left and top.
87
104
88
105
{% tabs %}
106
+
{% highlight XAML %}
89
107
90
-
{% highlight C# %}
91
-
92
-
TextSettings textSettings = new TextSettings();
93
-
textSettings.FontFamily = new FontFamily("Century Schoolbook");
94
-
textSettings.FontSize = 30;
95
-
textSettings.Color = new SolidColorBrush(Colors.Red);
0 commit comments