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: docs/guides/graphics-and-animation/how-to-use-icons.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ In Avalonia, using icons in your user interface can help to improve the look of
10
10
11
11
12
12
## Using Icons in Avalonia
13
-
Icons can be added to your Avalonia application in various ways. This guide will cover two common methods: using image files and using icon fonts.
13
+
Icons can be added to your Avalonia application in various ways. This guide will cover three common methods: using image files, using icon fonts, and using path icons.
14
14
15
15
### Using Image Files
16
16
One way to use icons in Avalonia is by using image files. You can use various formats like PNG, JPG, or BMP. Here's an example of how to use an image file as an icon:
@@ -31,6 +31,10 @@ Another way to use icons in Avalonia is by using icon fonts. Icon fonts allow yo
31
31
32
32
In this example, a `TextBlock` control is used to display an icon from the `FontAwesome` icon font. The `FontFamily` property of the `TextBlock` control is set to a resource URI that points to the font file, and the Text property is set to the Unicode value of the desired icon.
33
33
34
+
### Using Path Icons
35
+
36
+
Path icons can draw icons from `Geometry` which includes using paths from the scalable vector graphics (SVG) format that can be customized with size and color. See the [reference](/docs/reference/controls/path-icon) for how to use this control.
37
+
34
38
## Best Practices
35
39
36
40
While using icons can enhance the usability of your application, it is important to use them wisely. Keep the following tips in mind when using icons:
0 commit comments