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 7007793
In Process

The Archive Base Latest Questions

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

Hi and thanks for looking! Background This is an extension on this question: How

  • 0

Hi and thanks for looking!

Background

This is an extension on this question:

How do I slide child items up or down inside a WPF wrappanel?

In which I asked how I could programattically scroll the contents of a WrapPanel up or down on a button click. This question was kindly answered and the accepted solution works well.

Problem

Now that my thumbnails in the WrapPanel scroll up and down on a button click, how do I mask the WrapPanel so that the tiles don’t show when they are outside of frame? For example, I have a StackPanel above the WrapPanel that holds the scroll up and down buttons, but when I scroll down, the thumbnails cover up the StackPanel above them (and the buttons). Here is my XAML so far, please note that the thumbnails are added to the WrapPanel at runtime:

Update

Using Dave Clemmer’s XAML, my layout is steadier, but then I still end up with the contents of the WrapPanel eclipsing the StackPanel above it. Please see these screen grabs taken before and after the scroll event:

BEFORE SCROLL-

Before Scroll

AFTER SCROLL-
enter image description here

Update 2

Set canvas to red background per Dave’s comment below.

BEFORE SCROLL-

enter image description here

AFTER SCROLL-

enter image description here

  • 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-27T21:39:12+00:00Added an answer on May 27, 2026 at 9:39 pm

    Well, I wouldn’t call this intuitive, but in the end, this worked:

     <Border Grid.Row="1" Background="Transparent" ClipToBounds="True">       
                <Canvas>
                    <WrapPanel x:Name="spContainer"  
                       Width="{Binding ActualWidth,  
                               RelativeSource={RelativeSource AncestorType={x:Type Canvas}}}">
                    </WrapPanel>
                </Canvas>
     </Border>
    

    Adding the border did the trick. Thanks to Dave for all of your help!

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

Sidebar

Related Questions

Thanks for looking at this question. I wanted to know how can I use
Hi and thanks for looking! Background First, I am an absolute n00b to WPF/Silverlight/XAML.
Thanks for looking, all helpful answers are voted up. This is my markup. I'm
Thanks for looking on this problem. I have a page that is totally valid
Hello and thanks for looking! Background I am designing a greenfield application using .NET4
Hi and thanks for looking! Background I am working on a developer tool for
Hi and thanks for looking! Background I need to pull the file locations (path
Background to question: I'm looking to implement a caching system for my website. Currently
Hello and thanks for looking! Background I am building a commercial web application for
Hi and thanks for looking! Background I have inherited an old .NET project based

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.