XAML Files
XAML stands for Extensible Application Markup Language.
When project is created you can see the maui project structure
In this project, there are xaml file(App.xaml,AppShell.xaml,MainPage.xaml)
each of this page support xaml language and when you expand it, each will have associated cs file.
In each contentpage of Maui Project, you observe some code at starting of the page
xmlns is used for binding namespace.
"http://schemas.microsoft.com/dotnet/2021/maui" is an namespace which is version identifier which contain certain information
If you remove this line then it will throw error.
blue lines says that there is an error. this is because namespace has been removed
The xmlns:x attribute indicates an additional XAML namespace, which maps the XAML language namespace.It define some xaml element.
Using x we can use some element like x:class,x:name etc.
x:class define the name of the class the use in code behind.
Hope this is helpful to you. please share your feedback in comment section.
Comments
Post a Comment