Click here to Skip to main content
15,894,294 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trying to make a DataGridView field a color if a condition is met. Pin
Norris Chappell22-May-15 12:47
Norris Chappell22-May-15 12:47 
GeneralRe: Trying to make a DataGridView field a color if a condition is met. Pin
Mathi Mani22-May-15 12:49
Mathi Mani22-May-15 12:49 
GeneralRe: Trying to make a DataGridView field a color if a condition is met. Pin
Norris Chappell22-May-15 12:52
Norris Chappell22-May-15 12:52 
AnswerRe: Trying to make a DataGridView field a color if a condition is met. Pin
Mathi Mani22-May-15 13:00
Mathi Mani22-May-15 13:00 
GeneralRe: Trying to make a DataGridView field a color if a condition is met. Pin
Norris Chappell23-May-15 11:11
Norris Chappell23-May-15 11:11 
Questionway around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff22-May-15 6:49
professionalBillWoodruff22-May-15 6:49 
AnswerRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Sascha Lefèvre22-May-15 7:04
professionalSascha Lefèvre22-May-15 7:04 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff22-May-15 21:12
professionalBillWoodruff22-May-15 21:12 
Thanks, Sascha !

Omitting the 'setter is a good idea, but it also means that no external "entity" with a valid reference ... to an instance of the Class that inherits the Interface ... can set the Property ... that's a strategy I can't use in this case.
Sascha Lefèvre wrote:
Expose only the required actions on the dictionary as methods in the interface, not the dictionary (-property).
That's a very intriguing suggestion, and one I don't quite understand: do you mean have the Interface declare method signatures for such actions as Dictionary ... 'Add, 'Remove, etc. ?

Or, could you mean ... in the Interface ... declare the signature of a method whose "only purpose" is to set the initial Value of the Property ? That would work.

In this case, I am using the Interface more as "contract" than as all-the-other-uses-possible.

I am going to think about your response, and the responses by Pete O', Richard D., and Alan N., today and so some more experimentation.

My goal here is that these Properties are initialized by a Static Class, not by any code in the Forms in which the custom Component(s) are placed/instantiated. Since, in a way, control of the instances of these custom Components, no matter what "container" they are in, is a kind of "cross-cutting concern" (to mis-use a term from the AOP religion), I do think using an ApplicationContext here may be the best way to go, and it's an alternative WinForm architecture (better to say it's the "real" WinForm architecture whether or not the programmer ever realizes that) I am very familiar with.

Have a great day (well, it's GMT +07:00 here) !
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut, Jr.

GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Sascha Lefèvre24-May-15 3:33
professionalSascha Lefèvre24-May-15 3:33 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff24-May-15 22:42
professionalBillWoodruff24-May-15 22:42 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Sascha Lefèvre25-May-15 4:21
professionalSascha Lefèvre25-May-15 4:21 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff25-May-15 7:54
professionalBillWoodruff25-May-15 7:54 
AnswerRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Richard Deeming22-May-15 7:11
mveRichard Deeming22-May-15 7:11 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff22-May-15 21:27
professionalBillWoodruff22-May-15 21:27 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff24-May-15 22:46
professionalBillWoodruff24-May-15 22:46 
AnswerRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Pete O'Hanlon22-May-15 8:06
mvePete O'Hanlon22-May-15 8:06 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff22-May-15 21:33
professionalBillWoodruff22-May-15 21:33 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Pete O'Hanlon22-May-15 21:47
mvePete O'Hanlon22-May-15 21:47 
AnswerRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
Alan N22-May-15 14:15
Alan N22-May-15 14:15 
GeneralRe: way around limitations of WinForms treatment of Public Proprties implementing an Interface ? Pin
BillWoodruff22-May-15 21:35
professionalBillWoodruff22-May-15 21:35 
QuestionHow to get the directory where DDL is installed Pin
Antonio Guedes22-May-15 6:14
Antonio Guedes22-May-15 6:14 
AnswerRe: How to get the directory where DDL is installed Pin
Eddy Vluggen22-May-15 6:56
professionalEddy Vluggen22-May-15 6:56 
GeneralRe: How to get the directory where DDL is installed Pin
Antonio Guedes22-May-15 10:06
Antonio Guedes22-May-15 10:06 
GeneralRe: How to get the directory where DDL is installed Pin
Richard Andrew x6422-May-15 12:28
professionalRichard Andrew x6422-May-15 12:28 
QuestionHow to implement Save As functionality in C# Pin
RajuPrasad8222-May-15 3:49
professionalRajuPrasad8222-May-15 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.