Questions tagged [eventargs]

Represents the base class for classes that contain event data, and provides a value to use for events that do not include event data.

Represents the base class for classes that contain event data, and provides a value to use for events that do not include event data.

This class serves as the base class for all classes that represent event data. For example, the System.AssemblyLoadEventArgs class derives from EventArgs and is used to hold the data for assembly load events. To create a custom event data class, create a class that derives from the EventArgs class and provide the properties to store the necessary data. The name of your custom event data class should end with EventArgs.

http://msdn.microsoft.com/en-us/library/system.eventargs(v=vs.110).aspx

164 questions
1
vote
1 answer

Returning modified byte[] buffer in EventArgs

I want to give the consumer of my event the possibility to modify a buffer through EventArgs, but I can't pin the solution properly. I'm well prepared in C/C++ but rather inexperienced in C#. My Event definition is: public class ResponseEventArgs :…
Hernán
  • 4,527
  • 2
  • 32
  • 47
1
vote
1 answer

Start Outlook add in with ribbon

I'm developing an Outlook Add In. It's pretty much done already, but there's one thing that I can't seem to put my finger on. In my (Outlook Add In) project I added a new item (Ribbon (Visual Designer)) which I called EmailTransferRibbon. This…
user3478148
  • 433
  • 1
  • 8
  • 26
1
vote
1 answer

Access data in EventArgs Class

I am trying to access data store in ResultID from the following code: public class ResultPanelEventArgs : EventArgs { private string stringResultId = string.Empty; private int intRowIndex = -1; private string stringAnalysisName =…
willkk
  • 121
  • 3
  • 14
1
vote
0 answers

EventHandler containing generic type not appearing in Designer

I have a generic EventArgs class defined as: public class GenericEventArgs : EventArgs { public GenericEventArgs(T value) { Data = value; } public T Data { get; private set; } } If I add an event of type EventHandler
g t
  • 7,287
  • 7
  • 50
  • 85
1
vote
0 answers

Passing data to ui via event handler in Windows Phone 8

I'm using the following pattern to pass response data of an HTTP request(runs on a worker thread) to the concerning UI. using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { …
stdout
  • 2,471
  • 2
  • 31
  • 40
1
vote
2 answers

EventHandler with FormClosingEventArgs

I have this closing form code in my Form.cs public void label7_Click(object sender, FormClosingEventArgs e) { MessageBox.Show("Are you sure you want to exit?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question); …
noobprogrammer
  • 1,140
  • 7
  • 22
  • 35
1
vote
1 answer

How to use eventargs argument on asp.net button click event

It's a bit of a hack, but I'm forcing a postback on the close event of a jquery dialog. close: function (event, ui) { __doPostBack('<%=btnChange.UniqueID %>', 'refreshMe'); } It works as it should and it raises the click event on the server…
Jagd
  • 7,169
  • 22
  • 74
  • 107
1
vote
1 answer

unable to access EventArgs e value to use in HandleRequest

I am just learning about events, delegates and subscribers. I've spent the last 2 days researching and wrapping my brain around it all. I am unable to access the information being passed in my EventArgs e value. I have a saved project that wants to…
Tonia Roddick
  • 137
  • 1
  • 3
  • 13
0
votes
1 answer

Wrapper for a method that accepts (EventArgs)

I'm trying to implement EventArgs to pass a list of parameters to my messaging system: Question. I subclassed EventArgs: public class SingleParameterArgs : EventArgs { public T arg1; public SingleParameterArgs(T _arg1) { arg1…
Ilya Suzdalnitski
  • 52,598
  • 51
  • 134
  • 168
0
votes
3 answers

How to translate CodeBehind WPF Events; Event, Handler, EventSetter to MVVM pattern?

I am trying to translate WPF CodeBehid events like Event, Handler, EventSetter to MVVM pattern. I am not allowed to use System.Windows.Controls since I am using MVVM. And I am also avoiding 3rd party library to solve this issue. Can somebody explain…
Shai
  • 529
  • 7
  • 20
  • 36
0
votes
0 answers

Why is EventArgs e empty when using @volumechange event in Blazor MAUI video tag?

I receive empty EventArgs if i use the @onvolumechange event in a .NET Blazor MAUI app on windows. Player in Razor file:
0
votes
3 answers

VB.Net - Can you access the expected data type within a function?

I was wondering if there is any way to access the expected data type within a function similar to an event arg. I am doubtful that this is possible, though it would be an excellent feature. I frequently work with (old and disorganized)Mysql…
Luke Krell
  • 13
  • 4
0
votes
1 answer

Bitmap access violation exception with camera image

In my WPF application images are taken with a camera use a view and then passed as bitmaps to another when it's closed via eventargs. However, when I then try to process the images I get the AccessViolationException. This does not occure when I…
MarcMan
  • 5
  • 4
0
votes
0 answers

Why was EventArgs constraint dropped from EventHandler?

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 constraint on its implementations. But somewhen in .NET…
Palec
  • 12,743
  • 8
  • 69
  • 138