angularGauge1.FromValue = 0;
angularGauge1.ToValue = 500;
angularGauge1.Value = 123;
angularGauge1.SectionsInnerRadius = 0.5;
angularGauge1.Sections.Add(
new AngularSection
{
FromValue = 0,
ToValue = 125,
Fill = new SolidColorBrush(Color.FromArgb(255, 100, 200, 200)),
MinWidth = 2,
Width = 5,
});
angularGauge1.Sections.Add(
new AngularSection
{
FromValue = 126,
ToValue = 500,
Fill = new SolidColorBrush(Color.FromRgb(254, 57, 57))
});
请问这段程序如果放在winform窗口的构造函数里是有效的,而如果放在其他地方,比如onload事件,或者按钮事件触发,那除了那几个属性有效果,
Sections.Add
是无效的。