WPF Frame

Frame 显示滚动条

<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
    <ScrollViewer.Content>
        <Frame Content="{Binding Source}" NavigationUIVisibility="Hidden" ScrollViewer.CanContentScroll="False" Padding="5" Background="White" VerticalAlignment="Stretch" VerticalContentAlignment="Top"/>
    </ScrollViewer.Content>
</ScrollViewer>

 C# 加载页面

Loaded += (s, e) =>
{
    frame.Source = new Uri("Page3.xaml", UriKind.Relative);
};

 

posted @ 2024-06-01 22:27  microsoft-zhcn  阅读(13)  评论(0编辑  收藏  举报