lundi 28 novembre 2016

XML String missing Char

My application is reading a string from a xml-file and sets this string (Exsample: 200_006 Name_Text) as CheckBox.content. Everythings working fine except a missing char.

Somehow the first "_" is missing. The second one is shown.

Here's my code:

xReader = new XmlTextReader("Dummy.xml");
            while (xReader.Read())
            {
                switch (xReader.NodeType)
                {
                    case XmlNodeType.Text:
                        CheckBox newCBX = new CheckBox();
                        newCBX.Margin = new System.Windows.Thickness { Left = 3, Top = 2, Right = 3, Bottom = 2 };
                        newCBX.Content = xReader.Value;
                        wpnlLists.Children.Add(newCBX);
                        break;
                }
            }

Any ideas?




Aucun commentaire:

Enregistrer un commentaire