简体   繁体   中英

change the calendar control in WPF

Is there a way to change the current calendar control in wpf or telerik? I am doing translation in my application. When I change language to Japanese, is there a way to include the Japanese calendar control instead of the English one.

Set the FrameworkElement.Language property of your control or apply the xml:lang attribute to the XAML of your control. The value you have to set is xml:lang="ja-JP".

from msdn CultureInfo

For example,

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>

Output

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM