gpt4 book ai didi

c# - 更改 WPF 中的日历控件

转载 作者:太空宇宙 更新时间:2023-11-03 17:40:56 25 4
gpt4 key购买 nike

有没有办法改变 wpf 或 telerik 中的当前日历控件?我正在我的应用程序中进行翻译。当我将语言更改为日语时,有没有办法包含日语日历控件而不是英语日历控件。

最佳答案

设置FrameworkElement.Language控件的属性或将 xml:lang 属性应用于控件的 XAML。您必须设置的值为 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>

输出

enter image description here

关于c# - 更改 WPF 中的日历控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23192268/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com