Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Obtaining a cell to change the selection style

$
0
0

Hi All,

Using monotouch dialog and I am trying to use a UITextView as a multiline entry field but the containing cell gets highlighted in blue which I would like to avoid.

I believe that all the core elements in MTD set Cell.SelectionStyle = UITableViewCellSelectionStyle.None;

This is how I am creating the text view and adding to the root element. How would I change the cell properties to have a selection style of none.

RootElement element = new RootElement ("Actions");
element.UnevenRows = true;

var notes = new UITextView(new RectangleF(0,0, 500, 200)) 
{Editable = true, BackgroundColor = UIColor.Clear, Font = UIFont.SystemFontOfSize(16)};
notes.Text = value.Notes;

element.Add (new List<Section> () {
    new Section (""){
        new StringElement ("Project", value.ProjectName),
    },          
    new Section ("Notes"){
    notes
    },
});

controller.Root = element;

If a UITextView is the wrong way to go then I am happy to look at alternatives.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>