-
Notifications
You must be signed in to change notification settings - Fork 113
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
DataTriggerBehaviour: exception when using 0.6 for French locale? #154
Comments
Hmm. That probably means somewhere a string is parsed without using invariant culture. Very peculiar no-one ever hit that before.
Joost van Schaik
Windows Development MVP
Sent from mail for Windows 10
"The world as I envision it in my head is such a more interesting place"
…________________________________
From: Niels Laute <[email protected]>
Sent: Sunday, March 3, 2019 10:21:52 PM
To: Microsoft/XamlBehaviors
Cc: Subscribed
Subject: [Microsoft/XamlBehaviors] DataTriggerBehaviour: exception when using 0.6 for French locale? (#154)
Hi all,
I'm using the following code to change the opacity of the selected item of a GridView.
<Core:DataTriggerBehavior Binding="{Binding ElementName=RoomsView, Path=SelectedItem.Id, Mode=OneWay}" Value="{Binding Id}" ComparisonCondition="NotEqual"> <Core:ChangePropertyAction TargetObject="{Binding ElementName=TitleTxt}" PropertyName="Opacity" Value="0,6" /> <!-- Needs to be a , else it will crash on French --> </Core:DataTriggerBehavior>
Now this code runs fine. However, when I switch the language to French the app crashes. It can somehow not parse 0.6. When I enter 0,6 (mind the comma) it runs fine.
This is the exeption:
`System.ArgumentException: 'Impossible d'attribuer une valeur de type String à la propriété Windows.UI.Xaml.PropertyPath de type Double. Seules des valeurs de type Double peuvent être attribuées à la propriété Windows.UI.Xaml.PropertyPath.'
Inner exception: FormatException: Input string was not in a correct format.`
Is there some parsing going wrong here wrt the point and the comma?
Regards,
Niels
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#154>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AD8Bn4O0TslXaFce6paX2kpExFZ4S4NIks5vTDzwgaJpZM4bbP7N>.
|
Issue confirmed, as one can see here! For some weird reason, this is using |
I've now pushed a fix, waiting for someone else to review & comment on it. |
Did review. No comment 😉
Joost van Schaik
Windows Development MVP
Sent from mail for Windows 10
"The world as I envision it in my head is such a more interesting place"
…________________________________
From: Pedro Lamas <[email protected]>
Sent: Monday, March 4, 2019 11:39:18 AM
To: Microsoft/XamlBehaviors
Cc: Joost van Schaik; Comment
Subject: Re: [Microsoft/XamlBehaviors] DataTriggerBehaviour: exception when using 0.6 for French locale? (#154)
I've now pushed a fix, waiting for someone else to review & comment on it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#154 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AD8Bn_8DjUp4u7nHcVzzpikXwjyyUcbjks5vTPfWgaJpZM4bbP7N>.
|
Yep, I found out when French users trying to start the new update.. oops :). @pedrolamas @LocalJoost Thanks for the quick help, guys! Hopefully it gets merged and pushed to NuGet soon! |
This is now merged, but pushing a new NuGet package is out of my hands... @karann-msft or @mgoertz-msft any chance you can help with that? |
@pedrolamas Of course. Looking at the source history for the repo it looks like this is really the only functional change since the last release and it affects the managed SDK only. There have been some changes in the NuGet publishing process that we will need to adopt first but it will make it a lot easier and faster going forward. @branh Could you please bump the version numbers to 2.0.1 and set up the publishing pipeline similar to the WPF Behaviors? Thank you! |
Fixed a bug introduced by XAML behaviors: microsoft/XamlBehaviors#154
Hi all,
I'm using the following code to change the opacity of the selected item of a GridView.
Now this code runs fine. However, when I switch the language to French the app crashes. It can somehow not parse 0.6. When I enter 0,6 (mind the comma) it runs fine.
This is the exeption:
Inner exception: FormatException: Input string was not in a correct format.`
Is there some parsing going wrong here wrt the point and the comma?
Regards,
Niels
The text was updated successfully, but these errors were encountered: