Custom view not working in release mode on Android

Hi,

In my main project, I am using an SfPicker with a custom view via the ItemTemplate parameter, and I am encountering the following issue on Android:

- In debug mode: everything works fine.

- In release mode: the picker does not display anything.


I created a small project (attached) to test this, and I am experiencing the same issue:

Debug :

Screenshot_debug.png


Release :

Screenshot_release.png


Thanks for your assistance.


Attachment: PickerTemplate_16a24c4c.zip

8 Replies

VM Vidyalakshmi Mani Syncfusion Team January 19, 2026 01:15 PM UTC

Hi Omar,


In SfPicker, the binding context for the ItemTemplate is the `PickerItemDetails` class. Therefore, we recommend specifying the data type for the DataTemplate using x:DataType to ensure the bindings are resolved correctly.


Example:


 

<Grid>

 

        <Grid.Resources>

            <local:DataTModelConverter x:Key="converter" />

 

            <DataTemplate x:Key="customView" x:DataType="picker:PickerItemDetails">

                <StackLayout BackgroundColor="Yellow">

                    <Label HorizontalTextAlignment="Center"

                           VerticalTextAlignment="Center"

                           TextColor="Red"

                           Text="{Binding Data,Converter={StaticResource converter} }" />

                </StackLayout>

            </DataTemplate>

        </Grid.Resources>

 

        <picker:SfPicker x:Name="Picker"

                         ItemTemplate="{StaticResource customView}">

        </picker:SfPicker>

 

</Grid>

 


We have updated your sample by adding x:DataType and attached the modified version for your review. Kindly check the attached sample and let us know if the issue persists or if you need any further clarification.


Regards,

Vidyalakshmi M.



Attachment: PickerTemplate_dc77321e.zip


OM Omar January 20, 2026 11:19 PM UTC

Hi  Vidyalakshmi,


Thanks for your help, it's working now!


Maybe you should update the documentation with this point to help others :)


Here : https://help.syncfusion.com/maui-toolkit/picker/populating-items#adding-custom-view-to-items


Best regards,

Omar



VM Vidyalakshmi Mani Syncfusion Team January 21, 2026 02:17 PM UTC

Hi Omar,


Thank you for the update. We’re glad to hear that the issue has been resolved and everything is now working as expected. We’ll ensure the relevant documentation is updated to include this information.


If you have any further questions or need additional assistance, please feel free to reach out, we’re always happy to help.


Regards,

Vidyalakshmi M.




OM Omar April 2, 2026 03:09 PM UTC

Hello Vidyalakshmi,


I notice that the documentation still hasn't been updated 😉

Please remember to do so, as it's incomplete as it stands.


Best regards,
Omar



HM Hadayarahman Mohamed Khan Yusuf Syncfusion Team April 3, 2026 06:21 AM UTC

Hi Omar,

We acknowledge that the documentation is not yet fully updated. Please be assured that the update process is already underway, and the revised version will be completed on or before mid-next week. We will validate and update you with further details once completed. We sincerely appreciate your patience and understanding as we finalize these changes.


Regards,
Hadaya Rahman M.



VM Vidyalakshmi Mani Syncfusion Team April 10, 2026 11:16 AM UTC

Hi Omar,


We’ve updated the documentation with the latest code changes. Please take a moment to review it using the link below.


Populating with .NET MAUI Picker Control


Thank you for your patience during this process.


If you need any further clarification or assistance, feel free to let us know, we’re always here to help.


Regards,

Vidyalakshmi M.




OM Omar April 10, 2026 11:26 AM UTC

Hi  Vidyalakshmi,


That's perfect, thank you!


Regards,

Omar



VM Vidyalakshmi Mani Syncfusion Team April 13, 2026 11:40 AM UTC

Hi Omar,


We’re glad to hear that the updated documentation meets your expectations. If you have any further questions or need additional assistance, please feel free to get in touch, we’ll be happy to help.


Regards,

Vidyalakshmi M.



Loader.
Up arrow icon