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
1
vote
1 answer

Using System.ComponentModel.DisplayName with dynamic values?

Im trying to implement multi-language support in my system, the other systems at work uses xmlfiles for this generated from a database that they have used for some time now so they want me to use this aswell. I have managed to translate everything…
Marcus
  • 1,197
  • 1
  • 7
  • 14
1
vote
1 answer

How to specify which DLLs to load with System.Composition (MEF2)?

I'm developing a new plugin loader application framework and reading on all available variants of MEF, I think the most future-proof and flexible is the MEF2 implementation available from NuGet as System.Composition. Unfortunately, most if not all…
rubenvb
  • 74,642
  • 33
  • 187
  • 332
1
vote
0 answers

Why are CancelEventHandler and CancelEventArgs not in System::ComponentModel according to the Visual Studio 2013 cl.exe?

I'm playing around with C++/CLI and WPF because I'm bored. I'm attempting to target .net 3.0 for this playing around. I want to handle a System.Windows.Window's Closing event; cl.exe complains about CancelEventHandler and CancelEventArgs if I…
andlabs
  • 11,290
  • 1
  • 31
  • 52
1
vote
1 answer

Could not find Assembly System.ComponentModel

I'm using Silverlight 4. I need to do grouping in my DataGrid. So I need to add add reference to System.ComponentModel. I could not find System.ComponentModel in "Add Reference". I added reference to System.ComponentModel.DataAnnotations and the…
1
vote
3 answers

Updating WPF GUI from a DLL

This seems like it would be pretty common task, but I'm not having any luck searching for an answer. I have a WPF/C# application that relies heavily on a dll for database routines. I would like the dll to update some GUI elements, i.e. a progress…
Jerry Davis
  • 151
  • 1
  • 11
1
vote
2 answers

Which attribute to use in System.ComponentModel namespace for setting order of fields?

By default, the fields in the designer are listed in alphabetical order. Does anyone know which attribute to use in the System.ComponentModel namespace to set the order explicitly?
Nick
  • 7,475
  • 18
  • 77
  • 128
1
vote
0 answers

Forestall duplicated columns when add TypeDescriptor Provider's

I'm trying to add a TypeDescriptor Provider for a class that I use how datasource in my datagridview, with this code: private void FrmTarifadoVariantes_Load(object sender, EventArgs e) { …
1
vote
0 answers

What is the reason to use the ModelState / ModelStateDictionary instead of a service-layer validation check

In many online examples and tutorials we see if (!ModelState.IsValid) { return View(model); } or something similar. I have written a ModelState filter to actually make that check before each action execution. But the built-in component model…
1
vote
1 answer

How to get the DisplayNameAttribute when it is in another class

I am having a problem with the following code: //This class can't be changed for is part of an EF data context. public partial class person { public string Name { get; set; } } //I have this partial just to access the person…
1
vote
1 answer

Replaceable assemblies for plugin

we are trying to hot swap (update) assemblies, the normal workflow is that we make some changes, build the assembly, do some changes and build again and in an ideal world the host app would get the new version of the assembly (with the updated…
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
1
vote
3 answers

Get Display attribute of class when displaying in HTML page

Here is what I have been toying with. I have a class like this; public partial class DespatchRoster : DespatchRosterCompare, IGuidedNav { public string despatchDay { get; set; } } I've added meta data to…
griegs
  • 22,624
  • 33
  • 128
  • 205
1
vote
1 answer

ComponentModel, PropertyGrids and Interfaces in C#

I have a bunch of objects that implement different interfaces, some properties of this interfaces should be showed and edited through a PropertyGrid, but if I specify something like DisplayName, Browsable or DescriptionAttribute, they will not be…
Leonox
  • 75
  • 7
1
vote
1 answer

Impossible to resolve System.ComponentModel.Component (the dll is referred)

i start telling you that my problem could come from the fact i'm very new in .NET programming and for this reason i cant find a similar answer beacause i dont know what to find. I tryed but nothing. I'm trying to do a WebService client (with a…
Giuseppe Marra
  • 1,094
  • 7
  • 16
1
vote
1 answer

Get Component's Parent Container in Compact Framework

I basically need to do the same thing as in: Get Component's Parent Form however in compact framework there is no definition of IDesignerHost Any idea how to do this? EDIT: It is System.ComponentModel.Component derived component that I want to drop…
Dzior
  • 1,485
  • 1
  • 14
  • 30
1
vote
0 answers

Design Time Representation

I'm interested in trying to get an item to behave at design time, not sure if I can achieve what I want to achieve. I've constructed a new webpart, a chart. This webpart has a single ChartSettings which has a number of properties on configurable via…
Ian
  • 33,605
  • 26
  • 118
  • 198