I want to make a ColorPicker userControl, and put inside a window.
When the user click in any rectangle of the usercontrol, then I want to return this information to the Window. How can I do this please? Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Your Color Picker UserControl has to implement an event that is raised every time the user clicks on one of the rectangles of the UserControl. If you don’t know how to implement an event, just comment this answer and I give you an example.
Here is the example: You declare your own event args (if needed) to provide some information in the event:
In your usercontrol you declare the event:
In some condition you raise the event in this way (the thread-safe way:
In your form you subscribe the event:
And in the event routine you do your desired action:
Hope that helps…