Esempio n. 1
0
        private void BringChainIntoView(TimeLineItemControl first, TimeLineItemControl last, int direction)
        {
            Double l1 = 0;
            Double l2 = 0;
            Double w = 0;
            Double w2 = 0;
            Double end = 0;
            first.GetPlacementInfo(ref l1, ref w, ref end);
            last.GetPlacementInfo(ref l2, ref w2, ref end);
            Double chainW = end - l1;
            Double leadBuffer = 4 * UnitSize;
            chainW += leadBuffer;
            if (direction > 0)
            {

                first.BringIntoView(new Rect(new Point(0, 0), new Point(chainW, Height)));
            }
            else
            {
                first.BringIntoView(new Rect(new Point(-leadBuffer, 0), new Point(chainW, Height)));
            }
        }