質問

Im currently following a WPF tutorial that requires me to add a package from nuget (Oxyplot).

Fortunately the demo code contains the declaration:

...
xmlns:oxy="http://oxyplot.codeplex.com"
...

Im wondering in the future if someone else gives me a third party assembly, how I would discover its xmlns?

I have had a look at the assembly properties in visual studio in 'References' but there is no xmlns attribute.

役に立ちましたか?

解決

xmlns is nothing but namespace declaration syntax for XAML so that you can create instance of classes declared under that namespace from your XAML code. Refer to details here for the details in case needs more explanation.

Now, for your question

how to discover xmlns?

Most of third party libraries, provide source code along with it. So, you can always go and look at the namespace for class you intend to use from that source code. They are not always mapped to site name like in oxy case. If it is, documentation will always guide you regarding for its usage in XAML, so you need not to worry about that.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top