StackPanel增加滚动条
StackPanel本身是没有滚动条的但是外边包裹ScrollViewer就能滚动了,示例如下
<ScrollViewer Grid.Row="1" Margin="10" Background="{DynamicResource SecundaryBackgroundColor}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
<ScrollViewer.Content>
<StackPanel Margin="0">
<ContentControl prism:RegionManager.RegionName="AppSetting" />
<ContentControl prism:RegionManager.RegionName="AppSerilogSetting" />
<ContentControl prism:RegionManager.RegionName="AppJwtSetting" />
<ContentControl prism:RegionManager.RegionName="AppCacheSwitchSetting" />
<ContentControl prism:RegionManager.RegionName="AppCtApiSetting" />
<ContentControl prism:RegionManager.RegionName="AppCtApiChartSetSetting" />
<ContentControl prism:RegionManager.RegionName="AppTimerSetting" />
<ContentControl prism:RegionManager.RegionName="AppQuerySettingSetting" />
<ContentControl prism:RegionManager.RegionName="AppThreadSettingSetting" />
</StackPanel>
</ScrollViewer.Content>
</ScrollViewer>
本文摘自 :https://www.cnblogs.com/