[DefaultValue(typeof(CollapPanel), "1")]
public CollapPanel CollapPanel
{
get { 违停扣几分return _collapPanel; }
t
{
if (_collapPanel != value)
{
Expand();
_collapPanel = value;
}
}
}
重写OnMouMove方法:
protected override void OnMouMove(MouEventArgs e)
{
//如果鼠标的左键没有按下,重置HistTest
玻璃海棠花if (e.Button != MouButtons.Left)
{
_histTest = HistTest.None;
}
Rectangle collapRect = CollapRect;
Point mouPoint = e.Location;
毒隐翅虫//鼠标在Button矩形里,并且不是在拖动
if (collapRect.Contains(mouPoint) &&
_histTest != HistTest.Spliter)
{
ba.Capture = fal;
SetCursor(Cursors.Hand);
MouState = ControlState.Hover;
return;
}//鼠标在分隔栏矩形里
el if (ba.SplitterRectangle.Contains(mouPoint))
{
MouState = ControlState.Normal;
//如果已经在按钮按下了鼠标或者已经收缩,就不允许拖动了
if (_histTest == HistTest.Button ||
(_collapPanel != CollapPanel.None &&
_spliterPanelState == SpliterPanelState.Collapd))
{
ba.Capture = fal;
ba.Cursor = Cursors.Default;一动不如一静
return;
}
//鼠标没有按下,设置Split光标
if (_histTest == HistTest.None &&
!ba.IsSplitterFixed)
{炒白术的功效
if (ba.Orientation == Orientation.Horizontal)
{
SetCursor(Cursors.HSplit);
}
el
{
SetCursor(Cursors.VSplit);
}武大郎炊饼
关于科学的画 return;
}
}
MouState = ControlState.Normal;
//正在拖动分隔栏
if (_histTest == HistTest.Spliter &&
!ba.IsSplitterFixed)
{
if (ba.Orientation == Orientation.Horizontal)
{
SetCursor(Cursors.HSplit);
人生没有彩排
}
el
{
SetCursor(Cursors.VSplit);
}
ba.OnMouMove(e);
return;