Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 显示相互重叠的绑定图像_Wpf_Windows Phone 8_Windows Phone 8.1 - Fatal编程技术网

Wpf 显示相互重叠的绑定图像

Wpf 显示相互重叠的绑定图像,wpf,windows-phone-8,windows-phone-8.1,Wpf,Windows Phone 8,Windows Phone 8.1,我想展示一些图片作为我的应用程序的背景。它们的不透明度正在动态变化。我很想使用绑定,但我似乎找不到一种方法来显示itemssource中的项目,而不是在列表框或全景图中。我的“图像”是一个非常简单的类背景的对象,它们只包含一个图像的url和不透明性,我在后面的代码中更改了这些内容。每个图像都应该占据所有屏幕空间 <SomeContainer ItemsSource ="{Binding backgrounds}"> <Image Stretch="Uni

我想展示一些图片作为我的应用程序的背景。它们的不透明度正在动态变化。我很想使用绑定,但我似乎找不到一种方法来显示itemssource中的项目,而不是在列表框或全景图中。我的“图像”是一个非常简单的类背景的对象,它们只包含一个图像的url和不透明性,我在后面的代码中更改了这些内容。每个图像都应该占据所有屏幕空间

<SomeContainer ItemsSource ="{Binding backgrounds}">
            <Image Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="{Binding Opacity}" Source="{Binding url, Converter={StaticResource imageCacheConverter}}"/>
</SomeContainer>


你知道我应该用哪个容器吗?你有别的办法吗?谢谢。

使用
ItemsControl
并指定允许项目重叠的
ItemsPanelTemplate
,例如
Canvas
Grid
,据我所知,
Grid
ItemsPanelTemplate
就是你想要的。谢谢,你是最好的!工作起来很有魅力。