Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8869719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:32:57+00:00 2026-06-14T17:32:57+00:00

I have a user control that has some public properties (like Dirty :boolean) and

  • 0

I have a user control that has some public properties (like Dirty :boolean) and an event (ControlValueChanged) that change that property.
I added that control to a form. In the form I have a button (btnOK) and I want to bind the property Enabled of the button to the Dirty property.
I read http://msdn.microsoft.com/en-us/library/ms229614.aspx but I face some problems to implement this to my project.
My code in the form:

btnOK.DataBindings.Add("Enabled", Me.wwdp, "Dirty") 'wwdp is my user Control

So from my research I have to add in my custom control:

Imports System.ComponentModel

Public Class wwDynamicPanel

Implements INotifyPropertyChanged

Public Event PropertyChanged As PropertyChangedEventHandler _
    Implements INotifyPropertyChanged.PropertyChanged


 Public Property Dirty As Boolean
    Get
        Return mbDirty
    End Get
    Set(ByVal value As Boolean)
        mbDirty = value
        NotifyPropertyChanged()
    End Set

End Property

Private Sub NotifyPropertyChanged(<CallerMemberName()> Optional ByVal propertyName As String = Nothing)
    RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propertyName))
End Sub

I get an error : Type ‘CallerMemberName’ is not defined.
The thing is that I haven’t found in msdn anything more.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:32:58+00:00Added an answer on June 14, 2026 at 5:32 pm

    I am very sorry. The link in MSDN was for framework 4.5
    I found the right http://msdn.microsoft.com/en-us/library/ms184414(v=vs.100).aspx. for my framework
    and I solved the problem.
    I am leaving the question because someone else find it useful.
    So the working code is:

    Imports System.ComponentModel
    
    Public Class wwDynamicPanel
    
    Implements INotifyPropertyChanged
    
    Public Event PropertyChanged As PropertyChangedEventHandler _
       Implements INotifyPropertyChanged.PropertyChanged
    
    
    Public Property Dirty As Boolean
       Get
          Return mbDirty
       End Get
       Set(ByVal value As Boolean)
          mbDirty = value
          NotifyPropertyChanged("Dirty")
       End Set
    End Property
    
    Private Sub NotifyPropertyChanged(ByVal info As String)
         RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control that has a few public properties, one is an
I am working on a user control that has some dependency properties, namely; public
I have an abstract user control(baseModule) that has a property that I plan on
I have built a user control (ctlToolbarEdit) that has some buttons on it -
I have a user control that contains a GridView. The GridView has both a
I have a complex page that has several user controls like galleries, maps, ads
I have an User Control that host another controls like panel, chart controls. Right
I have a web user control, that has a table with 3 columns 1)
I have a page that has a bunch of user controls on it. I
I have a UserControl that has a BaseClass object as a public member. Right

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.