How to set control x:Uid attribute programmatically for a metro app control?(如何以编程方式为 Metro 应用程序控件设置 control x:Uid 属性?)
问题描述
我需要以编程方式设置某些控件的 x:Uid 属性吗?此属性用于本地化.
I need to set the x:Uid attribute of some control programmatically? this attribute is used for localization.
推荐答案
我不是很擅长这个话题,但是如果我们谈论的是同一件事,你可以在这里看到:BamlLocalizableResourceKey.Uid 属性
I am not really strong on this subject but if we are talking about the same thing, as you can see here: BamlLocalizableResourceKey.Uid Property
public 属性只有一个 get,因此您无法从 C# 代码中轻松更改它.
the public property has only a get, so you can't change it easily from C# code.
public string Uid { get; }
查看更多 x:Uid Directive 以了解此属性设置为指令,与 XAML 中的其他属性不同.
see more x:Uid Directive to find out that this property is set as directive and not like other attributes in XAML.
这篇关于如何以编程方式为 Metro 应用程序控件设置 control x:Uid 属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何以编程方式为 Metro 应用程序控件设置 control x:Uid 属性?
基础教程推荐
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 将数据集转换为列表 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 如果条件可以为空 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
