Handle event from another class.

Hello,

I'm trying to do this simple thing but it doesn't work,

Public Class Window1

Protected Friend Overridable Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click

End Sub

End Class

Public Class UIL
Inherits Window1

Protected Friend Overrides Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
MsgBox("hello")
End Sub

End Class

When i click the button, it should show the message box, but it doesn't.
I have checked that there are not events declared in the XAML part,
and i tried with Shadows or Overloads, but i still do get nothing.

Is there something wrong with the Inherits ?

Do you have any idea ?

Thank you,

[1010 byte] By [Aybe81] at [2008-2-27]
# 1

Aybe81,

I am move the thread to Visual Basic Orcas forum since the RoutedEventArgs Class is applied on .NET Framework 3.0.

Different RoutedEventArgs can be used with a single RoutedEvent. This class is responsible for packaging the event data for a RoutedEvent, providing extra event state information, and is used by the event system for invoking the handler associated with the routed event.

There are more exports on .NET Framework 3.0 and I beliebe you are able to get the satisfied answers in this forum. Thanks again for your question.

BrunoYu-MSFT at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Visual Basic Orcas...
# 2
Alright, thank you
Aybe81 at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Visual Basic Orcas...

Visual Studio Orcas

Site Classified