English 中文(简体)
带有项目的列表框Template wp7
原标题:listbox with itemTemplate wp7

如何在图像面前展示这些物品?

我希望图像/ bl_ cell. png 与列表项目重复... 此代码重复照片与项目, 但是它没有显示在图像前的项目, 任何人都可以帮助这样做吗?

<Grid x:Name="ContentPanel" Margin="0,128,0,0" HorizontalAlignment="Right" Width="480">
    <TextBlock x:Name="TextBlock3" Margin="233,440,7,83" TextWrapping="Wrap" Text="" Visibility="Collapsed"/>
    <ScrollViewer Margin="-7,0,0,0" x:Name="ss">
        <Grid Height="933" Width="487">
            <ListBox Margin="8,0,0,0" Name="listb" SelectionChanged="listb_SelectionChanged" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Background="{Binding Source=images/bl_cell.png}">
                            <StackPanel>
                                <Image Height="45" Source="images/bl_cell.png" Stretch="Fill" Width="479"  />
                            </StackPanel>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </ScrollViewer>
</Grid>
问题回答

不要把它们放在堆积板中, 把它们都放在同一条网格行和列中。 当它们造出来时, 它们会从头到尾, 背到头, 所以类似的东西会在图像上显示文字 :

<Grid>
   <Image Source="..." />
   <TextBox Text="This is caption text on the bottom."  VerticalAlignment="Bottom" />
</Grid>




相关问题
System.Json namespace missing from Windows Phone 7

During a Mix10 presentation, the presenter (Charlie Kindel) said that when writing Silverlight based apps for WP7 you get all of Silverlight 3.0 with some of Silverlight 4.0 mixed in. Why then is ...

Will Windows Phone 7 Support Multitasking third party apps

Obviously it s early days, I do not know whether this is information that is in the public domain or not yet, but... I have trawled through some of this site - http://www.windowsphone7series.com/ but ...

Windows Series Phone 7 "Cloud"

I have been reading up on "Cloud computing" on here and still not getting it. Basically I want to develop for the WP7 http://msdn.microsoft.com/en-us/library/ff402531%28v=VS.92%29.aspx#...

Windows Phone 7 Tab Pages (page cycle)

I know.. I know, it s only a few hours old. But how the hell do you get the little page tabbing/cycle (forgot what the official name is) on the top of the page under the app title. MIX Keynotes made ...

Recording audio from the microphone in Windows Phone 7 Series

I m wondering if anyone has any code samples or links to documentation that demonstrate how to capture audio from the device s microphone on the new Windows Phone Series 7. I ve recently downloaded ...

Resources for Windows Phone 7 development [closed]

Windows Phone 7 has been unveiled and MS have announced all details of the development chain at the Mix10 conference. So this could be a good starting point/collection of online resources as they ...

热门标签