Developer technologies | .NET | .NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In my MET MAUI app I have a popup where the user is supposed to enter a password. Following is a partial snippet:
<Entry x:Name="password" IsPassword="True" HorizontalOptions="Fill" />
<Button Text="OK" Margin="20,0"
Command="{Binding AcceptCommand}"
CommandParameter="{Binding Text, Source={x:Reference password}, Mode=OneWay, x:DataType='Entry'}"/>
When the button 'OK' is clicked, it reports the password in the CommandParameter.
Oddly the compiler higlights Binding Text and reports the error: 'Text' is not accessible.
However, the compilation completes successfully and the program runs - then it was not an error after all.
This happens both in NET 9.0 and NET 10. I am using VS 2026.
Can anybody explain this apparent inconsistency, and suggest a method to avoid this annoying fake error?