我有以下列表框控件放置在網格內,但列表框不正確水平滾動。如果您將滾動條拖過來,它可以正常工作,但如果您單擊箭頭,則只能滾動一半。我該如何解決這個問題?C#Windows RT列表框水平滾動問題
<Page
x:Class="App5.MainPage"
IsTabStop="false"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App5"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<ListBox Height="400" Width="200"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollMode="Auto">
<ListBoxItem Content="This is my horizontal test # 1" />
<ListBoxItem Content="This is my second horizontal test which spams across" />
</ListBox>
</Grid>
</Page>
感謝
你的ListBox上有任何項目嗎? – 2012-08-04 12:35:41
是的,我以編程方式將項目添加到列表框。如果我拖動滾動條,滾動工作正常。 – 2012-08-04 14:04:43