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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:53:16+00:00 2026-06-11T07:53:16+00:00

What do I have: <Grid HorizontalAligment=Stretch> <Grid.ColumnDefinitions> <ColumnDefinition Width=Auto /> <ColumnDefinition Width=16 /> </Grid.ColumnDefinitions>

  • 0

What do I have:

<Grid HorizontalAligment="Stretch">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="16" />
    </Grid.ColumnDefinitions>
  <TextBlock Text="Text" Grid.Column="0" />
  <Grid Background="Black" VerticalAligment="Stretch" Grid.Column="1">
    <TextBlock Text="*" />
  </Grid>
</Grid>

Result:

__________
|        |
|Text *  |
|________|

I have a problem: when text is too wide, * becomes off screen.

__________
|        |
|long Tex|t *
|________|

So, how to specify that * should overlay part of the Text if it becomes off screen?

__________
|        |
|long Te*|t
|________|

The second problem: I cannot use MaxWidth for the Text, because Grid has a dynamic width.

UPD: If I would use Width="*" for the first column, I will get this:

__________
|        |
|Text   *|
|________|
  • 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-06-11T07:53:17+00:00Added an answer on June 11, 2026 at 7:53 am

    Use the following

    <ColumnDefinition Width="*" />
    

    Instead of

    <ColumnDefinition Width="Auto" />
    

    Edit:
    Here is the full code:

    <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="16" />
            </Grid.ColumnDefinitions>
    
            <TextBlock Text="123 Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really 
                       Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really 
                       Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really Text Long. Really 
                       " Grid.Column="0"/>
            <Grid Grid.Column="1">
                    <TextBlock Text="*" />
                </Grid>
        </Grid>
    

    The output is the following. 123 is start of the text. Is this not what you’re expecting?

    The Output

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

Sidebar

Related Questions

I am new to WPF. I declared my Grid as so: <Grid.ColumnDefinitions> <ColumnDefinition Width=Auto></ColumnDefinition>
So I have a following XAML code: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width=214 /> <ColumnDefinition />
I have horizontal wpf listview <ListView Name=indexList ItemsSource={Binding} HorizontalAlignment=Stretch VerticalAlignment=Top BorderBrush=Transparent Background=CadetBlue Width=450> <ListView.ItemsPanel>
Please, let's focus on the horizontal size (width). I have horizontal StackPanel which auto-resizes
I can't figure out how to manage properly the width of a grid column
I have the following simpl WPf grid, two columns, a button in each column,
I have a ListBox that contains a Grid. The Grid has a Label Column,
This is what i have so far: <dxe:ComboBoxEdit Name=cboUserCustomReports Width=300 Height=Auto Margin=0,5,0,5 ItemsSource={Binding Path=UserReportProfileList,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}
I am creating a 3-column UI with grid splitters between the columns. I have
I have a TextBlock which is resizing itself depending on its Text which is

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.