Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6697333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:26:52+00:00 2026-05-26T06:26:52+00:00

MonotouchDialog makes it very easy to create UITableView Dialogs, but sometimes questions like that

  • 0

MonotouchDialog makes it very easy to create UITableView Dialogs, but sometimes questions like that one popup:

MonoTouch Dialog. Buttons with the Elements API

Now, I have a similar problem but quite different:

List<User> users = GetUsers();

var root = 
   new RootElement ("LoginScreen"){
     new Section ("Enter your credentials") {
       foreach(var user in users)
         new StyledStringElement (user.Name, ()=> {
            // tap on an element (but which one exactly?)
         }
     ),
   }

navigation.PushViewController (new MainController (root), true);

Now, the second parameter of StyledStringElement‘s constructor has the type of NSAction delegate, and doesn’t take any arguments, now I dunno how to determine exactly which element been tapped.

How to get that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:26:53+00:00Added an answer on May 26, 2026 at 6:26 am

    If it was Tapped then it has been selected. So you should be able to inherit from StyleStringElement and override its Selected method to accomplish the same goal.

    e.g.

    class UserElement : StyleStingElement {
        public UserElement (User user) { ... }
    
        public override Selected (...)
        {
            // do your processing on 'user'
            base.Selected (dvc, tableView, indexPath);
        }
    }
    

    For Touch.Unit I created a new *Element for every item I had, TestSuiteElement, TestCaseElement, TestResultElement… to be able to customize each of them and adapt (a bit) their behaviour but I did not use this Selected to replace Tapped. You might want to check but it would not fit with your code pattern to create elements.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's easy to create a multi-level menu structure using nested RootElements in MonoTouch.Dialog but
New to MonoTouch and MonoTouch.Dialog, but I'm sure it's possible to create a tab
Can I create a Sectioned UITableView with MonoTouch.Dialog with alphabetic navigation? In MonoTouch, I
Im new to monotouch but want to build an app that is something similar
I'd like the UITableView which MonoTouch.Dialog creates to appear 5cm or so from the
I would like to use MonoTouch.Dialog framewrok to display some readonly info. I think
I just want to override the Selected method from MonoTouch.Dialog. Simple as that I
Is this possible at all? When I create a form using MonoTouch.Dialog, it comes
I'm using the MonoTouch.Dialog reflection API to create a new DialogViewController: var dashBoard =
I use the MonoTouch.Dialog DialogViewController to create a nice view. private RootElement _createRoot(){ return

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.