The end user should be able to specify what Cursor to be used while resizing a panel.
Currently this can be achieved using the custom control below:
public class MyRadSplitContainer : RadSplitContainer
{
private bool isResizing;
public override string ThemeClassName
{
get
{
return typeof(RadSplitContainer).FullName;
}
}
protected override void OnMouseDown(MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && this.ContentRectangle.Contains(e.Location))
{
SplitterElement splitter = GetSplitterElementAtPoint(e.Location);
if (splitter != null && !splitter.Fixed)
{
this.isResizing = true;
}
base.OnMouseDown(e);
}
}
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
this.isResizing = false;
}
public override Cursor Cursor
{
get
{
Cursor cursor = base.Cursor;
if (this.isResizing && cursor == Cursors.SizeWE)
{
cursor = Cursors.VSplit;
}
else if (this.isResizing && cursor == Cursors.SizeNS)
{
cursor = Cursors.HSplit;
}
return cursor;
}
set
{
if (value == Cursors.VSplit)
{
value = Cursors.SizeWE;
}
else if (value == Cursors.HSplit)
{
value = Cursors.SizeNS;
}
base.Cursor = value;
}
}
}