private unsafe int GetGroupHeaderHeight()
        {
            NativeMethods.LVGROUPMETRICS metric = new NativeMethods.LVGROUPMETRICS(sizeof(NativeMethods.LVGROUPMETRICS), NativeMethods.LVGMF_BORDERSIZE);
            XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck);

            return(metric.Top + padding);
        }
Exemple #2
0
		/// <summary>
		/// Modify the space between groups
		/// </summary>
		/// <returns></returns>
		protected int SetGroupSpacing() {
			if (this.ListView.SpaceBetweenGroups <= 0)
				return 0;

			NativeMethods.LVGROUPMETRICS metrics = new NativeMethods.LVGROUPMETRICS();
			metrics.cbSize = ((uint)Marshal.SizeOf(typeof(NativeMethods.LVGROUPMETRICS)));
			metrics.mask = (uint)GroupMetricsMask.LVGMF_BORDERSIZE;
			metrics.Bottom = (uint)this.ListView.SpaceBetweenGroups;
			return NativeMethods.SetGroupMetrics(this.ListView, this.GroupId, metrics);
		}