有没有办法在WPF或Telerik中更改当前的日历控件?我正在我的应用程序中进行翻译。当我将语言更改为日语时,是否有一种方法可以包括日语日历控件而不是英语的?
有没有办法在WPF或Telerik中更改当前的日历控件?我正在我的应用程序中进行翻译。当我将语言更改为日语时,是否有一种方法可以包括日语日历控件而不是英语的?
将您的控件的 FrameworkElement.Language
属性设置为日语(日本)或者在您的控件的 XAML 中应用 xml:lang 属性。您需要设置的值是 xml:lang="ja-JP"
。
来自 msdn 的 CultureInfo
例如,
XAML:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xml:lang="ja-JP"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Calendar />
</Grid>
</Window>
输出