eventargs Questions

0

In .NET Framework 2.0, delegate EventHandler got its generic generalization that allowed the second argument to be not only of type EventArgs, but also of a derived type, imposing a stricter constr...
Augsburg asked 31/5, 2021 at 18:44

13

Solved

I'm using Microsoft Expression Blend 4 I have a Browser .., [ XAML ] ConnectionView " Empty Code Behind " <WebBrowser local:AttachedProperties.BrowserSource="{Binding Source}"> <i:Int...
Electrochemistry asked 1/6, 2011 at 17:45

5

Solved

I have a usercontrol that raises an event after communicating with a web service. The parent handles this event when raised. What I thought would be the proper approach would be to pass the object ...
Goingson asked 20/2, 2013 at 10:46

1

Solved

The classic general C# event has these parameters: (object sender, EventArgs e) I can implement an event with a more specific signature for the e argument, deriving for EventArgs. Now, what's t...
Casilde asked 16/5, 2017 at 21:56

5

Solved

I have asp button: <asp:button ID="btn1" runat="server" CommandArgument="" CssClass="btn1" OnClick="button_click"></asp:button> and script: $("a").click(function () { var val = $(...
Robillard asked 20/11, 2012 at 18:10

7

Solved

I am getting ready to create a generic EventArgs class for event args that carry a single argument: public class EventArg<T> : EventArgs { // Property variable private readonly T p_EventDa...
Egidio asked 22/7, 2010 at 18:30

2

Solved

Here is my job class: public class Job { public string Id{ get; set;} public string Name{ get; set;} } And here is my ListView: public class JobListePage:ContentPage { // Members private L...
Planar asked 11/3, 2015 at 11:34

7

Solved

I am writing a Visual C# program that executes a continuous loop of operations on a secondary thread. Occasionally when that thread finishes a task I want it to trigger an eventhandler. My program ...
Onehorse asked 16/12, 2009 at 17:3

6

Solved

I recall reading, on multiple occasions and in multiple locations, that when firing the typical event: protected virtual OnSomethingHappened() { this.SomethingHappened(this, EventArgs.Empty); } ...
Haupt asked 9/10, 2008 at 19:1

2

I hope the name gives justice to my question... So, I just started making a memory game, and there are 25 checkbox buttons which I am using to show the items. I was wondering whether there w...
Lydie asked 30/11, 2013 at 5:16

3

Solved

Is it frowned upon to modify EventArgs in event handlers for the purpose of passing information back to the class invoking the event? For instance, if I have a low-level communication class needing...
Craver asked 16/2, 2012 at 8:9

4

Solved

With generics, is there ever a reason to create specific derived EventArg classes It seems like now you can simply use them on the fly with a generic implementation. Should i go thorugh all of my...
Terrell asked 22/11, 2008 at 15:36

1

I just figured out by accident (when something compiled that I didn't think would compile) that EventHandler is not constrained to the type System.EventArgs. Here's the inline docs: #region Assem...
Fino asked 1/4, 2013 at 2:41

2

Solved

In case of Page_Load, Init and other page events, what is the use of these (object sender, EventArgs e) parameters? Examples would be more helpful.
Nisan asked 23/1, 2013 at 11:56

3

Solved

I'm wondering why should I use a class that inherits from the EventArgs class instead of using a custom class that will do the same job for me when passing event data?
Reinhold asked 25/7, 2011 at 13:27

3

Solved

In all the .NET book I've read the guide line for implementing events explains that you need to subclass EventArgs and use EventHandler. I looked up more info on http://msdn.microsoft.com/en-us/lib...
Thomas asked 8/2, 2011 at 21:56

1

The CompositionTarget.Rendering event is a plain old EventHandler, with a plain old EventArgs. However, in real life, it apparently always gets an instance of RenderingEventArgs. So your event hand...
Embowed asked 2/9, 2010 at 12:55

3

Solved

For example, I have a base event publishing method: protected virtual OnSomeEvent(EventArgs e) { var handler = SomeEvent; if (handler != null) { handler(this, e); // handler(this, new Event...
Djokjakarta asked 29/1, 2010 at 0:12

3

Solved

I know they have something to do with delegates. I've tried but I still don't comprehend how to use those either. I know a little about event handlers but what I really want to know is how I can us...
Regulus asked 22/11, 2009 at 15:3

1

Solved

I don't understand the class TextCompositionEventArgs. There are members of type string named ControlText,SystemText,Text. Then there is a field TextConmposistion which itself contains the members...
Slesvig asked 9/9, 2009 at 20:6

2

Solved

I have an event that is currently defined with no event arguments. That is, the EventArgs it sends is EventArgs.Empty. In this case, it is simplest to declare my Event handler as: EventHandler&lt...
Ediva asked 23/8, 2009 at 13:27

3

Solved

I understand the benefits of using the standard MS event handler delegate signature as it allows you to easily expand on the information passed through the event with out breaking any old relations...
Oxa asked 21/7, 2009 at 3:0

3

Solved

i have seen some code in which people pass parameter through commandParameter Property of web control.then what is use of eventargs.
Lizabethlizard asked 6/5, 2009 at 15:21
1

© 2022 - 2024 — McMap. All rights reserved.