读书人

Rectangle 绘制的图怎么把刚绘制的图

发布时间: 2012-04-24 14:15:38 作者: rapoo

Rectangle 绘制的图,如何把刚绘制的图,固定到一个Lable上面

C# code
                        Rectangle rect = new Rectangle();                        rect.Height = 30;                        if (currentColor == 0)                        {                            currentColor = 1;                            rect.Fill = new SolidColorBrush(Colors.Black);                        }                        else                        {                            currentColor = 0;                            rect.Fill = new SolidColorBrush(Colors.White);                        }                                                //Canvas.SetLeft(rect, to.Row);                        //Canvas.SetTop(rect, currentTop);                                                                       if (outputString[i] == 't')                        {                            rect.Width = thinWidth;                            currentPos += thinWidth;                        }                        else if (outputString[i] == 'w')                        {                            rect.Width = thickWidth;                            currentPos += thickWidth;                        }//上面是画好的图,下面new一个lable  Label lb = new Label();//这里,如何把 花好的图,固定到,这个lable上


[解决办法]
固定,指的是和Label重叠到一起?
如果是,Adorner:
http://www.cnblogs.com/loveis715/archive/2012/03/31/2427734.html

读书人网 >CAD教程

热点推荐