使用 MahApps.Metro 时更改 ListBoxItem 的高度

Changing ListBoxItem Height while using MahApps.Metro

我有一个使用 MahApps.Metro 的项目。

在 ListBox 后面的代码中,我暂时将 ListBoxItem 的高度设置为 0。

 Dim draggedItemContainer As UIElement = Helper.GetItemContainerFromPoint(itemsControl, _dragStartPosition)

            If draggedItemContainer IsNot Nothing Then
                Dim lbi As ListBoxItem = CType(draggedItemContainer, ListBoxItem)
                lbi.Height = 0
            End If 

不使用 MahApps.Metro 它工作正常。这里有什么特别的吗?

MahApps.MetroMetroListBoxItem 样式将 MinHeight 设置为 25,因此您也必须将其设置为 0