✅ bind prop or field to Entry in MAUI
Hey how do I directly bind a prop or field to an Entry or Label in MAUI? The docs aren’t clear
11 Replies
Basic bindings - .NET MAUI
.NET MAUI data binding links a pair of properties between two objects, at least one of which is usually a user-interface object. These two objects are called the target and the source.
The docs go over that in detail
I can't find an example of where it binds to a field, only binds to another component/control value
maybe I'm blind
If you read through the article it is talking about a few different solutions to your question I think. I would go through and try out the demo.
Your problem is that you are thinking there's a difference
There isn't
so if you know how to can you share a snippet of an control having it's value bound to a field?
It's literally exactly the same as any other binding
But no, I'm on my phone right now
You set the binding context, and bind to the field you want
so how do I have
this
as a binding context? it's not shown @OrannisThat's the default
The reason why the very first example works is because that's the default
If you ever need to explicitly say this, you use
.
as the pathoh thanks a lot
Closed!