Windows Phone 7 – 如何在LongListSelector中包含ItemsPanel?
| 
                         我正在使用listbox和wrappanel来显示数据. 例如: <ListBox ItemTemplate="{StaticResource ItemTemplateListBoxAnimation}">
        <ListBox.ItemsPanel>
            <ItemsPanelTemplate>
                <toolkit:WrapPanel ItemHeight="150" ItemWidth="150">
                </toolkit:WrapPanel>
            </ItemsPanelTemplate>
        </ListBox.ItemsPanel>
    </ListBox>
    <DataTemplate x:Key="ItemTemplateListBoxAnimation">
        <Grid Width="130" Height="130">
            <Image Source="{Binding Image}"/>
        </Grid>
    </DataTemplate> 
 看起来像: 现在我需要使用LongListSelector和分组结果: <toolkit:LongListSelector ItemTemplate="{StaticResource ItemTemplateListBoxAnimation}">
        <toolkit:LongListSelector.GroupItemsPanel>
            <ItemsPanelTemplate>
                <toolkit:WrapPanel/>
            </ItemsPanelTemplate>
        </toolkit:LongListSelector.GroupItemsPanel>
    </toolkit:LongListSelector> 
 但它看起来像: 我需要得到: 你的假设? 不幸的是,WP工具包似乎没有暴露出你想要的ItemsPanel,所以你必须修改工具包的源代码才能获得所需的行为. >从这里获取来源:https://phone.codeplex.com/SourceControl/changeset/view/80797 <primitives:TemplatedListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <controls:WrapPanel/>
                    </ItemsPanelTemplate>
                </primitives:TemplatedListBox.ItemsPanel> 
 >重建和引用新的dll,您的项目应适当包装! (编辑:52站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!  | 
                  

