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

  • Home
  • SEARCH
  • 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 4576464
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:12:35+00:00 2026-05-21T20:12:35+00:00

I have a winform with a wpf usercontrol on it (ElementHost1). The usercontrol contains

  • 0

I have a winform with a wpf usercontrol on it (ElementHost1). The usercontrol contains only a button. How can I know when the wpf button has been clicked in my winform? How can I “redirect” the events from wpf usercontrol to winform?

Thanks.

  • 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-05-21T20:12:36+00:00Added an answer on May 21, 2026 at 8:12 pm

    This link might be helpful to you.

    Or a simple event handling in VB.NET

    Public Event ClickMe()
    
    Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        RaiseEvent ClickMe()
    End Sub
    

    Then in your actual window you can have this:

    Public Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AddHandler SampleClick1.ClickMe, AddressOf Sample_Click
    End Sub
    
    Private Sub Sample_Click()
        MessageBox.Show("This is a proof!")
    End Sub
    

    That SampleClick1 variable is from the designer code generated available to the form for your use.

    Friend WithEvents ElementHost1 As System.Windows.Forms.Integration.ElementHost
    Friend SampleClick1 As WindowsApplication1.SampleClick
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF UserControl nested inside an ElementHost in a WinForm UserControl intended
I have a WinForm that uses an ElementHost to display a WPF UserControl. Once
I have c# winform application and one WPF user control. How i can add
I have a userControl11 (either in winform or wpf) which has a ValueChanged custom
I've only been working with WPF for a few months, but I have an
I have a WinForm UserControl inside a WPF window and the WPF code is
What is the WPF equivalent for WinForms radio button CheckedChanged? I have your basic
I have a Winform with a BackgroundWorker. The BackgroundWorker, among other things, has to
I have a winform in vs2008 that contains a DataGridView. The datagrid contains a
I have WinForm controls I want to put in a WPF DropDownButton s(Extended WPF

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.