Click here to Skip to main content
15,901,035 members
Home / Discussions / C#
   

C#

 
GeneralComboBox DropDown Pin
Shaun Becker11-Dec-03 7:32
Shaun Becker11-Dec-03 7:32 
GeneralRe: ComboBox DropDown Pin
Not Active11-Dec-03 7:58
mentorNot Active11-Dec-03 7:58 
GeneralRe: ComboBox DropDown Pin
Shaun Becker11-Dec-03 8:23
Shaun Becker11-Dec-03 8:23 
GeneralRe: ComboBox DropDown Pin
Heath Stewart11-Dec-03 10:31
protectorHeath Stewart11-Dec-03 10:31 
GeneralLooking for other controls in design-time Pin
f_popovic11-Dec-03 6:34
f_popovic11-Dec-03 6:34 
GeneralRe: Looking for other controls in design-time Pin
Heath Stewart11-Dec-03 10:23
protectorHeath Stewart11-Dec-03 10:23 
GeneralRe: Looking for other controls in design-time Pin
f_popovic12-Dec-03 0:17
f_popovic12-Dec-03 0:17 
GeneralRe: Looking for other controls in design-time Pin
Heath Stewart12-Dec-03 3:50
protectorHeath Stewart12-Dec-03 3:50 
How often does this actually happen, though, and under what circumstances? I'm sure there probably are instances where it is null, but the documentation doesn't give specifics. The VS.NET designers probably give consistent input while designing. If you're doing this at run-time, you have to make sure that whatever invokes the UITypeEditor provides a proper ITypeDescriptorContext by implementing and using that implementation when invoking the necessary calls.

There just doesn't really seem like any other way to do what you need. The only way to get the instance of your control (or its container, which the ITypeDescriptorContext also has a property for) in UITypeEditor.EditValue is through the ITypeDescriptorContext (or a TypeConverter for that matter). It's the only thing that ties them together.

If your paranoia is getting the best of you (don't worry, it always gets me too), try to evaluate when the Instance or Container properties are null and either avoid those cases or make sure in your implementation that an implementation of that interface is provided (most likely only possible at run-time, since VS.NET and the built-in .NET designers take care of most of the design-time stuff, allowing you to only be a slave to what it provides).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralRe: Looking for other controls in design-time Pin
f_popovic13-Dec-03 23:43
f_popovic13-Dec-03 23:43 
GeneralRe: Looking for other controls in design-time Pin
Heath Stewart14-Dec-03 5:36
protectorHeath Stewart14-Dec-03 5:36 
GeneralRe: Looking for other controls in design-time Pin
f_popovic14-Dec-03 21:33
f_popovic14-Dec-03 21:33 
GeneralApp.Config refresh Pin
RB@Emphasys11-Dec-03 5:10
RB@Emphasys11-Dec-03 5:10 
GeneralRe: App.Config refresh Pin
Guillermo Rivero11-Dec-03 7:17
Guillermo Rivero11-Dec-03 7:17 
GeneralRe: App.Config refresh Pin
Heath Stewart11-Dec-03 10:15
protectorHeath Stewart11-Dec-03 10:15 
GeneralC# HTTP Text Browser Pin
Guiro11-Dec-03 2:10
Guiro11-Dec-03 2:10 
GeneralRe: C# HTTP Text Browser Pin
Heath Stewart11-Dec-03 4:15
protectorHeath Stewart11-Dec-03 4:15 
GeneralRe: C# HTTP Text Browser Pin
Guiro12-Dec-03 2:57
Guiro12-Dec-03 2:57 
GeneralRe: C# HTTP Text Browser Pin
Heath Stewart12-Dec-03 3:51
protectorHeath Stewart12-Dec-03 3:51 
GeneralEnumerating Virtual Folders Pin
DotNetEvangelist11-Dec-03 2:04
DotNetEvangelist11-Dec-03 2:04 
GeneralRe: Enumerating Virtual Folders Pin
totig11-Dec-03 3:23
totig11-Dec-03 3:23 
General.NET IDE c# Pin
Hovel11-Dec-03 0:41
Hovel11-Dec-03 0:41 
GeneralRe: .NET IDE c# Pin
Anonymous11-Dec-03 2:33
Anonymous11-Dec-03 2:33 
GeneralRe: .NET IDE c# Pin
Charlie Williams11-Dec-03 16:11
Charlie Williams11-Dec-03 16:11 
GeneralRe: .NET IDE c# Pin
Philip Fitzsimons11-Dec-03 2:33
Philip Fitzsimons11-Dec-03 2:33 
GeneralRe: .NET IDE c# Pin
Hovel11-Dec-03 2:37
Hovel11-Dec-03 2:37 

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.