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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:07:56+00:00 2026-05-16T01:07:56+00:00

I am attempting to use the WrapPanel and two TextBlocks to append an asterisk

  • 0

I am attempting to use the WrapPanel and two TextBlocks to append an asterisk (*) to the left side of some text, allow the text to wrap, and force the text to be right aligned. I have successfully done so by creating a WrapPanel with the FlowDirection set to RightToLeft and adding my text, followed by the asterisk. However, if the text I use happens to have any non-alphanumeric characters at the end of the line it is inexplicably forced to the front of the line. I find this behavior to be very strange. I think it must be a bug in WPF and not intended behavior.

Example with Text = Normal Text (Other Text) :

Expected:
* Normal Text (Other
               Text)
Actual:
* Normal Text (Other
               (Text

Feel free to use the following sample code to recreate the issue for yourself. Simply put this in a window with Height and Width = 100, then type “Normal Text (Other Text)” in the TextBox. Or, set the Height and Width to anything you like and write enough text that it is forced to wrap the text, then add punctuation to the end.

Sample Code:

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition />
    </Grid.RowDefinitions>
    <TextBox Name="input" />
    <WrapPanel Grid.Row="2" FlowDirection="RightToLeft">
        <TextBlock Text="{Binding ElementName=input, Path=Text}" TextWrapping="Wrap"/>
        <TextBlock Text="*" Margin="0,0,3,0"/>
    </WrapPanel>
</Grid>

So, my question(s).

  • Is this a bug, or is this intended?
  • If this is a bug, should I submit it to Microsoft in some way? How?

Since starting this post, I have decided to put the two TextBlocks in a two column grid instead. With the non-asterisk containing TextBlock configured to use a Right TextAlignment I meet all my requirements anyway. Still, I found this to be an interesting issue.

  • 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-16T01:07:57+00:00Added an answer on May 16, 2026 at 1:07 am

    Try this instead:

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <TextBox Name="input" />
        <WrapPanel Grid.Row="2" HorizontalAlignment="Right" >
            <TextBlock Text="*" Margin="0,0,3,0"/>
            <TextBlock Text="{Binding ElementName=input, Path=Text}" TextWrapping="Wrap"/>
    
        </WrapPanel>
    </Grid>
    

    FlowDirection is for use to support languages that are read that from right to left. Since I don’t know the rules for languages like that I’m not going to pretend to understand why you are seeing what you are, or if it is a bug. That said I know that changing the FlowDirection isn’t the correct way to handle right aligning left to right languages and you should use HorizontalAlignment instead.

    (For future reference you submit bugs to Microsoft through the Connect site)

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

Sidebar

Related Questions

I'm attempting to use the rest-client gem to post something, but for some reason,
I am attempting to use the 'tempfile' module for manipulating and creating text files.
Attempting to use the data series from this example no longer passes the JSONLint
Attempting to use XStream's JavaBeanConverter and running into an issue. Most likely I'm missng
When attempting to use HttpWebRequest to retrieve a page from my dev server, I
Im attempting to use a C++ extension for Python called PySndObj. and getting an
In attempting to use std::select1st from <functional> in a VS2008 project I found that
Im attempting to use websockets for a project. It needs to use the ipad,
I'm attempting to use the adb pull command to copy only certain files (jpg)
I am attempting to use Cloud9 IDE for the first time, and start a

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.