Questions tagged [system.componentmodel]

The System.ComponentModel namespace provides classes that are used to implement the run-time and design-time behavior of components and controls. This namespace includes the base classes and interfaces for implementing attributes and type converters, binding to data sources, and licensing components.

The classes in this namespace divide into the following categories:

114 questions
0
votes
1 answer

How to validated that an object contains only alphabet characters with DataAnnotation?

I am writing some code validating that the user has submitted an object with the correct information. In other words, how would I validate that the name contains no numbers, signs, and other notation except from the English alphabet or latin foreign…
user2138160
  • 279
  • 1
  • 5
  • 14
0
votes
1 answer

Implementing a custom TypeConverter

I have a really simple scenario where I just want to extend the functionality of the System.ComponentModel.BooleanConverter so that it will allow multiple options rather than just true and false. So for example values like yes, 1, on etc. are the…
snappymcsnap
  • 2,050
  • 2
  • 29
  • 53
0
votes
1 answer

How to properly use Properties.Settings?

I'm using Visual Studio 2010 where I have a project, called Utilities, containing my settings.settings file which I want to access from other projects in the solution. In another project, I want to let the user manage the settings in a Windows Form…
0
votes
2 answers

C#: System.ComponentModel.Design does not contain ArrayEditor

I'm working on making a complex object designer compliant and was going to utilize the ArrayEditor component... Needless to say, I don't have it... MSDN says it comes from .NET 1.1 which I most certainly do have and then some. Any ideas?
Austin Hanson
  • 21,820
  • 6
  • 35
  • 41
0
votes
2 answers

Model validation using Entity Framework

I have a Entity Framework model class that has a view to create an instance of that model class. I wanted to validate dates on that class so that users add dates that meet certain criteria. I have a metadata class that uses attributes from the…
0
votes
1 answer

View argument constructed once

I have the following code as the constructor of a ViewModel class: [ImportingConstructor] public ItemDefViewModel(IItemDefView view) :base(view) { _Item = new ItemModel(); } This view model corresponds to a child…
nakiya
  • 14,063
  • 21
  • 79
  • 118
-1
votes
1 answer

From where does the System.ComponentModel.Composition.dll is being referred in my system?

I have a C# project that generates some.dll and it references a bunch of DLLs, one of them is System.ComponentModel.Composition.dll which is found under C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0. I built some.dll…
pasha
  • 2,035
  • 20
  • 34
-1
votes
1 answer

Is it possible to check whether an Event is null if i only got the EventDescriptor?

My constructor parses its instance for events with a certain attribute: _EventAttributes = from EventDescriptor a in TypeDescriptor.GetEvents(this) let attribute = a.Attributes[typeof(MyAttribute)] as MyAttribute where…
thalm
  • 2,738
  • 2
  • 35
  • 49
-2
votes
1 answer

C# - Delegate Specialization

Consider the following built-in delegate: public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e); Is it possible that I extend/overload/override the delegate to this signature: public delegate void…
1 2 3 4 5 6 7
8