void gcCalendarGrid1_ResizeCompleting(object sender, GrapeCity.Win.CalendarGrid.CalendarResizeCompletingEventArgs e)
{
if (e.Direction == Orientation.Horizontal)
{
if (((e.LayoutIndex + 1) % 2) == 0)
{
e.Handled = true;
int prevWidth = this.gcCalendarGrid.LayoutSettings.HorizontalLayoutInfo[e.LayoutIndex - 1].Length;
int currWidth = this.gcCalendarGrid.LayoutSettings.HorizontalLayoutInfo[e.LayoutIndex].Length;
int halfOffset = e.ResizeOffset / 2;
this.gcCalendarGrid.LayoutSettings.SetHorizontalLength(e.LayoutIndex - 1, prevWidth + halfOffset);
this.gcCalendarGrid.LayoutSettings.SetHorizontalLength(e.LayoutIndex, prevWidth + halfOffset);
}
}
}
Private Sub gcCalendarGrid1_ResizeCompleting(sender As Object, e As GrapeCity.Win.CalendarGrid.CalendarResizeCompletingEventArgs)
If e.Direction = Orientation.Horizontal Then
If ((e.LayoutIndex + 1) Mod 2) = 0 Then
e.Handled = True
Dim prevWidth As Integer = Me.gcCalendarGrid.LayoutSettings.HorizontalLayoutInfo(e.LayoutIndex - 1).Length
Dim currWidth As Integer = Me.gcCalendarGrid.LayoutSettings.HorizontalLayoutInfo(e.LayoutIndex).Length
Dim halfOffset As Integer = e.ResizeOffset / 2
Me.gcCalendarGrid.LayoutSettings.SetHorizontalLength(e.LayoutIndex - 1, prevWidth + halfOffset)
Me.gcCalendarGrid.LayoutSettings.SetHorizontalLength(e.LayoutIndex, prevWidth + halfOffset)
End If
End If
End Sub