Problem Solved!
[field:NonSerial ized]
public event PropertyChanged EventHandler PropertyChanged ;
does the trick.
User Profile
Collapse
-
Reflection, Fields, and Delegates
Hey All,
I am trying to do something a little different, and am able to use Type.GetFields in order to get a list of fields that I want. However, one of the fields coming through is "PropertyChange dEventHandler", because I am using INotifyProperty Changed.
What I am wondering is, when asking for all the fields via reflection, can I say "Do not give me delegates", as the definition for System.Componen tModel.Property ChangedEventHan dler... -
Awesome thanks. This is what I had assumed. Thanks for the confirmation.Leave a comment:
-
hmmm ok thanks I'll give that a look. Is it fairly easy to merge multiple app.config files together?Leave a comment:
-
App.config files from a dll
Hey All,
Another question around a more modular design approach. So far the answers I've seen say to use a xml properties file, or to use a key value properties file.
I have an application that will load dlls. These dlls have configuration information that they need to use. Basically I want a dll specific app.config file. This doesn't seem to work unless the info is within the .exe, which is not what I want to happen.
... -
Does anyone know what the performance implications of this are?Leave a comment:
-
Correct, this is a plugin framework piece that I'm working on. I can't just use the standard load this directory because we will have more then 1 directory that needs to be loaded.
That being said, is it more efficient in .NET to actually load all the dlls at once, or to use the assembly resolve event, and when it doesn't find a dll, you tell the event what directories to look in, and it loads it then? In this application, some dll's...Leave a comment:
-
I have a framework that loads other modules we also build. So the class path I have is not a part of mscorelib, or a part of the current executing assembly. However I know the assembly will be loaded within the app domain. So I need a way of going through the assemblies of my current app domain (custom ones really), and seeing if I can create an instance of the class.
ie:
Project A has namespace A.B.C
Project B get...Leave a comment:
-
hmm interesting. I'm not sure how to do that, or that I could even do that!
Do you know how that works? I'll see what I can find.
Thanks,
CheersLeave a comment:
-
Create an object via reflection without knowing the assembly
Hey all,
I have a bit of peculiar problem. I need to create an instance of a class, but I do not know which assembly that class belongs to. I do know it is from an assembly loaded within the app domain though. I was hoping I could have it work in the following way:
Given a classpath, attempt to create the object from one of the assemblies currently loaded in the app domain.
Any way of doing this?
Cheers,... -
Cut/Copy/Paste Commands WPF
Hey All, I am trying to implement buttons that follow the command pattern. .NET exposes ApplicationComm ands.Cut, copy and paste.
I am trying the following:
<Button Command="Applic ationCommands.C opy"/> //also have paste and cut.
<TextBox Width="50"/>
In the designer, selecting the textbox will eneable cut/copy. However when I run the application and go into the textbox and... -
-
Place an Image on a button WPF
Hey All,
I want to store an image in a resource, and then use this image on a button. But I can't seem to get this working. In WPF should I be using resources to store the icons? Or should this be done differently?
Edit: I have Added a png to my Resources, and then in XAML tried:
Code:<comp:CFButton x:Name="btnScreenUp"> <Image Source="Resources/UpScreen.png"/>
-
-
Loading Assemblies or Classes in C#
Hey All,
I posted something similar in the .NET forums, but am unsure where it belongs, so forgive me if this is the wrong place.
I have a client application, and a folder containing dll's that the application will need to use. In java, if I put jars in the classpath, the JVM loads them automatically.
Is there something similar in .NET or am I stuck calling Assembly.Load on all the dll's in the folder?
... -
Anyone have any ideas on this? What is the recommended approach in .NET?Leave a comment:
-
Classloading in .NET
Hey All,
In java, I can drop a jar into the Java classpath, and when a class is called that hasn't been loaded yet, it will automatically load the class because the jar is in the classpath. Note this is all done internally through Java.
Does .NET offer such a mechanism? My Challenge is I have a directory of dll's, and I just want them to be loaded when they are needed, without me having to say Assembly.Load.
I'm... -
Yeah, this is sort of how I rolled my own implementation. Except enum's in C# are a little stupid, so I made my own "enum" style class that reads from a properties file to get the key/value pairs. That way I can just translate the properties file and it's good to go.
Thanks for the thoughts!Leave a comment:
-
Yeah, basically, I want to have a resource file that lists all of my error codes and the corresponding messages. This way they can be translated, and they act like enum's almost when you access them from code. The only issue is that I need to separate the code (which is the Name/Key) from the message. That's why my own home-rolled implementation works well. But i'd love to be able to use resx file provided I can somehow say "Give me the string...Leave a comment:
-
Out of curiousity, is there a better way then resx files to do what I am trying to do? I rolled my own implementation that does it for me, but it would be nice to use the resx files if possible.Leave a comment:
No activity results to display
Show More
Leave a comment: