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;
}
}
}
The scenario that we want to cover is to disable resizing the split panels but still enable the option for expanding/collapsing them via the buttons.
Workaround: check the attached project
Add right to left support. This should be the same as in the standard split container – the panels should be swapped.
Add functionality to collapse and expand the split panels in RadSplitContainer by buttons positioned in the splitter area just like ASP.NET. See example here: http://demos.telerik.com/aspnet-ajax/splitter/examples/collapseexpand/defaultcs.aspx
This allows a linked SplitPanels to be dynamically expanded and collapsed by clicking on the splitter button, and resized by dragging the splitter.