gpt4 book ai didi

c# - 在哪里放置 xamarin 表单应用程序的图像

转载 作者:太空狗 更新时间:2023-10-30 01:01:42 24 4
gpt4 key购买 nike

我正在使用 Xamarin 为 Android、iOS 和 Visual Studio 开发应用程序

我在 xaml 中添加了以下行以使用图像:

<Image Source="header.png" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" />
<Button x:Name="Object_Detection" Image="header.png" />

第一个用于在标题中显示图像,第二个用于显示按钮图标。他们链接相同的图像“header.png”

我把图片放在:- Mobile.Droid\Resources\drawable- Mobile.iOS\资源-Mobile.Windows\Assets

但该图像在 Windows 8.1 应用程序中根本不显示。图片大小为690*79。

如何解决问题?

最佳答案

您必须将图像放在 Windows Phone 8、Windows Phone 8.1 和 UWP 应用程序的项目根目录中。

本指南将为您提供帮助 http://developer.xamarin.com/guides/xamarin-forms/working-with/images

关于c# - 在哪里放置 xamarin 表单应用程序的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37378449/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com