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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:37:27+00:00 2026-05-24T02:37:27+00:00

I have the following style defined in my App.xaml <Style x:Key=textBoxMultiline TargetType={x:Type TextBox} >

  • 0

I have the following style defined in my App.xaml

<Style x:Key="textBoxMultiline" TargetType="{x:Type TextBox}" >
    <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
    <Setter Property="HorizontalScrollBarVisibility" Value="Hidden" />
    <Setter Property="MinHeight" Value="50" />
    <Setter Property="TextWrapping" Value="Wrap" />
</Style>

And throughout the solution we’re using it on every text box that needs a brief text.

<TextBox x:Name="textBoxDescription" Grid.Row="2" Grid.Column="1" Style="{DynamicResource textBoxMultiline}" />

Everything works great, but then the client complains about some fields were corped on older monitors with lower resolutions, so I placed a ScrollViewer on one of the higher visual tree nodes to prevent the corping.

<ScrollViewer Height="Auto" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
   ...
</ScrollViewer>

Strangely, the TextBoxes with the above style start expanding to the right instead of wrapping the text.

Is there a way to prevent this without removing the ScrollViewer?

  • 1 1 Answer
  • 2 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-24T02:37:27+00:00Added an answer on May 24, 2026 at 2:37 am

    You must define a MaxWidth for the TextBox, otherwise there’s no limit because the ScrollViewer.

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

Sidebar

Related Questions

In <Window.Resources> I have defined following style: <Style x:Key=textBlockStyle TargetType=TextBlock> <Setter Property=Margin Value=5,0,5,0/> </Style>
I have following user control: <UserControl.Resources> <Style TargetType=HeaderedItemsControl> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType=HeaderedItemsControl> <Grid>
<Style x:Key=FavouriteMenuItemStyle TargetType={x:Type MenuItem} BasedOn={StaticResource BasicFavouriteItemStyle}> <Setter Property=Width Value=Auto/> <Setter Property=Template> <Setter.Value> <ControlTemplate TargetType={x:Type
I have the following custom defined Button defined in my App.xaml file. <Style x:Key=DispatchListCallButton
I have the following style defined... <!-- Blue Button --> <Style x:Key=BlueButton TargetType={x:Type Button}>
In my application, I have defined the following style for TextBlocks. <Style TargetType={x:Type TextBlock}>
My situation is like following. I have a App.xaml which includes Style for ListView
In a WPF app I have a ResourceDictionary with Style defined for the TargetType
I have a DefaultStyle and then another Style defined like this <Style TargetType={x:Type my:CustomButton}
I have an Android (developed on A2.2) app with following theme defined: <style name=ProgressBar>

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.