mardi 19 janvier 2021

WPF Checkbox Dropping Character?

I have a strange occurrence and I'm not sure where to go from here. I have a WPF app and it has a treeview that has checkboxes for its items. However, it seems that in a particular case it's dropping a single character from the display. Take a look at this screen shot from the app:

Checkboxes

Each of those should be displayed as starting with "EQ_" rather than just "EQ" like they show. Things I have checked:

  • I have verified that the property that these checkboxes are bound to is stored correctly with the underscore so it's not a problem with the data.
  • There are no converters on the binding, the content of the checkbox is bound directly to the string property.
  • The property is immutable so it's not being changed anywhere strange.
  • This does have a custom style, but there are no converters anywhere in the custom style that would change anything.
  • This is also a custom font so I thought maybe the first underscore was a different character that shows up weird in the font or something but the character code of the missing underscore is the same as the second one that shows up so it doesn't seem like it would be a font issue.

I'm not sure even where else to go from here. Has anyone seen something like this or have any direction on how to investigate further?

EDIT

OK to take some of the variables out of the picture I did this in a blank project and it does the same thing. Create a new WPF project and put this in the main window:

<CheckBox Content="EQ_TANK_STORED_MATERIAL"></CheckBox>

The display in the window looks like this:

Default Project

What the heck???? Why is it removing that character?




Aucun commentaire:

Enregistrer un commentaire