0

これがStyles.xamlのスタイルです。

<Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="BorderThickness" Value="0,1,0,1"/>
    <Setter Property="Margin" Value="-58,-15,-58,-15"/>
    <Setter Property="Padding" Value="58,0,58,0"/>
    <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
</Style>

ブラウザウィンドウのサイズに関係なく、また値を「表示」に設定しても、スクロールバーは表示されません。これを修正する方法について何か提案はありますか?

4

1 に答える 1

0

私はこれをいじっていて、LayoutRootグリッドとScrollViewerの順序を変更してみることにしましたが、これで修正されたようです。

私が変更され

<Grid x:Name="LayoutRoot" DataContext="{StaticResource ViewModel}">
<ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}">
...
</ScrollViewer>
</Grid>

これに:

<ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}">
<Grid x:Name="LayoutRoot" DataContext="{StaticResource ViewModel}">
...
</Grid>
</ScrollViewer>
于 2012-06-28T13:30:21.067 に答える