Rectangle 绘制的图,如何把刚绘制的图,固定到一个Lable上面
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上