Re: Mandatory component class instantiation ...

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dave (Dave_at_discussions.microsoft.com)
Date: 10/22/04


Date: Fri, 22 Oct 2004 06:17:04 -0700

Well, we did considered that option, but how would you localize the custom
attribute for different languages. The display name of the component
obviously will be different in Spanish or German, but you can't localize
custom attribute. Am I correct? Could you comment.

"Tomas Restrepo (MVP)" wrote:

> Dave,
>
> > We have developed a few .NET components. The application access these
> > components through well defined interface IOurInterface.
> >
> > The application list display name of each component in the dialog, so
> > user can choose which one he wants to use. To display list of available
> > components we have to associate human redable display name with each
> > component.
> >
> > To get that display name of component we added the method GetDisplayName
> to
> > IOurInterface.
> >
> > The implication is that we have to instantiate class that implements
> > IOurInterface
> > in all components, so we can call GetDisplayName method of each instance.
> > We don't know other ways to get display name of component. The static
> method
> > would be great but we can't add static method to interface IOurInterface.
> >
> > Can anyone suggest the better way to list human redable display name of
> > components without instantiating all components. Thanks.
>
> How about querying for a custom attribute on the type using reflection?
> Works wonders for all the VS.NET designers and quite a few other things...
>
> --
> Tomas Restrepo
> tomasr@mvps.org
>
>
>



Relevant Pages

  • Re: Next & Previous buttons dont display data correctly in Access
    ... record counter) and custom buttons. ... NOTE - it is only display that is incorrect - the database remains ... > Exit Sub ...
    (microsoft.public.access.forms)
  • Re: Cant Get a Field to Display the Results of My Formula
    ... Not only was I able to create the formula in the individual file, ... but I also customized it to display a graphical indicator (red, yellow, green ... also displayed in the Master. ... between the date in the Finish field and the date in a custom field ...
    (microsoft.public.project)
  • RE: porting xp gina to vista credential provider
    ... your custom dialog? ... then use it to create my dialogs in the SetSelected method ... available Credential Provider articles, ... It appears that the UI provided by LogonUI is not equipped to display any ...
    (microsoft.public.platformsdk.security)
  • Re: Web.config
    ... "On" Always display custom messages. ... "Off" Always display detailed ASP.NET error information. ... This section sets the authentication policies of the application. ... This section sets the authorization policies of the application. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Outlook 2002 Form Problems
    ... After some testing it appears that Outlook 2002 will handle forms ... that the custom form I ... does it not only remove the active content message, but display the custom ... > item is saved the message class field still shows as IPM.Post.MyForm. ...
    (microsoft.public.outlook)