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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:23:25+00:00 2026-05-11T19:23:25+00:00

I need some help. Don’t know if this is possible. I want to have

  • 0

I need some help. Don’t know if this is possible. I want to have the following:

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <TextBox TextWrapping="Wrap" MinLines ="5"/>
    </Grid>

which is a textbox wrapping inside of a grid column with width *. I want the textbox to take all the width available(hence *) but when a user adds text I want it to wrap when it gets to the end of the line(with the space available).

Currently the above will give a textbox with the entire width but when text is entered the width of the textbox just grows with the text.

I know i can set MaxWidth=?, but the point the column is * is that I don’t know what the size of the column is.

I would like to say to the textbox “don’t grow, whatever wpf gives you take it and don’t increase one more pixel above that”.

I think what I want is impossible, because wpf asks the control how big it wants to be and when the user adds more text that goes beyond the boundary it kindly requests more space and goes off expanding its width to infinity.

  • 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-11T19:23:26+00:00Added an answer on May 11, 2026 at 7:23 pm

    Try binding the MaxWidth property of your TextBox to the ActualWidth property of your starred column (you’ll have to name your column to do this). I’m pretty sure I’ve done something like this in the past.

    Something like:

    MaxWidth={Binding ElementName=MyColumn, Path=ActualWidth}
    

    Good luck!

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

Sidebar

Related Questions

Well i need some help here i don't know how to solve this problem.
I really don't know how to title this question, but I need some help
Hi I need some help with the following scenario in php. I have a
Need some help to solve this. I have a gridview and inside the gridview
I need some help on simplifying my method I have this method public double
Need some help with putting this query together. I'm using Mysql I have two
I need some help on this problem. It is about ASP.NET MVC3. I have
I need some help from the shell-script gurus out there. I have a .txt
I am new to all the anonymous features and need some help. I have
I'm working with jQuery for the first time and need some help. I have

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.