First, I declare that someone has long discovered this problem and sent it.PostMicrosoft already said this is"By Design. But I still cannot understand this strange behavior. So let's talk about your opinions.
The sample code is very simple.
< Window X: Class = "Hiddencaret. demowindow"
Xmlns= "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Xmlns: x= "Http://schemas.microsoft.com/winfx/2006/xaml"
Resizemode= "Noresize"Title= "Caret gone"
Width= "150"Height= "100">
<TextboxTextwrapping= "Wrap"/>
</Window>
TextboxTo setWrapMake it wrap automatically.
ReproductionBugThe steps are as follows:
Figure1.RunProgram
Figure2.Enter many letters
Figure3.Place the cursor at the beginning of the line
Figure4.Enter a space and the cursor disappears.
The cursor is invisible, but it still exists, but it just ends at the end of the first line. This is what Microsoft says:"By Design.
If you try to change the size of the form, for example200Then, after entering a space in the last step, the cursor is indeed visible, and a few more spaces are invisible. This is caused by the ratio of the font size to the width of the form.
In addition, there is no need for so many steps to reproduce the problem. If you enter enough space in the text box, there will be a problem-the root cause is thatSpaces are notWrap.
I don't know why Microsoft does this? However, I believe that the user enters something in the text box and suddenly finds that the cursor cannot be seen, it will never feel very natural. AndWinformOfTextboxYes.
I don't know about Microsoft.By DesignWhat are the considerations? What do you think?
Others in the same seriesArticle:
[WPF bugList] (Collation)And(1 )--Multiple choice optionsListBox
[WPF bugList]Of(2) -- radiobuttonOfIscheckedBinding invalid
[WPF bugList]Of(3 )--Open file dialog box for secretly creating a file
[WPF bugList]Of(4 )--ClickRadiobuttonNo response to blank
[WPF bugList]Of(5 )--Hide the modal dialog box and convert it to non-modal Mode
[WPF bugList]Of(6) -- buttonOfIscancelAttribute invalid
[WPF bugList]Of(7 )--StubbornError Template
[WPF bugList]Of(8) -- rowdefinitionMediumMaxheightInvalid under certain conditions