开发者

xaml what is "local:"?

开发者 https://www.devze.com 2023-02-19 06:17 出处:网络
What is local: in XAML, and what parameters in a C# class can be called local: ? In some code I am lo开发者_运维问答oking at, I see xmlns:local=\"clr-namespace:AskLocal\". What does this mean?In XAML

What is local: in XAML, and what parameters in a C# class can be called local: ?

In some code I am lo开发者_运维问答oking at, I see xmlns:local="clr-namespace:AskLocal". What does this mean?


In XAML the local alias is commonly used when referring to the namespace in which the current class is declared. It is not mandatory, it is just commonly done.


local is an xml namespace. In this case "local" will be the alias for the namespace AskLocal.

It will allow you to declare resources, controls, converters etc from the AskLocal namespace directly in your xaml by using <local:nameofyourcontrol></local:nameofyourcontrol>

0

精彩评论

暂无评论...
验证码 换一张
取 消