Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (30 sloc) 975 Bytes
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using GG.Libraries;
namespace GG.UserControls
{
/// <summary>
/// Interaction logic for CenterArea.xaml
/// </summary>
public partial class CenterArea : UserControl
{
public CenterArea()
{
InitializeComponent();
}
private void GridSplitterDragCompleted(object sender, DragCompletedEventArgs e)
{
MakeGridSplitterToSnapToGrid();
}
private void MakeGridSplitterToSnapToGrid()
{
// We want the grid splitter to snap in grid of 24 units.
var excess = (int) ChangesetHistoryRowDefinition.Height.Value % 24;
if (excess == 0)
return;
ChangesetHistoryRowDefinition.Height = new GridLength(ChangesetHistoryRowDefinition.Height.Value - excess);
}
}
}