---
title: "How can I disable horizontal scrolling in a WPF listbox?"  
description: "How can I disable horizontal scrolling in a WPF listbox?"  
author: "E E Cummings"  
published: 2013-07-18  
updated: 2013-07-18  
canonical: https://www.mindstick.com/forum/1305/how-can-i-disable-horizontal-scrolling-in-a-wpf-listbox  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# How can I disable horizontal scrolling in a WPF listbox?

Hi [Developers](https://www.mindstick.com/articles/12875/blunders-you-must-avoid-while-hiring-java-developers-to-get-the-best-fulfilling-your-needs)!

This seems to be an absurdly [simple](https://yourviews.mindstick.com/story/1469/5-simple-ways-to-stay-fit-amp-healthy) [question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time) but [Google](https://www.mindstick.com/articles/43833/google-lighthouse-and-how-is-it-changing-the-way-we-development-and-design-websites) and SO searches yield nothing. How can I [disable](https://www.mindstick.com/forum/12901/how-to-disable-enable-input-box-in-aspx-with-value-from-sql) horizontal scrolling in a [WPF](https://www.mindstick.com/forum/304/wpf) [listbox](https://www.mindstick.com/articles/626/listbox-events-in-c-dot-net) when [items](https://www.mindstick.com/forum/33812/getting-number-of-items-selected-in-uicollectionview-in-ios) take up more horizontal [space](https://www.mindstick.com/articles/12954/do-your-electrical-repair-in-your-own-space) than is available in the box?

thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)

## Replies

### Reply by shreesh chandra shukla

Solution!

In XAML:

<ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled" />

In C#:

myListBox.SetValue(ScrollViewer.HorizontalScrollBarVisibilityProperty, ScrollBarVisibility.Disabled);

\


---

Original Source: https://www.mindstick.com/forum/1305/how-can-i-disable-horizontal-scrolling-in-a-wpf-listbox

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
