Hey Jeff I made a search in files for [Outlet] and just outlet, but I don't find anything on C#. I tried to try () something with Attributes.CustomAttributes but didn't figure out nothing
Also found http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=404 but that was super sayajin level 5 and I'm still sayajin level 1. Any tip on how to get attributes for something? Karl From: Jeff Stedfast <[email protected]> Date: Fri, 16 Sep 2011 09:01:39 -0400 To: Karl Heinz Brehme Arredondo <[email protected]> Cc: "[email protected]" <[email protected]> Subject: Re: [MonoTouch] Find ID of a control Hi Karl, MonoTouch decorates outlets with an [Outlet] attribute that you could check for. You could perhaps check for that. Jeff On Fri, Sep 16, 2011 at 1:07 AM, Karl Heinz Brehme Arredondo <[email protected]> wrote: > Hi, > Is there a way to get the ID (aka name of the variable or Outlet name) of a > control? > I need to loop for all controls and then do something like that: > foreach (UIView view in this.View.Subviews) > { > If (view.GetType().Name == "UILabel") > { > view.Text = NSBundle.MainBundle.LocalizedString(view.ID, ""); > } > } > So all controls that has a corresponding Localizable.srings file with it ID > as key for localization can be translated automatically depending > on Localizable.srings. > Thanks, > Karl > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch > >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
