Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path Data values have wrong format #53

Closed
jongleur1983 opened this issue Oct 4, 2016 · 5 comments
Closed

Path Data values have wrong format #53

jongleur1983 opened this issue Oct 4, 2016 · 5 comments
Assignees
Milestone

Comments

@jongleur1983
Copy link
Contributor

jongleur1983 commented Oct 4, 2016

Hi,
snooping an application to get a given path geometry I stumbled over a behaviour I don't understand, but that might be a bug in Snoop:

The Data value of a WPF Path item is shown in Snoop as
F1M6;0C9,31371;0 12;2,68629 12;6 12;9,31371 9,31371;12 6;12 2,68629;12 -6,35783E-07;9,31371 -6,35783E-07;6 -6,35783E-07;2,68629 2,68629;0 6;0z M3;4L5;6 3;8 4;9 6;7 8;9 9;8 7;6 9;4 8;3 6;5 4;3 3;4z

This value cannot be used in XAML, VisualStudio raises an exception.

Replacing , by . and ; by , (in that order) fixed the problem.

Nevertheless: Is there some strange localization of the values taking place or similar?

Probably worth to know: Running Windows in German

@jongleur1983
Copy link
Contributor Author

debugging snoop turns out to be strange but fun...
nevertheless: so far I figured out that the actual values are as displayed in Snoop in the data (according to the Visual Studio debugger as well as according to OzCode).

So I don't know yet where this conversion takes place, but I'm on it, will see in the next days.

@jongleur1983
Copy link
Contributor Author

I have to admit, I'm wrong (and the ToString method of StreamGeometry is strange).
Snoop shows the correct ToString value of the Geometry object - but that value is only slightly different from the Mini-Language used to define the Geometry in code.

With a few tests I'm pretty sure now that the problem is based on the Culture used to format values.
I therefore propose to always use the InvariantCulture in Snoop as many values will suffer from breaking changes in output formats.

@jongleur1983
Copy link
Contributor Author

added a pull request using GitKraken, unfortunately this created a new issue, sorry for that.
PR can be found at #54

@batzen batzen added this to the 2.11 milestone Jan 12, 2019
@batzen batzen self-assigned this Jan 12, 2019
cplotts added a commit that referenced this issue Jan 14, 2019
#53 use InvariantCulture to display values
@cplotts cplotts closed this as completed Jan 15, 2019
@cplotts
Copy link
Contributor

cplotts commented Jan 15, 2019

#54 was merged ... closing this issue.

@jongleur1983
Copy link
Contributor Author

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants