I tried to make an simple app in Visual studio using .NET MAUI. I searched for the simplest way to add text and change its properties and I found out about Text Box and Text Block, but when I wanted to implement these in my code I got this error:
"XLS0414 The type 'TextBox' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built."
I checked if prefixes in my project are ok:
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MyApp.MainPage"
xmlns:local="clr-namespace:MyApp">
I updated my NuGet packages and tried to install some workload manifests but It didn't worked so I installed it throught terminal using this command:
dotnet workload install maui
These are the main packages that I'm using:Packages
Is there anything I can do or .NET MAUI does not have these functions? Its uses XAML so I'm just curious at this point.
XAML is the overall name for how to structure UI elements in Microsoft (or Microsoft technology oriented) UI frameworks.
Over the years for the different frameworks a couple of different dialects emerged.
In the case of Xamarin.Forms (now .NET MAUI) this was probably mostly because Xamarin (the company) was not owned by Microsoft so maybe some copyright issues were involved? But at the very least the dominant variation of XAML, the one in WPF, wasn't really taking into account mobile controls and terms.
Therefore there are some subtle differences, the TextBox
you mention is probably the Entry
for .NET MAUI.
So long story short: .NET MAUI absolutely supports XAML, the elements and properties might just be a bit differently named than you're used to if you come from WPF or UWP.
Find the .NET MAUI Docs on Microsoft Learn with a list of all the controls and their properties.