Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Where is a control's parameter list documented?

Reply
 
Old 08-16-2008   #1 (permalink)
HillBilly


 
 

Where is a control's parameter list documented?

One question I have not figured out is how to learn which event parameter
list is supported by a control? EventArgs, CommandEventArgs, what?


My System SpecsSystem Spec
Old 08-17-2008   #2 (permalink)
Jack Jackson


 
 

Re: Where is a control's parameter list documented?

On Sat, 16 Aug 2008 16:04:23 -0500, "HillBilly"
<somebody@xxxxxx> wrote:
Quote:

>One question I have not figured out is how to learn which event parameter
>list is supported by a control? EventArgs, CommandEventArgs, what?
I'm not sure I understand your question. I don't think the list of
all event parameters used by a control is a useful thing to know.

A control raises some number of events. When the handler for an event
is called, an event parameter is passed. Each event has a specific
parameter type.

If you want to know which parameter a specific event uses, you can
either look it up in the documentation, or code the parameter as
something clearly illegal like 'string' and the compiler error message
will tell you what is expected (unless you are using VB with OPTION
STRICT OFF, in which case you need to bit the bullet and change to
OPTION STRICT ON).
My System SpecsSystem Spec
Old 08-18-2008   #3 (permalink)
HillBilly


 
 

Re: Where is a control's parameter list documented?

"Jack Jackson" <jjackson@xxxxxx> wrote in message
news:30tga4tp4evreln5792cde9nj7rg63ggvg@xxxxxx
Quote:

> On Sat, 16 Aug 2008 16:04:23 -0500, "HillBilly"
> <somebody@xxxxxx> wrote:
>
Quote:

>>One question I have not figured out is how to learn which event parameter
>>list is supported by a control? EventArgs, CommandEventArgs, what?
>
> I'm not sure I understand your question. I don't think the list of
> all event parameters used by a control is a useful thing to know.
>
> A control raises some number of events. When the handler for an event
> is called, an event parameter is passed. Each event has a specific
> parameter type.
>
> If you want to know which parameter a specific event uses, you can
> either look it up in the documentation, or code the parameter as
> something clearly illegal like 'string' and the compiler error message
> will tell you what is expected (unless you are using VB with OPTION
> STRICT OFF, in which case you need to bit the bullet and change to
> OPTION STRICT ON).
Looking --it-- up in documentation is the task I'm trying to determine Jack.
Here and there I see a parameter list mentioned in he documentation; not
clearly identified as such and then not consistently as every event of every
method appears to support at least two parameters. Since there are different
parameter names and types I've remained uninformed and have relied on
Intellisense to give me some kind of clue but not much can be inferred from
Intellisense.

It would be very useful IMO if this context of passing arguments using
parameters were documented better as clearly the construct is fundamental to
the method or it would not be used at all so why not then expound on the
scope of the types we may only infer by reading some arbitrary name; and an
arbitrary name that does not lead anywhere specific in the current
documentation as my meager attempts to find have failed to produce in any
circumstance but accidently.

My System SpecsSystem Spec
Old 08-18-2008   #4 (permalink)
Jack Jackson


 
 

Re: Where is a control's parameter list documented?

On Mon, 18 Aug 2008 09:51:09 -0500, "HillBilly"
<somebody@xxxxxx> wrote:
Quote:

>"Jack Jackson" <jjackson@xxxxxx> wrote in message
>news:30tga4tp4evreln5792cde9nj7rg63ggvg@xxxxxx
Quote:

>> On Sat, 16 Aug 2008 16:04:23 -0500, "HillBilly"
>> <somebody@xxxxxx> wrote:
>>
Quote:

>>>One question I have not figured out is how to learn which event parameter
>>>list is supported by a control? EventArgs, CommandEventArgs, what?
>>
>> I'm not sure I understand your question. I don't think the list of
>> all event parameters used by a control is a useful thing to know.
>>
>> A control raises some number of events. When the handler for an event
>> is called, an event parameter is passed. Each event has a specific
>> parameter type.
>>
>> If you want to know which parameter a specific event uses, you can
>> either look it up in the documentation, or code the parameter as
>> something clearly illegal like 'string' and the compiler error message
>> will tell you what is expected (unless you are using VB with OPTION
>> STRICT OFF, in which case you need to bit the bullet and change to
>> OPTION STRICT ON).
>
>Looking --it-- up in documentation is the task I'm trying to determine Jack.
>Here and there I see a parameter list mentioned in he documentation; not
>clearly identified as such and then not consistently as every event of every
>method appears to support at least two parameters. Since there are different
>parameter names and types I've remained uninformed and have relied on
>Intellisense to give me some kind of clue but not much can be inferred from
>Intellisense.
>
>It would be very useful IMO if this context of passing arguments using
>parameters were documented better as clearly the construct is fundamental to
>the method or it would not be used at all so why not then expound on the
>scope of the types we may only infer by reading some arbitrary name; and an
>arbitrary name that does not lead anywhere specific in the current
>documentation as my meager attempts to find have failed to produce in any
>circumstance but accidently.
Sorry, I don't understand what the problem is. Can you give an
example?
My System SpecsSystem Spec
Old 08-18-2008   #5 (permalink)
HillBilly


 
 

