代码之家  ›  专栏  ›  技术社区  ›  jgallant

中的数据绑定用户控件。网

  •  2
  • jgallant  · 技术社区  · 16 年前

    我正在寻找一些关于如何在用户创建的控件上正确实现数据绑定的信息。

    My UserControl包含一个文本框、一个按钮和一个MonthCalendar。我能够将数据绑定到用户控件内的Textbox,但是,我想在UserControl本身上实现数据绑定,而不是引用控件内的文本框。

      <System.ComponentModel.Bindable(True)> _
    Public Property BoundDate() As DateTime
        Get
          Return _currentSelectedDate
        End Get
        Set(ByVal value As DateTime)
          SetDateTime(value, True)
        End Set
      End Property
    

    编辑

    1 回复  |  直到 16 年前
        1
  •  0
  •   matt eisenberg    16 年前

    1. 您是否在boundDate属性中设置了update_boundDate

    This looks like a pretty good read, although I haven't looked at it myself

    推荐文章