Accessing native controls
Describes how access the underling native control
Sometimes you need a reference to the native control (i.e. MAUI control); for example, say you need to move focus to Entry control when the component starts up.
In MauiReactor, you can get a reference to the underlying widget passing an Action argument when constructing the visual object accepting the reference to the native control: you can easily save it in a private field and reuse it wherever.
For example, in this code when a button is clicked, the textbox (i.e. Entry) is focused:
The page containing the current component is also accessible with the convenient ContainerPage
property
Sometimes you need to set a specific dependency property of the native control:
If you want to set an attached dependency property:
Last updated