Skip to main content
Home Forums Silverlight Design Designing with Silverlight UserControl ScrollViewer not visible
2 replies. Latest Post by K2P2 on November 6, 2009.
(0)
TerryL
Member
29 points
28 Posts
11-04-2009 5:08 PM |
Hi:
I have a UserControl that consumes an entire web page, but I can't get scroll bars to appear. They're just not there no matter how small the window or screen resolution. Does anyone know why? Here's the UserControl definition:
<UserControl x:Class="ABCWeb.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation" xmlns:dataControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="768" HorizontalAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" Loaded="UserControl_Loaded">
bryant
Star
9937 points
1,629 Posts
11-04-2009 6:00 PM |
Wrap your User Control in a ScrollViewer to get scrollbars.
K2P2
Participant
1028 points
337 Posts
11-06-2009 6:37 PM |
Like Bryant says if you want your complete control to be visible you need to put it in a scrollviewer.
It may be that your control's scrollviewer is not visible because it is too big for the scroll bars to be seen.
If you put your control in a scrollviewer then you may be able to scroll to see your controls scrollbars.
Then, if you want to drive your user's crazy put another "too large" control into your first control and another inside of that...