需要设置默认资产或图像文件夹
need to set default assets or images folder
是否有任何解决方案可以为 windows phone 设置图像源的默认路径?一些明显的变化?
我想写 <Image Source="img1.png" />
而不是 <Image Source="Assets/Images/img1.png" />
实际上,此功能对 xamarin 开发人员非常有用。现在我需要在 xamarin studio 中创建这么大的一段代码:
<Image>
<Image.Source>
<OnPlatform x:TypeArguments="ImageSource">
<OnPlatform.iOS>
<FileImageSource File="img1.png"/>
</OnPlatform.iOS>
<OnPlatform.Android>
<FileImageSource File="img1.png"/>
</OnPlatform.Android>
<OnPlatform.WinPhone>
<FileImageSource File="Assets/Images/img1.png"/>
</OnPlatform.WinPhone>
</OnPlatform>
</Image.Source>
</Image>
而我的目标是将这段代码变成 <Image Source="img1.png"/>
WindowsPhone不可能。如果你想使用
<Image Source="img1.png"/>
图像必须位于项目的根目录中。
是否有任何解决方案可以为 windows phone 设置图像源的默认路径?一些明显的变化?
我想写 <Image Source="img1.png" />
而不是 <Image Source="Assets/Images/img1.png" />
实际上,此功能对 xamarin 开发人员非常有用。现在我需要在 xamarin studio 中创建这么大的一段代码:
<Image>
<Image.Source>
<OnPlatform x:TypeArguments="ImageSource">
<OnPlatform.iOS>
<FileImageSource File="img1.png"/>
</OnPlatform.iOS>
<OnPlatform.Android>
<FileImageSource File="img1.png"/>
</OnPlatform.Android>
<OnPlatform.WinPhone>
<FileImageSource File="Assets/Images/img1.png"/>
</OnPlatform.WinPhone>
</OnPlatform>
</Image.Source>
</Image>
而我的目标是将这段代码变成 <Image Source="img1.png"/>
WindowsPhone不可能。如果你想使用
<Image Source="img1.png"/>
图像必须位于项目的根目录中。