|
|
|
@ -117,16 +117,20 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
@@ -117,16 +117,20 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors
|
|
|
|
|
Maximum = range.Max; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (Minimum == 0 && Maximum == 1) { |
|
|
|
|
if (type == typeof(double) || type == typeof(decimal)) { |
|
|
|
|
DecimalPlaces = 2; |
|
|
|
|
SmallChange = 0.01; |
|
|
|
|
LargeChange = 0.1; |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
ClearValue(DecimalPlacesProperty); |
|
|
|
|
ClearValue(SmallChangeProperty); |
|
|
|
|
ClearValue(LargeChangeProperty); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// if (Minimum == 0 && Maximum == 1) {
|
|
|
|
|
// DecimalPlaces = 2;
|
|
|
|
|
// SmallChange = 0.01;
|
|
|
|
|
// LargeChange = 0.1;
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
// ClearValue(DecimalPlacesProperty);
|
|
|
|
|
// ClearValue(SmallChangeProperty);
|
|
|
|
|
// ClearValue(LargeChangeProperty);
|
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override void OnApplyTemplate() |
|
|
|
|