Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6241085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:41:36+00:00 2026-05-24T11:41:36+00:00

I have a problem with scrolling using mouse wheel in a scroll viewer. It

  • 0

I have a problem with scrolling using mouse wheel in a scroll viewer.
It seems that if the mouse cursor is over an area of the scrollbar that doesn’t contain any ui element, scrolling doesn’t work.

In the attached example I fill the scroll viewer with rectangle that have large margins. When the mouse cursor is over a rectangle scrolling works, but when it’s over the margin, no scrolling occurs.

Any idea how to fix this?

XAML:

<UserControl x:Class="SilverlightApplication229.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"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">

        <ScrollViewer VerticalScrollBarVisibility="Auto">
            <StackPanel x:Name="MyPanel" />
        </ScrollViewer>

    </Grid>
</UserControl>

Code:

public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();

        for (int i = 0; i < 100; i++)
        {
            Rectangle rect = new Rectangle { Width = 100, Height = 100, Fill = new SolidColorBrush(Colors.Red), Margin = new Thickness(50) };
            MyPanel.Children.Add(rect);
        }
    }
}

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T11:41:36+00:00Added an answer on May 24, 2026 at 11:41 am

    Going off of an error I recently had, the solution may be to add a background to the scrollviewer. With a transparent background Silverlight might think that the mouse is on the background and not the scrollviewer. I am not certain of this answer but it would be fast and easy to test.

    The reason this is probably the case is (I think) because the container pretty much has to be square. So if you have two things overlapping eachother where the containers overlap but the contents don’t, this will permit you to interact with the one that you are actually over, and not the one on top.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am experiencing a strange problem: I have a Screen that is using the
I got a serious problem here: I have a scrolling background that is 1320
I have a problem where scrolling in both a toolStripComboBox and regular ComboBox is
I have a problem while scrolling images on tableview. I am getting a Signal
I have problem in some JavaScript that I am writing where the Switch statement
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have problem with fancybox. I want to write a function that will run
I have a problem that I can't figure out what to do next. I
Sorry that I don't have an example. However I'm creating a scrolling box (scrolls
I have a scrolling DIV that via JQuery determines the element in the middle.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.