0 votes
in Xamarin Exordium by
What is XAML namespace declaration?

1 Answer

0 votes
by

XAML namespace is the declaration of the namespaces on top of the XAML file. There are two declarations available within the root element when we create any new XAML UI. Here is the default declaration of the xmlns without any prefix:

The second declaration uses the x prefix:

All declaration of the namespace which uses the prefix is a non-default declaration.

Suppose we want to bind the ViewModel with XAML and that ViewModel is declared inside the namespace, "XamSample.ViewModels".

  1. xmlns:vm="clr-namespace:XamSample.ViewModels; assembly=XamSample.ViewModels"  

Then we can access the element from inside this namespace using VM prefix.

Related questions

0 votes
asked Jan 4 in C Plus Plus by GeorgeBell
0 votes
asked Aug 19, 2022 in GoLang by john ganales
...