-
-
Notifications
You must be signed in to change notification settings - Fork 338
Xaml Tips and Tricks
Brent Seger edited this page Apr 7, 2020
·
4 revisions
Useful hints when using Eto's Xaml (.xeto) for defining your UI
When you want to use images in your xaml (.xeto) or other embedded resources, you can use the ResourceExtension markup extension like so:
- Add your image(s) to the project
- Set them as embedded resource
- In the .xeto file, use the
{Resource ...}
markup extension:
<ImageView Image="{Resource MyAssembly.Path.To.Image.png, MyAssembly}" />
The resource file path should be provided in the same format returned by Assembly.GetManifestResourceNames()
.
Note: You can omit the assembly at the end if your code behind class is in the same assembly.