回复 1楼lucklyme的帖子
设计时,使用designer添加的步骤如下:
1. In the Item Editor, expand the Filling node within the Pointer node, and set the Color property to Black.
2. Expand the Filling node within the Cap node, and set the Color property to DarkGray.
3. Click the ellipsis button next to FaceShapes. The FaceShapes Collection Editor opens.
4. Click the Add drop-down arrow and select C1GaugeCaption.
5. Enter C1Gauge next to the Text property.
6. Set the Color property to Red.
7. Enter .9 next to the CenterPointY property. This will move the text down the gauge.
8. Click OK to close the FaceShapes Collection Editor and click OK again to close the Item Editor.
运行时,代码参考如下:
- using C1.Win.C1Gauge;
-
- private void button1_Click(object sender, System.EventArgs e)
- {
- C1GaugeCaption cap = C1GaugeCaption();
- cap.Text = "Hello, I’m a caption.";
- cap.CenterPointX = 0.5;
- cap.CenterPointY = 0.2;
- cap.FontSize = 8;
- cap.Color = Color.DarkSlateBlue;
-
- //C1RadialGauge1.FaceShapes.Add(cap);
- C1Gauge1.CoverShapes.Add(cap);
- }
复制代码 |