uitableview - Windows Phone 7 中的 TableView

标签 uitableview windows-phone-7 scroll tableview

Windows Phone 7 有没有像 iPhone 的 UITableView 那样的东西?

[基本上,我正在移植一个 iOS 应用程序,其中表格 View 工作得非常好。]

最佳答案

您可以使用以下 XAML 代码创建类似于表 View 的内容。

              <ListBox >

                <ListBoxItem>
                    <StackPanel Orientation="Horizontal"   >
                        <Border BorderThickness="3" BorderBrush="#A5FFFFFF" Width="80" Margin="0,20,0,20" Height="60">
                            <Image Source="{Binding ImageUrl, Mode=OneWay}"  VerticalAlignment="Stretch" Margin="0,0,0,0" Width="80" Height="60" Stretch="Fill" />
                        </Border>
                        <TextBlock TextWrapping="Wrap" Text="Foobar" FontSize="40" FontWeight="Normal" VerticalAlignment="Center" Margin="30,0,0,0" />
                    </StackPanel>
                </ListBoxItem>
                <ListBoxItem>
                    <StackPanel Orientation="Horizontal"   >
                        <Border BorderThickness="3" BorderBrush="#A5FFFFFF" Width="80" Margin="0,20,0,20" Height="60">
                            <Image Source="{Binding ImageUrl, Mode=OneWay}"  VerticalAlignment="Stretch" Margin="0,0,0,0" Width="80" Height="60" Stretch="Fill" />
                        </Border>
                        <TextBlock TextWrapping="Wrap" Text="Foobar" FontSize="40" FontWeight="Normal" VerticalAlignment="Center" Margin="30,0,0,0" />
                    </StackPanel>
                </ListBoxItem>
            </ListBox>

上面的例子将创建一个包含两个元素的表格 View 。如果你愿意,你可以添加 Border每张 table 之间分开。

希望能帮助到你。

关于uitableview - Windows Phone 7 中的 TableView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5061782/

相关文章:

javascript - 有没有 jQuery scrollTop 的替代品?

jquery - 水平图像滚动的跨浏览器问题

ios - 在 iPhone 上的一个 UIWebView 中显示多个 PPT

windows-phone-7 - 当屏幕键盘处于事件状态时,为什么我不能一直滚动到底部

visual-studio-2010 - 如何在 Visual Studio 2010 中为 Windows Phone 添加 Phonegap 插件

silverlight - 如何将 BitmapImage/WriteableBitmap 保存为 png 格式(Silverlight/windows 手机)?

HTML/CSS - 没有明显原因的页面滚动 (y)

ios - 如何通过 prepareForSegue : an object

ios - Swift:如果 Segue 不显示披露指示器

ios - func tableView(_ tableView : UITableView, canEditRowAt indexPath: IndexPath) 几乎符合可选要求