DependencyObject.RemoveHandler(DependencyProperty, Object) 메서드


연결된 EventHandler에서 DependencyProperty를 제거합니다.Removes an EventHandler from an associated DependencyProperty.

 void RemoveHandler(System::Workflow::ComponentModel::DependencyProperty ^ dependencyEvent, System::Object ^ value);
public void RemoveHandler (System.Workflow.ComponentModel.DependencyProperty dependencyEvent, object value);
member this.RemoveHandler : System.Workflow.ComponentModel.DependencyProperty * obj -> unit
Public Sub RemoveHandler (dependencyEvent As DependencyProperty, value As Object)

매개 변수


이 속성 값을 나타내는 Object입니다.The Object that represents the value of this property. 이 경우 Delegate 형식입니다.In this case, a Delegate type.


인수 중 하나가 null 참조(Visual Basic의 경우 Nothing)인 경우Either of the arguments is a null reference (Nothing in Visual Basic).

dependencyEventmetaproperty입니다.The dependencyEvent is a metaproperty.


dependencyEvent가 이벤트가 아닌 경우The dependencyEvent is not an event.

valueActivityBind이고 이 인스턴스가 DesignMode에 없는 경우The value is a ActivityBind and this instance is not in DesignMode.


처리기는 다음 코드를 사용하여 추가 및 제거됩니다.Handlers are added and removed using the following code. 자세한 내용은 전자 메일 보내기 활동 샘플합니다.For more information, see Send Email Activity Sample.

#region Public Events

[Description("The SendingEmail event is raised before an email is sent through SMTP.")]
public event EventHandler SendingEmail
        base.AddHandler(SendEmailActivity.SendingEmailEvent, value);
        base.RemoveHandler(SendEmailActivity.SendingEmailEvent, value);

#Region "Public Events"

        <DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
        <Description("The SendingEmail event is raised before an email is sent through SMTP.")> _
        <Category(EventsCategory)> _
        <Browsable(True)> _
        Public Custom Event SendingEmail As EventHandler
            AddHandler(ByVal value As EventHandler)
                MyBase.AddHandler(SendEmailActivity.SendingEmailEvent, value)
            End AddHandler

            RemoveHandler(ByVal value As EventHandler)
                MyBase.RemoveHandler(SendEmailActivity.SendingEmailEvent, value)
            End RemoveHandler

            RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs)

            End RaiseEvent
        End Event


이벤트 대리자를 제거하는 데 편리한 직접적인 방법으로 제공됩니다.Provided as a convenient direct method for removing an event delegate.

대리자를 만드는 경우 이벤트를 처리할 메서드를 결정합니다.When you create a delegate, you identify the method that will handle the event. 이벤트를 이벤트 처리기와 연결하려면 대리자의 인스턴스를 해당 이벤트에 추가합니다.To associate the event with your event handler, add an instance of the delegate to the event. 대리자를 제거하지 않으면 이벤트가 발생할 때마다 이벤트 처리기가 호출됩니다.Unless you remove the delegate, the event handler is called whenever the event occurs. 이벤트 처리기 대리자에 대 한 자세한 내용은 참조 하세요. 이벤트 처리 및 발생합니다.For more information about event-handler delegates, see Handling and Raising Events.

적용 대상