【发布时间】:2022-02-07 16:22:45
【问题描述】:
我正在使用 Xamarin.Forms 开发适用于 Android 的应用程序。 我正在使用 Xamarin。 我想将背景显示为瓷砖。 我准备了一个 100x100 像素的图像。 \Android\MyApp\MyApp.Android\Resources\drawable\background.jpg
<?xml version="1.0" encoding="utf-8" ? >
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodels="clr-namespace:MyApp.ViewModels"
x:DataType="viewmodels:LoginViewModel"
mc:Ignorable="d"
x:Class="MyApp.Views.LoginPage"
Shell.NavBarIsVisible="False"
BackgroundImage="background.jpg"
>
这样,background.jpg 会被放大显示。 我想在图块中重复显示它。
【问题讨论】:
标签: xamarin.forms background-image