473,405 Members | 2,310 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,405 software developers and data experts.

WPF Control Event List?

Probably a simple beginner question, but...
In VS 2008, C# WPF Windows Project: how to find the event list associated
with a given control that has been placed on the form? I note that the
"traditional" double-click the control instance produces the default event
procedure shell, but how/where to find the event list for that control to
create a shell for a non-default event?

Seems it should be a basic feature, but darned if I can find it.

Sep 11 '08 #1
5 2578
I know, bad form to reply to one's self, but I note that SP1 adds the events
button to the Properties Window.

But, how to do it in VS 2008 *without* SP1? I have classrooms and labs of VS
2008 istallations, and it's not feasible to re-image all the boxes in the
middle of a semester.


Sep 11 '08 #2
PvdG42 wrote:
I know, bad form to reply to one's self, but I note that SP1 adds the
events button to the Properties Window.

But, how to do it in VS 2008 *without* SP1? I have classrooms and labs
of VS 2008 istallations, and it's not feasible to re-image all the boxes
in the middle of a semester.
You don't. :-)

Events are generally used in WPF when you're writing custom controls.
Look into WPF commands for more information.

Alun Harford
Sep 11 '08 #3
"Alun Harford" <de*****@alunharford.co.ukwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>
You don't. :-)

Events are generally used in WPF when you're writing custom controls. Look
into WPF commands for more information.

Alun Harford

Really? Perhaps you could enlighten me further by providing a link or two to
articles on the subject, and explain why the events button was put back in
the properties window as part of SP1?

Sep 12 '08 #4
PvdG42 wrote:
"Alun Harford" <de*****@alunharford.co.ukwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>>
You don't. :-)

Events are generally used in WPF when you're writing custom controls.
Look into WPF commands for more information.

Really? Perhaps you could enlighten me further by providing a link or
two to articles on the subject, and explain why the events button was
put back in the properties window as part of SP1?
The MSDN documentation is pretty good, at:

http://msdn.microsoft.com/en-us/library/ms752308.aspx

In WinForms, if you want 'button-like' behaviour, you would attach to
the click event. In WPF, you re-template a button and set its command
property. This prevents coupling between the UI and the business logic
that runs when you click the button.

Unfortunately, a lot of the stuff in the VS designer (Cider) appears to
be in there because MSFT is very reluctant to make massive sweeping
changes to their programming model. Now that they have, somebody seems
to want to make the commercial decision to try to make it work 'like
WinForms' (much as they did with the webforms designer). For the same
reason, UserControls exist in WPF (and the designer somewhat encourages
their use) but you *really* don't want to use them.

I really hope MSFT will refocus Cider more towards helping developers
make a UI representation of their model and less towards trying to
bridge the gap between WinForms and WPF.

Alun Harford
Sep 13 '08 #5
"Alun Harford" <de*****@alunharford.co.ukwrote in message
news:uN**************@TK2MSFTNGP03.phx.gbl...
PvdG42 wrote:
>"Alun Harford" <de*****@alunharford.co.ukwrote in message
news:uD**************@TK2MSFTNGP03.phx.gbl...
>>>
You don't. :-)

Events are generally used in WPF when you're writing custom controls.
Look into WPF commands for more information.

Really? Perhaps you could enlighten me further by providing a link or two
to articles on the subject, and explain why the events button was put
back in the properties window as part of SP1?

The MSDN documentation is pretty good, at:

http://msdn.microsoft.com/en-us/library/ms752308.aspx

In WinForms, if you want 'button-like' behaviour, you would attach to the
click event. In WPF, you re-template a button and set its command
property. This prevents coupling between the UI and the business logic
that runs when you click the button.

Unfortunately, a lot of the stuff in the VS designer (Cider) appears to be
in there because MSFT is very reluctant to make massive sweeping changes
to their programming model. Now that they have, somebody seems to want to
make the commercial decision to try to make it work 'like WinForms' (much
as they did with the webforms designer). For the same reason, UserControls
exist in WPF (and the designer somewhat encourages their use) but you
*really* don't want to use them.

I really hope MSFT will refocus Cider more towards helping developers make
a UI representation of their model and less towards trying to bridge the
gap between WinForms and WPF.

Alun Harford

Thanks very much for taking the time to start my enlightenment process. It's
amazing what books that claim to address WPF *don't* tell you :-)

Sep 14 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Chelimsky | last post by:
I'd like to access a list of the delegates attached to an Event on a Control. I know how to get it from a custom event and delegate - using GetInvocationList() from the Event - but I can't get a...
11
by: trinitypete | last post by:
Hi all, I have a user control that uses control literal to build a heading with a link, and a div containing links below. As the link heading is hit, I want to change the style of the div,...
12
by: Aaron Prohaska | last post by:
I have been trying to figure out how to make the property values of two instances of the same control synchronize during a postback and need some help. I have posted an example of what I'm trying...
5
by: mytestemailaccount | last post by:
Hi, Hope you can help. I am relatively new to all this but would appreciate the groups help. The scenario: I am c# and asp.net to create a web application. The web page contains a user...
1
by: neil S via DotNetMonster.com | last post by:
I have a custom control with a textbox and dropdown list. The dropdown list is hidden and acts as a data source for the textbox. When the user enters text in the textbox, an onKeyup event is...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
1
by: Dave A | last post by:
I have a problem that I have boiled down to a very simple example. I have a user control that displays a some data from a business object. On one screen I have a collection of these business...
13
by: mirandacascade | last post by:
I want to set things up such that a section of code will have been executed by the time one clicks on the drop down arrow on a combo box control. Currently, that section of code resides in the...
6
by: HillBilly | last post by:
One question I have not figured out is how to learn which event parameter list is supported by a control? EventArgs, CommandEventArgs, what?
0
by: Hillbilly | last post by:
ItemBuilderWizard Step0_ItemTitle and Step2_ItemDescripton contain two TextBoxes and I've done some validation for those TextBoxes in an SelectedIndexChanged event handler that sets the...
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: 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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.