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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:03:46+00:00 2026-05-23T14:03:46+00:00

How can I decrease the left indentation of the deepest TreeViewItem node? For some

  • 0

How can I decrease the left indentation of the deepest TreeViewItem node? For some reason WPF seem to increase this indentation by quite a bit for all but the deepest node. Looking at Window XP’s tree view implementation each depth has the same left margin.

I’ve searched around and I can’t seem to find an implementation that works yet it appears to be possible.

  • 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-23T14:03:46+00:00Added an answer on May 23, 2026 at 2:03 pm

    UPDATE: Corrected the solution

    Here is a picture of the problem for reference…

    enter image description here

    And here is a picture of what you’re (probably) hoping for…

    enter image description here

    NOTE: The list of files appears further to the left in the second screenshot.

    After digging into this, I consider it a defect in the default TreeViewItem template. To fix this and to make any other adjustments needed, you’ll need to provide your own TreeViewItem template. Starting with the default TreeViewItem template from this SO answer…

    You need to change this…

    <Trigger Property="HasItems" Value="false">
        <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
    </Trigger>
    

    To this…

    <Trigger Property="HasItems" Value="false">
        <Setter Property="Visibility" TargetName="Expander" Value="Collapsed"/>
    </Trigger>
    

    That should do it for you. By default, the system is leaving the 19 pixels of space for the exapander. Since the expander isn’t needed at the leaf level, that area should be collapsed, not hidden.

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

Sidebar

Related Questions

I need a priority queue where I can increase or decrease the priority key.
Can you suggest some ways/tips to decrease Resharper memory usage in VS 2008. Working
How to get this layout Green box has float:left , I can do this
Could someone please provide some suggestions on how I can decrease the following for
How i can Decrease the report file Loading Time? I Use this Code to
Are there any products that will decrease c++ build times? that can be used
can you recommend some good ASP.NET tutorials or a good book? Should I jump
I use HTML to put text into a JButton. In this way I can
There are certain algorithms whose running time can decrease significantly when one divides up
How would you convert type Node into an immutable tree? This class implements a

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.