单击按钮时,我有一个按钮。我动态创建按钮并添加按钮以包裹面板并在窗口中显示它但是如果按钮超出宽度。如果我在滚动查看器中使用滚动面板时单击按钮包装面板不显示,我想滚动。
答案 0 :(得分:2)
基于此解决方案:
<ScrollViewer VerticalScrollBarVisibility="Hidden" Width ="100" HorizontalScrollBarVisibility="Auto" Margin="76,0,113,213">
<WrapPanel>
<Button Content="Press" />
<Button Content="Press" />
<Button Content="Press" />
<Button Content="Press" />
<Button Content="Press" />
<Button Content="Press" />
</WrapPanel>
</ScrollViewer>