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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:20:52+00:00 2026-05-13T00:20:52+00:00

I have a text box with verticalscrollbarvisibility set to auto. I would like to

  • 0

I have a text box with verticalscrollbarvisibility set to auto. I would like to do a test to find out if the scrollbar is actually visible during runtime. I have tried the statement:

if (textbox1.VerticalScrollBarVisibility == ScrollBarVisibility.Visible)

but it does not work. Any ideas?

  • 1 1 Answer
  • 1 View
  • 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-13T00:20:52+00:00Added an answer on May 13, 2026 at 12:20 am

    First place the following extension method in static class (either place the class in the same namespace as the rest of your code or in namespace included with a using statement in your code file):-

    public static IEnumerable<DependencyObject> Descendents(this DependencyObject root)
    {
        int count = VisualTreeHelper.GetChildrenCount(root);
        for (int i = 0; i < count; i++)
        {
            var child = VisualTreeHelper.GetChild(root, i);
            yield return child;
            foreach (var descendent in Descendents(child))
                yield return descendent;
        }
    }
    

    With this extension method available you can dig out the ScrollViewer inside the text box which is responsible for the scroll bar and test its ComputedVerticalScrollBarVisibility.

    if (textbox1.Descendents().OfType<ScrollViewer>()
      .FirstOfDefault().ComputedVerticalScrollBarVisibility == Visibility.Visible)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have text box ...If i type in textbox like C,C++,ASP.net,4-5Years then every word
I have text box on 1.php like this <input type=text id=1 value=somevalue> & text
I have a text box, Inside I want it to auto complete. The data
I have this listbox- <ListBox ScrollViewer.VerticalScrollBarVisibility=Hidden ScrollViewer.HorizontalScrollBarVisibility=Hidden MaxHeight=80 Width=Auto Name=listbox ItemsSource={Binding Text} Style={StaticResource Textblockstyle}
I have text box to enter a phone number. I'm using AJAX MaskedEditExtender and
I have text box in which your adds values in comma separated values. Once
i have form where i have text box value and link (add). when user
I have a text box which accepts time in the format HH:mm and entries
I have a text box with a certain width and a string. How do
I have one text box and i have to show minimum date of the

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.