【问题标题】:Scroll bar does not appear in Silverlight AppSilverlight 应用程序中不出现滚动条
【发布时间】:2012-02-09 04:48:48
【问题描述】:

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

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

下面显示的是我的 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>

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

在这方面需要帮助!

【问题讨论】:

    标签: silverlight xaml silverlight-4.0


    【解决方案1】:

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

    【讨论】:

    • 这很好。但是当我最小化时我没有滚动条..我试过 puttin minheight n minwidth 值..anyidea?
    • 最小化什么,浏览器窗口?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-02
    • 1970-01-01
    • 1970-01-01
    • 2011-05-18
    • 1970-01-01
    • 2012-07-29
    相关资源
    最近更新 更多