单击按钮时,我有一个按钮 . 我动态创建按钮并添加按钮以包裹面板并在窗口中显示它但是如果按钮超出宽度 . 如果我在单击按钮包装面板时未显示滚动查看器内的滚动面板,我想滚动 .
基于此解决方案:
<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>
1 回答
基于此解决方案: