How to set control x:Uid attribute programmaticall

2020-04-12 00:52发布

I need to set the x:Uid attribute of some control programmatically? this attribute is used for localization.

1条回答
太酷不给撩
2楼-- · 2020-04-12 00:57

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

the public property has only a get, so you can't change it easily from C# code.

public string Uid { get; }

see more x:Uid Directive to find out that this property is set as directive and not like other attributes in XAML.

查看更多
登录 后发表回答