user1868675
user1868675

Reputation: 127

MonoTouch.Dialog StyledStringElement

Hy guys!

How can I set / access the DetailTextLabel of a StyledStringElement in MonoTouch.Dialog?

Upvotes: 0

Views: 713

Answers (1)

Jason
Jason

Reputation: 89102

the second argument is the detail text value. Note that you have to specify a cell style (third argument) that supports the detailed text - the default cell style does not display a detail text value.

new StyledStringElement ("Default", "Invisible value", UITableViewCellStyle.Default),
new StyledStringElement ("Value1", "Aligned on each side", UITableViewCellStyle.Value1),
new StyledStringElement ("Value2", "Like the Addressbook", UITableViewCellStyle.Value2),
new StyledStringElement ("Subtitle", "Makes it sound more important", UITableViewCellStyle.Subtitle),
new StyledStringElement ("Subtitle", "Brown subtitle", UITableViewCellStyle.Subtitle) {
    DetailColor = UIColor.Brown
}

See the MT.Dialog sample app for an example of this code in action.

Upvotes: 3

Related Questions