English 中文(简体)
如何在窗户电话中展示很长的数据清单?
原标题:how to display a long list of data in windows phone?

需要某种控制,以便通过大量数据进行滚动。 这基本上是一个帮助页,因此,必须显示许多文字和图像。

我尝试使用清单箱,但并未提供预期的排出物。 我试图将案文锁放到每个清单中,但为了重新编排到全文上来,需要设置的路障。 最后,铁丝网是从屏幕区域外出的!

浏览器允许我只增加一个文本框。

谁能告诉我如何去做? 是否正确? 或者是否有任何其他控制使我能够这样做? 一位长者做了些什么?

Alfah

最佳回答

不需要<代码>LongListSelector,在这种情况下,这将是超高技能的。 您应坚持<代码>ListBox的管制,因为它提供自动Virtualization

略微,为<代码>ListBoxItems铺设了ListBoxItem(或可在名录BoxItem风格上做)的边,并将风格应用于<代码>TextBlock。

“enterography

    <ListBox Grid.Row="1">
        <ListBoxItem Margin="{StaticResource PhoneMargin}">
            <TextBlock TextWrapping="Wrap" Text="Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc" Style="{StaticResource PhoneTextNormalStyle}"/>
        </ListBoxItem>
        <ListBoxItem Margin="{StaticResource PhoneMargin}">
            <TextBlock TextWrapping="Wrap" Text="Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum." Style="{StaticResource PhoneTextNormalStyle}"/>
        </ListBoxItem>
        <ListBoxItem Margin="{StaticResource PhoneMargin}">
            <TextBlock TextWrapping="Wrap" Text="Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum." Style="{StaticResource PhoneTextNormalStyle}"/>
        </ListBoxItem>
        <ListBoxItem Margin="{StaticResource PhoneMargin}">
            <TextBlock TextWrapping="Wrap" Text="Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc" Style="{StaticResource PhoneTextNormalStyle}"/>
        </ListBoxItem>
    </ListBox>
问题回答

摘述 我不能说,如果你能够用标准控制来确定你的要求,因为你现在就需要把你放在你身上。

关于LongListSelector,关于WindowsPhoneGeek.com的这种控制有两部分内容:

第1部分:

第二部分:

如果这种控制符合你的要求,第一个员额应给你一个很好的概览。 请注意,关于密码的 ,该版本将一些问题与长名单的甄选者联系起来。

您可以使用全球资源信息数据库提供的滚动浏览器,并可以补充你们希望举出的众多案文:

<Grid Name="ansGrid" Background="Transparent" Grid.Row="3" ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="261"/>
                    <ColumnDefinition Width="195*" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="Race Category" FontSize="24" Grid.Row="0" Grid.Column="0" FontWeight="SemiBold"></TextBlock>
                <TextBlock Text="Start Time" FontSize="24" Grid.Row="0" Grid.Column="1" FontWeight="SemiBold"></TextBlock>
                <TextBlock Text="any" FontSize="22" Grid.Row="1" Grid.Column="0"></TextBlock>
                <TextBlock Text="thing" FontSize="22" Grid.Row="1" Grid.Column="1"></TextBlock>
                <TextBlock Text="etc" FontSize="22" Grid.Row="2" Grid.Column="0" TextWrapping="Wrap"></TextBlock>
                <TextBlock Text="etc" FontSize="22" Grid.Row="2" Grid.Column="1"></TextBlock>
            </Grid>

在帮助页上,我多次发现,在你的项目中仅仅插入一个超文本页面,并利用网上浏览器控制显示。 例如,见本条:

如果你想要避免超文本,你也可以尝试新的(尽管文件记录仍然很差) RichTextBox:

http://www.windowsphonegeek.com/articles/Windows-Phone-7-Mango-First-look-at-RichTextBox-control http://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox%28v=VS.95%29.aspx





相关问题
WPF: How to limit number of rows shown by ListBox?

Is it possible to limit the number of rows a listbox show? Eg. let´s say I have a ItemSource with 100 items, but I only want my listbox to be 10 items high.

ListBox Value containing links

hi I am currently working on improving the SEO on a website containing dropdown list menu. currently when you select options and then submit a javascript is redirecting you to the next page I heard ...

asp.net listbox double click event + event handler

I am trying to add a double-click event in a listbox. But I am getting the following error. the aspx file <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ListBox__Test.aspx.cs" ...

How to insert ComboBox item into ListBox? [winforms]

The question is very simple, How to insert ComboBox selected item into ListBox using c#? I have tried with this: listbox.Items.Add(combobox.SelectedItem); and some other permutations but it always ...

listbox itemtemplate for selected item

I am using Listbox with ItemTemplate, and when I select an item from the list, it shows blue background How can I style the selected item, to be similar to non-selected one?

WPF Data Binding Error in ListBox

I have a ListBox: <ListBox x:Name="HistogramListBox" Grid.Column="1" Margin="8,2,8,0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Template="{StaticResource ...

How do I anchor an expander to right side of a ListBox?

The XAML code below works fine except I want the expander button to be between the listbox and the grid. If I set the ExpandDirection="Left" the button is between the listbox and the grid but the ...

Adding Items to ListBox, RadioList, Combobox using reflection

I m trying to add items to a listbox,combobox, radiolist using reflection. The code I have at the moment is as follows: public static Control ConfigureControl(Control control, ControlConfig ctrlconf)...

热门标签