当您在VB中执行属性网格并为字段分配值(默认值除外)时,它会将其显示为粗体。但是,即使我将其设置为默认值,我也会将值显示为粗体。任何人都知道是什么导致了这个?当我使用双数据类型时似乎总是会发生。这是我的代码。我有构造类实例的属性定义和构造函数。感谢。
Private _FisheyeAngle As Double
<DataMember()>
<DisplayName("Fisheye Angle")>
<Description("This value indicates the angle used in the fisheye view, if it is enabled. The acceptable range is 45 to 360 degrees with 180 degrees being the default. ")>
<DefaultValue(180)>
Public Property FisheyeAngle As Double
Get
Return _FisheyeAngle
End Get
Set(value As Double)
If value < 45 Then
_FisheyeAngle = 45
ElseIf value > 360 Then
_FisheyeAngle = 360
Else
_FisheyeAngle = value
End If
End Set
End Property
Private Sub Initialize()
Width = 800
Height = 600
FisheyeAngle = 180
ToneCompressionRate = 1
End Sub