I have a listview which I reorder by clicking on the gridViewheader. There is one problem though and it is that our swedish accented characters (for example "ä" which is a with two dots over). For some reason they are sorted like an unaccented character.
I have tried to set the Items.Culture = Thread.CurrentThread.CurrentCulture;
have also tried to set the default language/culture by doing this in my App.XAML.cs:
FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
This works when for example using converters (without this code I would get the defualt us culture). But it does not help with sorting the listview (a nd Items.Culture is null.
Found the problem. The Main windows of the application had a xml:lang="en-US" tag. After removing that and setting FrameworkElement.LanguageProperty it worked correct.
Proposed as answer byRahul P NathWednesday, November 5, 2008 4:16 AM
Marked as answer byHua ChenThursday, November 6, 2008 1:36 PM