I meet a very strange thing when I try to display string which include char '' using WPF data binding. Here is my description. I put 8 .txt files in a folder like follow picture.These files' name are different by using ''. I make them different file size. enter image description here
In my Application, I get file name by using code :
//Get all FileInfo object
DirectoryInfo directoryInfo = new DirectoryInfo(LocalDir);
FileInfo[] files = directoryInfo.GetFiles(LocalFileMask);
...
foreach (var i in files)
...
FileName = i.Name,
...
But my UI Cannot display filename correct, like in picture 2 :

Your can see the diffrent between folder and UI view. And I am very sure that they are right in code(see statusBar) , just something wrong with Label or TreeviewItem Content(Data Binding with string:FileName) Display. Maybe change a property of UI element will fix this issue. Can anyone give me some advise?