Silverlight 应用程序中不出现滚动条

发布于 2025-01-04 09:49:29 字数 1403 浏览 3 评论 0原文

我正在做一个 Silverlight 4 应用程序。

我有 mainpage.xaml,在其中我使用导航框架控件导航到子页面。 最小化页面时,不会出现滚动条。同样在最大化时,当内容超过高度时,垂直滚动条不会出现。我已经使用了scrollviewer,但没有任何反应

下面显示的是我的Mainpage.xaml 代码

<UserControl xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"  x:Class="Life_Centre_App.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"         
mc:Ignorable="d"
d:DesignHeight="1024" d:DesignWidth="768" xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" Opacity="1">

<Grid x:Name="LayoutRoot" Background="White" dx:ThemeManager.ApplyApplicationTheme="True">
       <ScrollViewer VerticalScrollBarVisibility="Auto" Height="Auto" Width="Auto" HorizontalScrollBarVisibility="Auto">
            <navigation:Frame x:Name="navframe_content"  Margin="0,159,0,0" />
            </ScrollViewer></Grid></UserControl>

这是解决这个问题的方法吗?

在这方面需要帮助!

I doing a Silverlight 4 App.

I have mainpage.xaml, inside it i use navigation frame control to navigate to child pages.
When minimizing the page, scrollbar does not appear. As well at maximized, when the content exceeds height .the vertical scrol bar does not appear. i have used scrollviewer,but nothing happens

Below shown is my Mainpage.xaml code

<UserControl xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"  x:Class="Life_Centre_App.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"         
mc:Ignorable="d"
d:DesignHeight="1024" d:DesignWidth="768" xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" Opacity="1">

<Grid x:Name="LayoutRoot" Background="White" dx:ThemeManager.ApplyApplicationTheme="True">
       <ScrollViewer VerticalScrollBarVisibility="Auto" Height="Auto" Width="Auto" HorizontalScrollBarVisibility="Auto">
            <navigation:Frame x:Name="navframe_content"  Margin="0,159,0,0" />
            </ScrollViewer></Grid></UserControl>

Is this the way to approach this?

Need help on this!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

缪败 2025-01-11 09:49:29

您应该将 ScrollViewerMaxWidthMaxHeight 属性设置为非自动值,即固定值。一旦导航框架控件的高度超过该高度,您将看到滚动条。

You should set MaxWidth and MaxHeight properties of ScrollViewer to a non-auto value i.e. a fixed value. Once your navigation frame control's height exceeds that height you will see scrollbar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文