User Control Properties Missing
I have some user controls I created using Sitefinity 3.7 and have custom properies which worked under 3.7.
In 4.0 when I edit the control's properties, I do not see any of the customer properties visible.
In the example below the property MaximumDynamicDisplayLevels does not show on the properties page.
Here is my code:
Partial Class UserControls_ETG_ETGMenu
Inherits System.Web.UI.UserControl
Protected Sub Menu1_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemDataBound
e.Item.Text = UCase(e.Item.Text)
'Select the current page.
If LCase(ResolveUrl(e.Item.NavigateUrl)) = LCase(Request.Url.AbsolutePath) Then
e.Item.Selectable = True
e.Item.Selected = True
End If
End Sub
<System.ComponentModel.Browsable(True)> _
<System.ComponentModel.Category("Behavior")> _
Public Property MaximumDynamicDisplayLevels() As Integer
Get
'Get property.
Return Menu1.MaximumDynamicDisplayLevels
End Get
Set(ByVal value As Integer)
'Set property.
Menu1.MaximumDynamicDisplayLevels = value
End Set
End Property
End Class
Hi JGarland,
I am not able to replicate this issue with MaximumDynamicDisplayLevels property from your code and testing under the latest official release of Sitefinity.
Kind regards,
Ivan Dimitrov
the Telerik team
I have tested this on my development workstation and a production server. The custom properties do not show up.
I am running Sitefinity 4.0.1210.0
Attached is a screen shot of the properties window.
Just installed 4.1.1339.0 and custom properties are still missing
Ok mystery solved, sorta.
The custom properties can only be of type string. Integers or anything else do not work.
I will go ahead and change all my custom properties to string for the time being.
Hi JGarland,
You can show properties of different type, but they are represented only with a text box in the advanced tab of the control designer. I created a property of type ViewStateMode (enum) and it is correctly shown. Please take a look at attached video.
Kind regards,
Ivan Dimitrov
the Telerik team