Skip to main content

Microsoft Silverlight

Answered Question UserControl ScrollViewer not visibleRSS Feed

(0)

TerryL
TerryL

Member

Member

29 points

29 Posts

UserControl ScrollViewer not visible

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
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP
Answered Question

Re: UserControl ScrollViewer not visible

Wrap your User Control in a ScrollViewer to get scrollbars.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

K2P2
K2P2

Participant

Participant

1028 points

337 Posts

Re: UserControl ScrollViewer not visible

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...

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities