473,387 Members | 1,561 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to raise a cutom event

I have a Custom method and i wnat fire it when i change time:

Private Sub TimeQuery_SelectedTimeChanged(sender As System.Object, e As System.Windows.Controls.SelectionChangedEventArgs)

added the handler :
AddHandler queryfield.SelectedTimeChanged, AddressOf TimeQuery_SelectedTimeChanged

in Timepicker class i write handler

Public Custom Event SelectedTimeChanged As TimeSelectedChangedEventHandler
AddHandler(ByVal value As TimeSelectedChangedEventHandler)
[AddHandler](SelectedTimeChangedEvent, value)
End AddHandler
RemoveHandler(ByVal value As TimeSelectedChangedEventHandler)
[RemoveHandler](SelectedTimeChangedEvent, value)
End RemoveHandler
' RaiseEvent(ByVal sender As Object, ByVal value As TimeSelectedChangedRoutedEventArgs)
RaiseEvent(ByVal sender As Object, ByVal e As TimeSelectedChangedRoutedEventArgs)
End RaiseEvent
End Event
#End Region

this is the delegate
Public Delegate Sub TimeSelectedChangedEventHandler(ByVal sender As Object, ByVal e As TimeSelectedChangedRoutedEventArgs)

so this is my code now in XAML file i have a datePickercontrol(Custom control) and when i change the date TimeQuery_SelectedTimeChanged method suppose to raise but cant raise it can anybody help me?
Thanks in advance
Shankar
Apr 5 '12 #1
0 846

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dan Cimpoiesu | last post by:
I have a remoting object, derived from MarshalByRefComponent, that I instantiate on the client side, with Activator.GetObject. Can I receive events fired on the server, on the client? How?
6
by: Tim Westmoreland | last post by:
Can someone tell me how to raise an event or trap when the maxlength of a server side textbox has been reached?
4
by: Charles Law | last post by:
Suppose a worker thread needs to signal to the main thread that an event has occurred. Ordinarily, any event raised by the worker thread will be on its own thread. How can the worker thread...
12
by: Vittorio Pavesi | last post by:
Hello, is it possible to manually raise the event Elapsed of the timer object ? Vittorio
5
by: Just Me | last post by:
Often I have a problem like the following: .. This is the way I think things happen is: If the usercontrol raises the event when it is first created (I.e., in it's New, or in it's Enter event,...
12
by: Benny Raymond | last post by:
I understand that you would normally want to raise an event on the same thread so that your code blocks until the event has been dealt with... however i've run into a situation where I have a...
3
by: =?Utf-8?B?Ulc=?= | last post by:
I constructed a new Class with some private members. I would like an event to be raised on the moment the value of one of those private members is changed. How do I define an event for that...
5
by: Mike | last post by:
Hi group; Let say I have an object called Account, that raises an event called AccountLow with its owns EventArgs, and when this event gets raised, I will like to raise another custom...
2
by: Sin Jeong-hun | last post by:
Suppose class Engine do something in another thread and raise events. class Engine { Thread Worker; public event ... EngineMessage; public void Start() { Worker=new Thread(new...
2
by: Alan Adolphe | last post by:
Hi, I have converted C# code to vb.net using the online converter tools. One error messages I can't seem to figure out. Any ideas or help is appreciated. Public Sub New() ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.