// detect if this listviewitem needs to support GridItem pattern
        static private bool IsImplementingGrid(IntPtr hwnd)
        {
            // in the detail mode, GridItem will be implemented on the subitem
            // and not item
            if (WindowsListView.IsDetailMode(hwnd))
            {
                return(false);
            }

            return(WindowsListView.IsListMode(hwnd) || WindowsListView.ListViewAutoArrange(hwnd));
        }