/// <summary> /// Scrolls left within content by one logical unit. /// </summary> public void LineLeft() { if (_childScrollInfo == null) { return; } _childScrollInfo.LineLeft(); }
void IScrollInfo.LineLeft() { if (scrollInfo != null) { scrollInfo.LineLeft(); } }
void IScrollInfo.LineLeft() { IScrollInfo realImplementation = Content as IScrollInfo; if (realImplementation != null) { realImplementation.LineLeft(); } else { throw new NotImplementedException(); } }
protected override Script.IScriptCommand executeInner(ParameterDic pm, Control sender, RoutedEventArgs evnt, IUIInput input, IList <IUIInputProcessor> inpProcs) { var scp = ControlUtils.GetScrollContentPresenter(sender); if (input != null) { Point posRelToScp = pm.GetValue <Point>(CurrentRelativePositionKey); IScrollInfo isInfo = UITools.FindVisualChild <Panel>(scp) as IScrollInfo; if (isInfo != null) { if (isInfo.CanHorizontallyScroll) { if (posRelToScp.X < 0) { isInfo.LineLeft(); } else if (posRelToScp.X > (isInfo as Panel).ActualWidth) { isInfo.LineRight(); } } if (isInfo.CanVerticallyScroll) { if (posRelToScp.Y < 0) { isInfo.LineUp(); } else if (posRelToScp.Y > (isInfo as Panel).ActualHeight) //isInfo.ViewportHeight is bugged. { isInfo.LineDown(); } } } } return(NextCommand); }