{"action":"closed","issue":{"url":"https://api.github.com/repos/xceedsoftware/wpftoolkit/issues/927","repository_url":"https://api.github.com/repos/xceedsoftware/wpftoolkit","labels_url":"https://api.github.com/repos/xceedsoftware/wpftoolkit/issues/927/labels{/name}","comments_url":"https://api.github.com/repos/xceedsoftware/wpftoolkit/issues/927/comments","events_url":"https://api.github.com/repos/xceedsoftware/wpftoolkit/issues/927/events","html_url":"https://github.com/xceedsoftware/wpftoolkit/issues/927","id":242658652,"number":927,"title":"Bug in DescriptorPropertyDefinition, value binding ignores culture","user":{"login":"xceedsoftware","id":21266763,"avatar_url":"https://avatars3.githubusercontent.com/u/21266763?v=3","gravatar_id":"","url":"https://api.github.com/users/xceedsoftware","html_url":"https://github.com/xceedsoftware","followers_url":"https://api.github.com/users/xceedsoftware/followers","following_url":"https://api.github.com/users/xceedsoftware/following{/other_user}","gists_url":"https://api.github.com/users/xceedsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/xceedsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xceedsoftware/subscriptions","organizations_url":"https://api.github.com/users/xceedsoftware/orgs","repos_url":"https://api.github.com/users/xceedsoftware/repos","events_url":"https://api.github.com/users/xceedsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/xceedsoftware/received_events","type":"User","site_admin":false},"labels":[{"id":645731922,"url":"https://api.github.com/repos/xceedsoftware/wpftoolkit/labels/CodePlex","name":"CodePlex","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-13T10:39:32Z","updated_at":"2017-07-13T10:40:21Z","closed_at":"2017-07-13T10:40:21Z","body":"<b>AndreasBa[CodePlex]</b> <br />As a result of this discussion (see \r\nhttps://wpftoolkit.codeplex.com/discussions/639720), I did some debugging and I found the bug:\r\n\r\n\r\nThe DescriptorPropertyDefinition class which creates the binding to the value, does ignore the culture settings. Therefore the implicit converters which are used when a DataTemplate is set, it uses the default culture setting.\r\n\r\n\r\nThis is how I fixed it: \r\nprotected override BindingBase CreateValueBinding()\n    {\n      //Bind the value property with the source object.\n      var binding = new Binding( PropertyDescriptor.Name )\n      {\n        Source = SelectedObject,\n        Mode = PropertyDescriptor.IsReadOnly ? BindingMode.OneWay : BindingMode.TwoWay,\n        ValidatesOnDataErrors = true,\n        ValidatesOnExceptions = true, \n//when I set the converterCulture like this, its working. \n        ConverterCulture = System.Globalization.CultureInfo.CurrentCulture \n      };\n\n      return binding;\n    }\r\nMaybe it's worth including it in the next release? \r\n\r\nregards\r\n\r\nAndreas\r\n"}}
{"actor":{"display_login":"xceedsoftware"}}