|
-
Aug 19th, 2008, 08:11 PM
#1
-
Aug 19th, 2008, 10:36 PM
#2
Re: Making a usercontrol property editable at design time?
vb.net Code:
Imports System.ComponentModel
Public Class UserControl1
Private _b As New List(Of Beer)
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content), _
Description("A list of beers is better than just one."), _
Browsable(True)> _
Public Property Beers() As List(Of Beer)
Get
Return _b
End Get
Set(ByVal value As List(Of Beer))
_b = value
End Set
End Property
End Class
Public Class Beer
Public Enum Tastiness
Keystone
Coors
Guiness
End Enum
Private _name As String = Nothing
Private _tastiness As Tastiness = Nothing
Public Property TastinessLevel() As Tastiness
Get
Return _tastiness
End Get
Set(ByVal value As Tastiness)
_tastiness = value
End Set
End Property
Public Property Name() As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property
End Class
This works for me. I found this doc helpful in this instance: http://msdn.microsoft.com/en-us/libr...attribute.aspx
-
Aug 20th, 2008, 04:01 PM
#3
Re: Making a usercontrol property editable at design time?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 20th, 2008, 04:07 PM
#4
Re: [RESOLVED] Making a usercontrol property editable at design time?
hmm but i guess a question that remains is how to you figure out if the property was updated? (it if an item was added to the List ?)
(I need to update the UI items based on what's in that List collection)
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 20th, 2008, 08:04 PM
#5
Re: [RESOLVED] Making a usercontrol property editable at design time?
 Originally Posted by MrPolite
hmm but i guess a question that remains is how to you figure out if the property was updated? (it if an item was added to the List ?)
(I need to update the UI items based on what's in that List collection)
I'm unsure on this. I'll need to research further. In the meantime, this looks like an interesting set of articles: http://amrelsehemy.net/post/2008/01/...ttributes.aspx
Last edited by nmadd; Aug 20th, 2008 at 08:31 PM.
-
Aug 25th, 2008, 01:39 PM
#6
Re: [RESOLVED] Making a usercontrol property editable at design time?
hmm thanks again
i can't think of any easy way to do this 
do i need to make my own custom List<> class that would raise an event when someone adds/remove items?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Aug 25th, 2008, 10:07 PM
#7
Frenzied Member
Re: [RESOLVED] Making a usercontrol property editable at design time?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|