public override void OnRender(DrawingContext dc)
        {
            base.OnRender(dc);

            if (IsSelected)
            {
                if (selectionBackgroundImage != null)
                    dc.Scale9Image(0, 0, ActualWidth, ActualHeight, selectionBackgroundImage, 0, 0, 0, 0, opacity);
            }
        }
Пример #2
0
        public override void OnRender(DrawingContext dc)
        {
            base.OnRender(dc);

            if (background != null)
                dc.Scale9Image(0, 0, ActualWidth, ActualHeight, background, 0, 0, 0, 0, opacity);
            if (border != null)
                dc.DrawRectangle(null, border, 0, 0, ActualWidth, ActualHeight);
        }