Silverlight 应用程序中不出现滚动条
我正在做一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将
ScrollViewer
的MaxWidth
和MaxHeight
属性设置为非自动值,即固定值。一旦导航框架控件的高度超过该高度,您将看到滚动条。You should set
MaxWidth
andMaxHeight
properties ofScrollViewer
to a non-auto value i.e. a fixed value. Once your navigation frame control's height exceeds that height you will see scrollbar.