예제 #1
0
        protected override VisualGroup UpdateVisual(IRenderContext context, VisualGroup oldVisual, IStripe stripe)
        {
            IRectangle layout      = stripe.Layout.ToRectD();
            var        rect        = CanvasControl.GetCanvasControlArrangeRect(oldVisual);
            var        arrangeRect = layout.ToRectD();

            if (rect.Width != arrangeRect.Width || rect.Height != arrangeRect.Height)
            {
                GeneralPath outline = CreatePath(stripe, layout);
                var         oldPath = (Path)oldVisual.Children[0];
                outline.UpdatePath(oldPath, StripeDescriptor.BackgroundBrush,
                                   new Pen(StripeDescriptor.BorderBrush, StripeDescriptor.BorderThickness.Left),
                                   null, FillMode.Always);
            }
            oldVisual.SetCanvasArrangeRect(arrangeRect);
            return(oldVisual);
        }