feat(i18n): 支持绑定表达式作为国际化键值
- 将 I18NBinding 构造函数的 key 参数从 string 类型改为 object 类型 - 添加对 BindingBase 类型键值的支持,允许动态绑定国际化键 - 为 I18NExtension 添加多个构造函数重载以支持 BindingBase 键值 - 更新资源文件添加新的测试键值对 - 修改视图模型属性访问修饰符并添加测试属性 - 在主窗口视图中添加绑定表达式的国际化使用示例
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Test}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{i18N:I18N Test1, {Binding Test}}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{i18N:I18N {Binding Test2}}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<Button Content="随机文本"
|
||||
Command="{Binding RandomTextCommand}" />
|
||||
<Button Content="切换中文"
|
||||
|
||||
Reference in New Issue
Block a user