Skip to content

Instantly share code, notes, and snippets.

@adrianratnapala
Created October 4, 2014 12:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianratnapala/6775b8de586317812ad5 to your computer and use it in GitHub Desktop.
Save adrianratnapala/6775b8de586317812ad5 to your computer and use it in GitHub Desktop.
static App()
{
var lang = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);
FrameworkElement.LanguageProperty.OverrideMetadata(
typeof(FrameworkElement), new FrameworkPropertyMetadata(lang)
);
var ceTypes = new Type[] {
typeof(System.Windows.Controls.DefinitionBase),
typeof(System.Windows.Documents.FixedDocument),
typeof(System.Windows.Documents.FixedDocumentSequence),
typeof(System.Windows.Documents.FlowDocument),
typeof(System.Windows.Documents.TableColumn),
typeof(System.Windows.Documents.TextElement),
};
foreach(Type type in ceTypes)
FrameworkContentElement.LanguageProperty.OverrideMetadata(
type, new FrameworkPropertyMetadata(lang)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment