根据demo实现不规则宫格布局的时候发现设置行列的时候不起作用。
VariableSizedWrapGrid.SetRowSpan(element as ContentControl, rowVal);
VariableSizedWrapGrid.SetColumnSpan(element as ContentControl, colVal);
原因如下:没有设置VariableSizedWrapGrid的ItemHeight , ItemWidth (Demo里面没有设置)。
<local:CustomGridView.ItemsPanel>
<ItemsPanelTemplate>
<VariableSizedWrapGrid ItemHeight="260" ItemWidth="260"/>
</ItemsPanelTemplate>
</local:CustomGridView.ItemsPanel>