private double GetElipsisYPos(ScrollableElement element) { if (element.ElipsisPosition == ElipsisPosition.Right) { return(this.viewPortHeight - DefaultItemSize.Height); } return(0); }
private ScrollableElement CreateItem(int index) { ScrollableElement element = new ScrollableElement(); element.Index = index; element.InitializeElement(this.dataPager.NumericButtonStyle, this.dataPager.AutoEllipsisText); this.SetBinding(element); return(element); }
private ScrollableElement CreateElipsisElement(ElipsisPosition position, int index) { ScrollableElement element = new ScrollableElement(); element.Index = index; element.IsEnsured = true; element.IsElipsisElement = true; element.ElipsisPosition = position; element.InitializeElement(this.dataPager.NumericButtonStyle, this.dataPager.AutoEllipsisText); this.SetBinding(element); return(element); }
private void SetBinding(ScrollableElement element) { var bind = new Binding(); bind.Path = new PropertyPath("HighlightThemeBrush"); bind.Source = this; bind.Mode = BindingMode.TwoWay; element.Element.SetBinding(NumericButton.HighlightingThemeBrushProperty, bind); bind = new Binding(); bind.Path = new PropertyPath("HighlightForegroundBrush"); bind.Source = this; bind.Mode = BindingMode.TwoWay; element.Element.SetBinding(NumericButton.HighlightForegroundBrushProperty, bind); }