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/