Hello everyone,
I have a control which inherits from another control. I added a contextual
menu to the new control. To this new control, I added a Boolean property.
This property enables me to make visible or not one of the elements of my
contextual menu. By default, the property is allways set to False. For a
reason which I does not understand, even if I do Control.VisibleSave = True,
the property does not change at all. It remains to False. Here the code of
my control. Can somebody explain me why my property does not change?
Public Class PAIWinGrid
Inherits Infragistics.Win.UltraWinGrid.UltraGrid
Friend WithEvents mnuSave As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Dim Appearance1 As Infragistics.Win.Appearance = New
Infragistics.Win.Appearance
Me.ctxMenu = New System.Windows.Forms.ContextMenu
Me.mnuSave = New System.Windows.Forms.MenuItem
ctxMenu().MenuItems.AddRange(New System.Windows.Forms.MenuItem()
{mnuSave})
Me.mnuEnregistrer.Text = "Save"
<Description("Indicate if the Save menu is visible or not."),
Category("Apparence"), DefaultValue(False)> _
Public Property VisibleSave() As Boolean
Get
Return mnuSave .Visible
End Get
Set(ByVal Value As Boolean)
mnuSave .Visible = Value
End Set
End Property
If I do Control.VisibleSave = True, the property don't change to True. Can
somebody explain me why my property does not change? What I do wrong ?