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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:02:11+00:00 2026-05-16T17:02:11+00:00

Got a weird problem here. I have created a template for a ListBox based

  • 0

Got a weird problem here. I have created a template for a ListBox based on the standard template (i.e. I have not changed anything other than what I indicate below).

I am trying to add a couple of buttons to the side of the template so that I can scroll the ScrollViewer (which is part of the standard ListBox template) left and right. The problem is that it only recognises the ScrollBar.PageLeftCommand OR the ScrollBar.PageRightCommand … I cannot get it to response to both.

In other words if I click the right button it will page right, but if I click the left button it doesn’t do anything. Depending on the ordering of the Button in the XAML that will dictate which command works and which doesn’t (it appears the command works for the last button defined in the XAML).

<ControlTemplate TargetType="{x:Type s:SurfaceListBox}">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.137*"/>
            <ColumnDefinition Width="0.726*"/>
            <ColumnDefinition Width="0.137*"/>
        </Grid.ColumnDefinitions>
        <Border x:Name="Border"  Grid.ColumnSpan="1" Grid.Column="1">
            <s:SurfaceScrollViewer x:Name="scrollViewer" >
                <ItemsPresenter />
            </s:SurfaceScrollViewer>
        </Border>
        <s:SurfaceButton x:Name="rightScroll" Content="&gt;" Command="ScrollBar.PageRightCommand" CommandTarget="{Binding ElementName=scrollViewer}" Grid.Column="2" />
        <s:SurfaceButton x:Name="leftScroll" Content="&lt;" Command="ScrollBar.PageLeftCommand" CommandTarget="{Binding ElementName=scrollViewer}"/>
    </Grid>
</ControlTemplate>

(Yes this is using the Surface classes but I have tried it with normal ones and I get the same behaviour..)

I have had a look at it running with Snoop but it tells me nothing useful about the commands – according to Snoop both the commands are handled successfully!

  • 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-16T17:02:11+00:00Added an answer on May 16, 2026 at 5:02 pm

    Ok, I lied. I did not try replacing the SurfaceScrollViewer with a normal ScrollViewer.

    When I do that it appears to work. So unless anyone has any other suggestions it appears that the SurfaceScrollViewer has at least two bugs (the second being I found is the ScrollBar do not respond to commands when they are hidden unlike the regular ScrollViewer).

    Foiled again.

    🙁

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

Sidebar

Related Questions

I have got a weird problem here, and more interesting that it works fine
I've got a weird problem: both my if and else statements are executing. Here's
I got a really weird problem here and I absolutely cannot understand why this
I've got a weird problem here. I've been trying to find out whats wrong
I've got a weird problem. I've created a procedure in PHP that does these
I have got a problem with two tables: CREATE TABLE IF NOT EXISTS `addresses`
I have some really weird crash here, ive got it before, but i thought
I got a weird problem of MySQL index. I have a table views_video :
I've got a weird problem that I can't understand... I have a simple HelloWorld
I got a weird problem. I have a program that (does many things but

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.