public virtual ObjectState CalcCustomButtonState(LayoutViewDrawArgs e, int iCurrentHitTest) { ObjectState state = ObjectState.Normal; if (e.ViewInfo.SelectionInfo.HotTrackedInfo != null && (int)e.ViewInfo.SelectionInfo.HotTrackedInfo.HitTest == iCurrentHitTest) { state |= ObjectState.Hot; } return(state); }
protected virtual void PrepareCustomButtons(LayoutViewDrawArgs e, List <ButtonInfo> buttons) { LayoutViewCustomButton CurrentView = View as LayoutViewCustomButton; if (CurrentView == null) { return; } foreach (CustomViewButton item in CurrentView.ButtonsCollection) { if (item.Bounds != Rectangle.Empty) { ButtonInfo buttonInfo = new ButtonInfo(item.Bounds, item.Image); buttonInfo.State = CalcCustomButtonState(e, item.GetHashCode()); buttons.Add(buttonInfo); } } }