Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uno Platform custom renderer

Is is possible to create a custom renderer in Uno? I need to create a native Android view and "embed" it in page or UserControl.

I didn't find any documentation about it.

We need to do the same as this example https://github.com/UNIT-23/Xam-Android-Camera2-Sample

Thank you!

like image 622
Murilo Maciel Curti Avatar asked Aug 24 '26 11:08

Murilo Maciel Curti


1 Answers

There's is no renderers in Uno: simply add your native control in the XAML and it should work unchanged.

Example

There's a NativeView test in Uno you can check here, which is used here in XAML.

XAML & Bindings

You can even set native properties directly in XAML, but bindings won't work on those.

If you need bindings, you can create a DependencyProperty and use the callback to set the native value.

like image 169
Carl de Billy Avatar answered Aug 26 '26 12:08

Carl de Billy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!