void Initialize(IFactory <I> itemFactory) { Validate.ArgumentNotNull(parameter: itemFactory, parameterName: nameof(itemFactory)); this._itemFactory = itemFactory; this._selectionPattern = new SelectionImplementation <I>(uiObject: this, itemFactory: itemFactory); this._scrollPattern = new ScrollImplementation(uiObject: this); }
public ScrollChangedEventWaiter(IScroll root, ScrollProperty scrollProperty, double expectedValue) : base(new PropertyChangedEventSource(root as UIObject, Scope.Element, UIProperty.Get("Scroll." + scrollProperty.ToString()))) { Log.Comment("ScrollChangedEventWaiter - Constructor for scrollProperty={0} and expectedValue={1}.", scrollProperty.ToString(), expectedValue.ToString()); this.root = root as UIObject; this.scrollProperty = scrollProperty; this.expectedDoubleValue = expectedValue; if (!double.IsNaN(this.expectedDoubleValue)) { switch (this.scrollProperty) { case ScrollProperty.HorizontalScrollPercent: this.AddFilter(new Predicate <WaiterEventArgs>(args => root.HorizontalScrollPercent == expectedValue)); break; case ScrollProperty.HorizontalViewSize: this.AddFilter(new Predicate <WaiterEventArgs>(args => root.HorizontalViewSize == expectedValue)); break; case ScrollProperty.VerticalScrollPercent: this.AddFilter(new Predicate <WaiterEventArgs>(args => root.VerticalScrollPercent == expectedValue)); break; case ScrollProperty.VerticalViewSize: this.AddFilter(new Predicate <WaiterEventArgs>(args => root.VerticalViewSize == expectedValue)); break; } } this.Reset(); }
public ScrollableRenderTarget(Game game, int width, int height, IScrollable scrollable, IScroll scroll) : base(game) { _Width = width; _Height = height; _scrollable = scrollable; _scroll = scroll; if (_scroll != null) { _scroll.ScrollContainer = this; } Scale = 1; Alpha = 1; Color = Color.White; Culling = true; #if SILVERLIGHT BackgroundColor = Color.TransparentWhite; #else BackgroundColor = Color.Transparent; #endif PosDif = 0; MatrixInternal = Matrix.Identity; Matrix = Matrix.Identity; }
public Scroll(IScroll @base) : this((IUIElement)@base) { ColumnHeader = @base?.ColumnHeader; Clipper = @base?.Clipper; ScrollHandleBound = @base?.ScrollHandleBound; ScrollHandle = @base?.ScrollHandle; }
public Scroller(IScroll owner) { _owner = owner; if (_owner.Style.ScrollerStyle == null) { throw new NotSupportedException("Scrolling controls require a Scroller Style."); } _style = _owner.Style.ScrollerStyle; }
public void ScrollDown() { IScroll atb = fm.CurrentControl as IScroll; if (atb != null && ((Control)atb).Focused) { atb.ScrollDown(); } }
void Initialize(IFactory <I> itemFactory) { Validate.ArgumentNotNull(parameter: itemFactory, parameterName: nameof(itemFactory)); this._itemFactory = itemFactory; this._multipleViewPattern = new MultipleViewImplementation(uiObject: this); this._selectionPattern = new SelectionImplementation <I>(uiObject: this, itemFactory: itemFactory); this._tablePattern = new TableImplementation <I>(uiObject: this, itemFactory: itemFactory); this._itemContainPattern = new ItemContainerImplementation(uiObject: this); this._scrollPattern = new ScrollImplementation(uiObject: this); }
static public BotEngine.EveOnline.Interface.MemoryStruct.Scroll AsOld(this IScroll scroll) { if (scroll == null) { return(null); } return(new BotEngine.EveOnline.Interface.MemoryStruct.Scroll(scroll.AsOldUIElement()) { Clipper = scroll?.Clipper?.AsOldUIElement(), ScrollHandleBound = scroll?.ScrollHandleBound?.AsOldUIElement(), ScrollHandle = scroll?.ScrollHandle?.AsOldUIElement(), }); }
public ScrollChangedEventWaiter(IScroll root, ScrollProperty scrollProperty, bool?expectedValue) : base(new PropertyChangedEventSource(root as UIObject, Scope.Element, UIProperty.Get("Scroll." + scrollProperty.ToString()))) { Log.Comment("ScrollChangedEventWaiter - Constructor for scrollProperty={0} and expectedValue={1}.", scrollProperty.ToString(), expectedValue == null ? "null" : expectedValue.ToString()); this.root = root as UIObject; this.scrollProperty = scrollProperty; this.expectedBoolValue = expectedValue; if (this.expectedBoolValue != null) { switch (this.scrollProperty) { case ScrollProperty.HorizontallyScrollable: this.AddFilter(new Predicate <WaiterEventArgs>(args => root.HorizontallyScrollable == expectedValue)); break; case ScrollProperty.VerticallyScrollable: this.AddFilter(new Predicate <WaiterEventArgs>(args => root.VerticallyScrollable == expectedValue)); break; } } }
public static bool IsScrollable(this IScroll scroll) { return(scroll?.ScrollHandle?.Region.Height() < scroll?.ScrollHandleBound?.Region.Height() - 4); }