How to hide the detailsview expander icon based on child records count in winui datagrid?

This example describes how to hide the detailsview expander icon based on child records count in winui datagrid.