I am trying to use WrapPanel and two TextBlocks to attach a starter (*) to the left side of some text , Allow to wrap the text, and compel the text to align the right I have been working fine by successfully creating rappeltes with the Flooding set and by adding my text, followed by asterisk. However, if I use text, any non-alphanumeric characters have to be done at the end of the line, it is obviously forced to front of the line I find this behavior very strange. I think this should be a bug in the WPF and not the desired behavior. Examples: * Normal text (other text)) Actual: * Normal text (Other (text
Feel the following sample code to make the issue in order to keep yourself in a window with a height and width = 100 in words, then use the free. Other text) "in the text box. Or, height and height to anything you like and set the Type the text that is to wrap this text, then add a punctuation mark to the end.
Sample code:
Grid & Gt; & lt; Grid.RowDefinitions & gt; & lt; RowDefinition / & gt; & lt; RowDefinition / & gt; & lt; /Grid.RowDefinitions> & lt; Text Box Name = "Input" /> ; & Lt; WrapPanel Grid.Row = "2" FlowDirection = "RightToLeft"> TextBlock Text = "{Binding ElementName = Input, Path = Text}" TextWrapping = "Wrap" /> gt; & lt; TextBlock text = "*" margin = "0,0,3,0" / & gt; & lt; / WrapPanel & gt; & lt; / Grid & gt; Then, my question (s)
- Is this a bug, or is it 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 two text blocks in two column grids. With the text-block non-star configured to use the correct text alignment, I satisfy all of my requirements. Still, I found this an interesting issue.
Try it instead:
& Lt; Roadfinition /> & Lt; /Grid.RowDefinitions> & Lt; Text box name = "input" /> & Lt; WrapPanel Grid.Row = "2" Horizontal Alignment = "Right" & gt; & Lt; Text block text = "*" margin = "0,0,3,0" /> & Lt; Text block text = "{binding element name = input, path = text}" textwapping = "wrap" /> & Lt; / WrapPanel & gt; & Lt; / Grid & gt; The flow direction is used to support the language which is read right from left, since I do not know the rules of languages, so I am not excuse to understand it That's not the right way to handle what you are seeing, or if it is a bug as it was said I know that changing the flowdirection is left to right aligned right languages and you should use HorizontalAlignment instead .
(For future reference, you submit bugs via Microsoft)
Comments
Post a Comment