S
shapper
Hello,
I have a property of type System.Drawing.Color in a custom control:
<Bindable(True), Category("Layout"), DefaultValue(""),
Localizable(True)> Property BColor() As Drawing.Color
Get
If CStr(ViewState("BColor")) Is Nothing Then
Return Drawing.Color.White
Else
Return Drawing.Color.Parse(CStr(ViewState("BColor"))) End If
End Get
Set(ByVal Value As Drawing.Color)
ViewState("BColor") = Value
End Set
End Property
My problem is in line where I placed the word "ERROR".
If the property would be of type integer I would do:
Integer.Parse(CStr(ViewState("BColor")))
How can I solve this?
Thanks,
Miguel
I have a property of type System.Drawing.Color in a custom control:
<Bindable(True), Category("Layout"), DefaultValue(""),
Localizable(True)> Property BColor() As Drawing.Color
Get
If CStr(ViewState("BColor")) Is Nothing Then
Return Drawing.Color.White
Else
Return Drawing.Color.Parse(CStr(ViewState("BColor"))) End If
End Get
Set(ByVal Value As Drawing.Color)
ViewState("BColor") = Value
End Set
End Property
My problem is in line where I placed the word "ERROR".
If the property would be of type integer I would do:
Integer.Parse(CStr(ViewState("BColor")))
How can I solve this?
Thanks,
Miguel