Re: Where is a control's parameter list documented?


"Jack Jackson" <jjackson@xxxxxx> wrote in message
news:mh8ja45tnn3ig9shtm2d6mi6mn1jc9rcbs@xxxxxx
Quote:

> On Mon, 18 Aug 2008 09:51:09 -0500, "HillBilly"
> <somebody@xxxxxx> wrote:
>
Quote:

>>"Jack Jackson" <jjackson@xxxxxx> wrote in message
>>news:30tga4tp4evreln5792cde9nj7rg63ggvg@xxxxxx
Quote:

>>> On Sat, 16 Aug 2008 16:04:23 -0500, "HillBilly"
>>> <somebody@xxxxxx> wrote:
>>>
>>>>One question I have not figured out is how to learn which event
>>>>parameter
>>>>list is supported by a control? EventArgs, CommandEventArgs, what?
>>>
>>> I'm not sure I understand your question. I don't think the list of
>>> all event parameters used by a control is a useful thing to know.
>>>
>>> A control raises some number of events. When the handler for an event
>>> is called, an event parameter is passed. Each event has a specific
>>> parameter type.
>>>
>>> If you want to know which parameter a specific event uses, you can
>>> either look it up in the documentation, or code the parameter as
>>> something clearly illegal like 'string' and the compiler error message
>>> will tell you what is expected (unless you are using VB with OPTION
>>> STRICT OFF, in which case you need to bit the bullet and change to
>>> OPTION STRICT ON).
>>
>>Looking --it-- up in documentation is the task I'm trying to determine
>>Jack.
>>Here and there I see a parameter list mentioned in he documentation; not
>>clearly identified as such and then not consistently as every event of
>>every
>>method appears to support at least two parameters. Since there are
>>different
>>parameter names and types I've remained uninformed and have relied on
>>Intellisense to give me some kind of clue but not much can be inferred
>>from
>>Intellisense.
>>
>>It would be very useful IMO if this context of passing arguments using
>>parameters were documented better as clearly the construct is fundamental
>>to
>>the method or it would not be used at all so why not then expound on the
>>scope of the types we may only infer by reading some arbitrary name; and
>>an
>>arbitrary name that does not lead anywhere specific in the current
>>documentation as my meager attempts to find have failed to produce in any
>>circumstance but accidently.
>
> Sorry, I don't understand what the problem is. Can you give an
> example?
Noting I'm still trying to make sense of delegates and events I refer to the
earlier examples I mentioned such as EventArgs, CommandEventArgs and the
many other such "type" I see used with the actual parameter e.

My System SpecsSystem Spec
Old 08-18-2008   #6 (permalink)


Vista Business x64
 
 

Re: Where is a control's parameter list documented?

So you want to understand the arguments of the events that are raised. Use the MSDN documentation - Go to Help..Index in VS. Search for the event name. Select the item from the left column of the results with the event name followed by the word "event." It will tell you the event type, which in turn will tell you the argument types.

For example, say you want to see what the parameters are for the ListBox.SelectedIndexChanged event. Search for "SelectedIndexChanged" then click "SelectedIndexChanged event" in the results . It details that the event is of type "EventHandler". Clicking on EventHandler takes you to the EventHandler page, where you can see that the specific object parameter is of type EventArgs.

A better example - the ItemDataBound event of a repeater control. Looking up Repeater.ItemDataBound, I find that the event is of type RepeaterItemEventHandler. Clicking the type takes me to its definition page where I can see that the specific object argument is of type RepeaterItemEventArgs.
My System SpecsSystem Spec
Old 08-19-2008   #7 (permalink)
HillBilly


 
 

Re: Where is a control's parameter list documented?


"breitak67" <guest@xxxxxx-email.com> wrote in message
news:0bdf1fa264ef7f479c4678a7c3689e0a@xxxxxx-gateway.com...
Quote:

>
> So you want to understand the arguments of the events that are raised.
> Use the MSDN documentation - Go to Help..Index in VS. Search for the
> event name. Select the item from the left column of the results with the
> event name followed by the word "event." It will tell you the event
> type, which in turn will tell you the argument types.
>
> For example, say you want to see what the parameters are for the
> ListBox.SelectedIndexChanged event. Search for "SelectedIndexChanged"
> then click "SelectedIndexChanged event" in the results . It details that
> the event is of type "EventHandler". Clicking on EventHandler takes you
> to the EventHandler page, where you can see that the specific object
> parameter is of type EventArgs.
>
> A better example - the ItemDataBound event of a repeater control.
> Looking up Repeater.ItemDataBound, I find that the event is of type
> RepeaterItemEventHandler. Clicking the type takes me to its definition
> page where I can see that the specific object argument is of type
> RepeaterItemEventArgs.
>
>
> --
> breitak67
Very insightful thank you. The walk-through also shows the term "event" is
categorized as "Syntax" which answers one of my questions "where in the
documentation" such information is categorized and expected to be found.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Solved screen control's won't auto hide in WMC Media Center
Solved screen control's won't auto hide Media Center
Using multiple Parameter sets for a Parameter PowerShell
How to get a handle to WebBrowser Control's scrollbar? .NET General
How to best control parameter attributes and parameter parsing in your own scripts? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46