回复 16楼hyx_2014的帖子
请测试这种方法能否满足你的需求:
- void c1pg_PropertyBoxesLoaded(object sender, EventArgs e)
- {
- for (int i = 0; i < c1pg.PropertyBoxes.Count; i++)
- {
- (c1pg.PropertyBoxes[i].CurrentEditor as Control).BorderThickness = new Thickness(0.0d);
- if (i==6)
- {
- BrushEditor be = c1pg.PropertyBoxes[i].CurrentEditor as BrushEditor;
- be.SelectedColor = Color.FromArgb(255, 255, 255, 255);
- be.LostFocus += be_LostFocus;
- }
- }
- }
- void be_LostFocus(object sender, RoutedEventArgs e)
- {
- BrushEditor be = sender as BrushEditor;
- be.SelectedColor = Color.FromArgb(255, 255, 255, 255);
- be.LostFocus += be_LostFocus;
- }
复制代码 |