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 属性?
基础教程推荐
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- WPF 模态进度窗口 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
