StrataFrame Forum
Back
Login
Login
Home
»
.NET Forums
»
General .NET Discussion
»
Public Form property not shown in Property editor
Public Form property not shown in Property editor
Post Reply
Like
0
Public Form property not shown in Property editor
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Greg McGuffey
Greg McGuffey
posted 16 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 2K,
Visits: 6.6K
I have a couple of properties, both of type Color, that I added to a form. They are public properties, I've set up a Category() and Description() and added ShouldSerialize/Reset methods for them. However, I can't get them to show up in the property editor (grid). I would have sworn that there wasn't anything special to get this to work, but I'm baffled. Any ideas what I could be doing wrong?
Here's the code:
Private _passingBackColor As Color = Color.LightGreen
''' <summary>
''' Define the color used to highlight items that have passing
''' scores.
''' </summary>
<Category("RAMS: Score Formatting") _
, Description("Define the color used to highlight passing scores in the list.")> _
Public Property PassingBackColor() As Color
Get
Return _passingBackColor
End Get
Set(ByVal value As Color)
_passingBackColor = value
End Set
End Property
Private _failingBackColor As Color = Color.LightPink
''' <summary>
''' Define the color used to highlight items that have failing
''' scores.
''' </summary>
<Category("RAMS: Score Formatting") _
, Description("Define the color used to highlight failing scores in the list.")> _
Public Property FailingBackColor() As Color
Get
Return _failingBackColor
End Get
Set(ByVal value As Color)
_failingBackColor = value
End Set
End Property
''' <summary>
''' Return if the designer should serialize the PassingBackColor
''' property.
''' </summary>
''' <returns>True if property needs to be serialized to the designer</returns>
''' <remarks></remarks>
Public Function ShouldSerializePassingBackColor() As Boolean
Return _passingBackColor <> Color.LightGreen
End Function
''' <summary>
''' Reset the PassingBackColor to its default value and remove serialization
''' the property from the designer.
''' </summary>
''' <remarks></remarks>
Public Sub ResetPassingBackColor()
_passingBackColor = Color.LightGreen
End Sub
''' <summary>
''' Return if the designer should serialize the FailingBackColor
''' property.
''' </summary>
''' <returns>True if property needs to be serialized to the designer</returns>
''' <remarks></remarks>
Public Function ShouldSerializeFailingBackColor() As Boolean
Return _failingBackColor = Color.LightPink
End Function
''' <summary>
''' Reset the FailingBackColor to its default value and remove serialization
''' the property from the designer.
''' </summary>
''' <remarks></remarks>
Public Sub ResetFailingBackColor()
_failingBackColor = Color.LightPink
End Sub
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Public Form property not shown in Property editor
Greg McGuffey
-
16 Years Ago
Hey Greg. Not sure this is the cause, but I define the...
Ivan George Borges
-
16 Years Ago
Here is what works for me. <Category("Airbase: Custom...
Keith Chisarik
-
16 Years Ago
It looks correct. If you are adding the properties to a class and then...
Trent L. Taylor
-
16 Years Ago
OK, I think Trent has the answer. I didn't know that properties of a...
Greg McGuffey
-
16 Years Ago
You got it ;)
Trent L. Taylor
-
16 Years Ago
Thanks! Mystery solved! :w00t:
Greg McGuffey
-
16 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search