示例#1
0
 private double GetElipsisYPos(ScrollableElement element)
 {
     if (element.ElipsisPosition == ElipsisPosition.Right)
     {
         return(this.viewPortHeight - DefaultItemSize.Height);
     }
     return(0);
 }
示例#2
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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }