Created
October 4, 2014 12:13
-
-
Save adrianratnapala/6775b8de586317812ad5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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