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

  • Home
  • SEARCH
  • 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 133587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:27:35+00:00 2026-05-11T06:27:35+00:00

I would like to put my ScrollViewer in such a way that it overlaps/sits

  • 0

I would like to put my ScrollViewer in such a way that it overlaps/sits on top of the content it scrolls. I would set the Opacity of the ScrollViewer so that the content is visible underneath.

As far as I understand the default ScrollViewer, this doesn’t seem to be possible out of the box since the content is nested inside the ScrollViewer.

Any ideas on how to make this work?

EDIT: I understand that the ScrollViewer is a Decorator and that the content is not aware of the ScrollViewer. This separation is good and I don’t want the content to be aware of the ScrollViewer. What I try to do is a purely visual (layout) thing. Simply show the ScrollViewer on top of the content.The behavior of the ScrollViewer should remain unchanged.

  • 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. 2026-05-11T06:27:35+00:00Added an answer on May 11, 2026 at 6:27 am

    I think I now understand what you mean by ‘on top’ – one way to do it is to use a control template that makes the ScrollContentPresenter span two rows and columns of a grid while the ScrollBars are in the 2nd rows and columns. The ScrollBars are set to be semi-transparent. The content will now draw under the scrollbars!

    The Style I tried that works is as follows:

    <Style x:Key='SVStyle' TargetType='{x:Type ScrollViewer}'>     <Setter Property='OverridesDefaultStyle' Value='True' />     <Setter Property='Template'>         <Setter.Value>             <ControlTemplate TargetType='{x:Type ScrollViewer}'>                 <Grid>                     <Grid.ColumnDefinitions>                         <ColumnDefinition Width='*' />                         <ColumnDefinition Width='Auto' />                     </Grid.ColumnDefinitions>                     <Grid.RowDefinitions>                         <RowDefinition Height='*'/>                         <RowDefinition Height='Auto'/>                     </Grid.RowDefinitions>                     <ScrollContentPresenter Grid.ColumnSpan='2' Grid.RowSpan='2'/>                         <ScrollBar Name='PART_VerticalScrollBar'                             HorizontalAlignment='Right'                             Opacity='0.5'                              Grid.Column='1'                             Value='{TemplateBinding VerticalOffset}'                             Maximum='{TemplateBinding ScrollableHeight}'                             ViewportSize='{TemplateBinding ViewportHeight}'                             Visibility='{TemplateBinding ComputedVerticalScrollBarVisibility}' />                         <ScrollBar Name='PART_HorizontalScrollBar'                             VerticalAlignment='Bottom'                             Orientation='Horizontal'                             Opacity='0.5'                             Grid.Row='1'                             Value='{TemplateBinding HorizontalOffset}'                             Maximum='{TemplateBinding ScrollableWidth}'                             ViewportSize='{TemplateBinding ViewportWidth}'                             Visibility='{TemplateBinding ComputedHorizontalScrollBarVisibility}'/>                 </Grid>             </ControlTemplate>         </Setter.Value>     </Setter> </Style> 

    Example usage:

    <ScrollViewer HorizontalScrollBarVisibility='Auto' Style='{StaticResource SVStyle}' >     <StackPanel>         <Button Height='100' Width='800' >Hello World</Button>         <Button Height='100' Width='800' >Hello World</Button>         <Button Height='100' Width='800' >Hello World</Button>         <Button Height='100' Width='800' >Hello World</Button>         <Button Height='100' Width='800' >Hello World</Button>         <Button Height='100' Width='800' >World World</Button>         <Button Height='100' Width='800' >Hello World</Button>         <Button Height='100' Width='800' >Hello World</Button>     </StackPanel> </ScrollViewer> 

    The result is along the lines of this:

    fancy transparent scrolling

    It would be simple modify this so that the ScrollBars are initially very transparent (say, Opacity = 0.2) and have them become more opaque when the mouse enters the ScrollBar. That would be a nice effect and would keep the ScrollBars out the way until they’re needed.

    EDIT:

    I’ve written this up on my blog for those who would like a little more detail.

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

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

I would like to add a BuildListener to my headless build process, which is
I would like to use the dired mode of emacs as my file browser.
In my Silverlight project, I would like to make an assembly which contains .xaml
I would like to be able to publish snapshots to the repository using maven

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.