如何在Xamarin中的内容视图中设置背景图像

Jol*_*lly 5 xaml xamarin.forms

我有一个ContentView,我需要在其中设置背景图像.有ContentPage的"BackgroundImage"属性,在ContentView中可以做什么?在Xamarin中可以在ContentView中设置背景图像吗?

Jol*_*lly 7

在ContentView中使用AbsoluteLayout并将Image放在AbsoluteLayout中与其他控件.它的工作原理!

 <ContentView.Content>
    <AbsoluteLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
        <Image Source="abc.png" AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All" Aspect="AspectFill"/>
        <ScrollView AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All">
            <Grid>
                ......
                ......
            </Grid>
        </ScrollView>
    </AbsoluteLayout>
</ContentView.Content>
Run Code Online (Sandbox Code Playgroud)