【发布时间】:2014-12-10 02:29:15
【问题描述】:
<StackPanel Name="CurrentInvoice" Margin="118,165,119,58" Opacity="100" Background="White">
<TextBlock Name="Status" FontSize="16" Foreground="GreenYellow"/>
<ListView Name="Invoices" Width="1000" HorizontalAlignment="Left" VerticalAlignment="Top" SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="35" HorizontalAlignment="Center" VerticalAlignment="Center" Width="1000">
<Border Background="#FF91C919" Width="102">
<TextBlock Text="{Binding TransactionHeaderId}" Margin="21,0,0,0" Foreground="White" FontSize="30" Width="81" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Segoe UI" Height="35"></TextBlock>
</Border>
<Border Background="#FFF99B9B" Width="102">
<Button Foreground="White" Height="20" Width="55" Content="{Binding TransactionHeaderId}" Command="{Binding TestCommand}" Click="InvoiceOpen_Click" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="16,0,10,7" BorderBrush="{x:Null}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Image Source="Assets/moreIcon.png"/>
</ControlTemplate>
</Button.Template>
</Button>
</Border>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
以上代码用于在堆栈面板中显示项目,但我无法添加滚动条。我也使用了 Scrollviewer。没有效果。所有溢出都被隐藏了。请帮我找到一种添加滚动条的方法。(垂直/水平)
【问题讨论】:
标签: c# .net windows-store-apps windows-store