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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:34:16+00:00 2026-05-27T04:34:16+00:00

Here is the code I have : <ScrollViewer Grid.Row=2 CanContentScroll=True> <DockPanel> <TreeView x:Name=tView DockPanel.Dock=Top

  • 0

Here is the code I have :

<ScrollViewer Grid.Row="2" CanContentScroll="True">
      <DockPanel>
           <TreeView x:Name="tView" DockPanel.Dock="Top" VerticalAlignment="Stretch">
               [...]
           </TreeView>

           <TreeView Name="pluginsView" DockPanel.Dock="Top" VerticalAlignment="Stretch">
               [...]
           </TreeView>
      </DockPanel>
</ScrollViewer>

I HAVE to define 2 TreeViews. There are in the same “area” (in mean same [Row, Column]) so I had to use a Panel. I used a StackPanel but the display was not what I wanted.
I used the ScrollViewer so that I get a common scrollbar for the 2 TreeViews when they don’t vertically fit the space of the “area”.

The problem I have is horizontally. When 1 of my 2 TreeView is too “large”, I got a scrollbar that appears but only for the TreeView that is too large, so when I scroll, only one of my TreeView moves horizontally. What I want is that when I scroll, both of my TreeView move horizontally.

I don’t know if it’s clear enough, I can upload screenshots if it’s not clear !

I tried this code too, but it doesn’t work too :

<ScrollViewer Grid.Row="2" CanContentScroll="True">
      <Grid Grid.Row="2">
           <Grid.RowDefinitions>
               <RowDefinition Height="Auto" />
               <RowDefinition Height="Auto" />
           </Grid.RowDefinitions>
           <TreeView Grid.Row="0" x:Name="tView" DockPanel.Dock="Top" VerticalAlignment="Stretch">
               [...]
           </TreeView>

           <TreeView Grid.Row="1" Name="pluginsView" DockPanel.Dock="Top" VerticalAlignment="Stretch">
               [...]
           </TreeView>
      </DockPanel>
</ScrollViewer>

but I got the EXACT same problem.. 🙁

  • 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-27T04:34:16+00:00Added an answer on May 27, 2026 at 4:34 am

    It sounds like it is using the TreeView’s internal ScrollViewer to scroll the content, not the outer ScrollViewer.

    Usually this is because the content inside the ScrollViewer is limited in size in some way, so make sure you aren’t limiting the size of the TreeView or it’s parent panel in any way. This would include Vertical/Horizonal Aligment being set to Stretch.

    Here’s an example that works to scroll smoothly in both directions. I was a little surprised that I had to set HorizontalScrollBarVisibility in the <ScrollViewer> tag to make the Horizontal ScrollBar show up.

    <Border BorderBrush="Black" BorderThickness="2" Height="100" Width="100">
        <ScrollViewer CanContentScroll="True"
                      HorizontalScrollBarVisibility="Auto"  
                      VerticalScrollBarVisibility="Auto">
            <DockPanel>
                <Rectangle Height="75" Width="150" Fill="Red" DockPanel.Dock="Top" />
                <Rectangle Height="75" Width="150" Fill="Blue" />
            </DockPanel>
        </ScrollViewer>
    </Border>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have horizontal ListBox. Here is code for it (removed some irrelevant): <ListBox Grid.Row=1
I have this code here, {foreach from=$cart.cartItems item=item name=cart} <div id=cart2Produkt> <p>{if $item.Product.ID} <a
enter code here I have a table on SQL server 2005 with bigint primary
Here is the code I have to create an UIAlertView with a textbox. UIAlertView
Here's the code I have: var commandsBuffer = List[String]() commandsBuffer ::= cmd.exe commandsBuffer ::=
Here's the code I have: from cStringIO import StringIO from lxml import etree xml
I have this code here: var infiltrationResult; while(thisOption) { var trNode = document.createElement('tr'); var
I have this code here, which is intended to allow any type of arguments:
I have some code here which works perfectly in firefox but not in chrome
I have my code here, it works fine from my home, where my user

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.