monotouch.dialog

MvvmCross Monotouch.Dialog binding data to a table

孤人 提交于 2019-12-08 06:07:12
问题 I'm using the MvvmCross Monotouch.Dialog to create my app and need to have a list of elements bound to a list in the VM - what's the best way of going about this? Do I need create an element form scratch to do this or is there some support already there? 来源: https://stackoverflow.com/questions/20719721/mvvmcross-monotouch-dialog-binding-data-to-a-table

MvvmCross Monotouch.Dialog binding data to a table

为君一笑 提交于 2019-12-08 02:45:28
I'm using the MvvmCross Monotouch.Dialog to create my app and need to have a list of elements bound to a list in the VM - what's the best way of going about this? Do I need create an element form scratch to do this or is there some support already there? 来源: https://stackoverflow.com/questions/20719721/mvvmcross-monotouch-dialog-binding-data-to-a-table

MonoTouch.Dialog how to get data from dialog

假装没事ソ 提交于 2019-12-08 00:39:34
问题 I'm a beginner in MonoTouch and MonoTouch.Dialog. I am trying to use MT Dialog but I cannot understand how to get data in and out. Let's say I have Event class: class Event { bool type {get;set;} string name {get;set;} } And I want to edit it using this dialog definition: return new RootElement ("Event Form") { // string element new Section ("Information"){ new EntryElement ("Name", "Name of event", ""), new RootElement ("Type", new RadioGroup (0)){ new Section (){ new RadioElement ("Concert"

Display UIWebView in custom MonoTouch.Dialog Element

梦想的初衷 提交于 2019-12-06 16:29:48
问题 Working on a way to display HTML and RTF content in a custom Element in MonoTouch.Dialog . To get started, I created a new class based on the UIViewElement implementation, with the intention of displaying a UIWebView in a cell (see UIViewElement code here). The custom element works, but the contents of the UIWebView is never displayed. Once the text of the UIWebView is loaded, I try to resize it using UIWebView.SizeThatFits . This function always return 0s, even though the width given to it

MonoTouch.Dialog how to get data from dialog

时光毁灭记忆、已成空白 提交于 2019-12-06 09:14:01
I'm a beginner in MonoTouch and MonoTouch.Dialog. I am trying to use MT Dialog but I cannot understand how to get data in and out. Let's say I have Event class: class Event { bool type {get;set;} string name {get;set;} } And I want to edit it using this dialog definition: return new RootElement ("Event Form") { // string element new Section ("Information"){ new EntryElement ("Name", "Name of event", ""), new RootElement ("Type", new RadioGroup (0)){ new Section (){ new RadioElement ("Concert"), new RadioElement ("Movie"), new RadioElement ("Exhibition"), new RadioElement ("Sport") } } }, How

MonoTouch.Dialog: Update of Text in an Element

我与影子孤独终老i 提交于 2019-12-06 06:07:15
Using MonoTouch.Dialog I add StyledStringElement elements. There is a background task that retrieves details that need to update the element.Value Is there a way to force the element to have it's text updated after the element.Value is updated? Ian If you want to update this element-by-element then you can use something like: public class MyStyledStringElement { public void SetValueAndUpdate (string value) { Value = value; if (GetContainerTableView () != null) { var root = GetImmediateRootElement (); root.Reload (this, UITableViewRowAnimation.Fade); } } } A variation would be to load

Setting a custom font for Monotouch-dialog elements

好久不见. 提交于 2019-12-06 06:06:08
问题 Is there a way to set the fonts when a Monotouch Dialog class has been instansiated? [Section("This is the header")] This will render with the default blue text with drop shadow, but I can't find where that font is being set. Is there a way to overwrite which font and color it uses? 回答1: I found a solution for those looking to replace ALL section headers in the entire solution. In MonoTouch.Dialog , there is a class named DialogViewController which is used when creating views with the

How can I pass data into MonoTouch.Dialog's delegates?

♀尐吖头ヾ 提交于 2019-12-05 01:41:53
问题 Given the following code, how can I pass data from "First Name", "Last Name", etc. into my method BookASession.SendMessage(); ? RootElement CreateBookASessionRoot() { return new RootElement("Book a Session") { new Section() { new EntryElement("First Name", "First Name", ""), new EntryElement("Last Name", "Last Name", ""), new EntryElement("Email", "Email", "") { KeyboardType = UIKeyboardType.EmailAddress }, new DateElement("Event Date", DateTime.Now), new RootElement ("Type of Shoot", new

MonoTouch.Dialog: How to set limit of number of characters for EntryElement

不想你离开。 提交于 2019-12-05 00:53:02
问题 I cannot find how to cap the number of characters on EntryElement 回答1: I prefer inheritance and events too :-) Try this: class MyEntryElement : EntryElement { public MyEntryElement (string c, string p, string v) : base (c, p, v) { MaxLength = -1; } public int MaxLength { get; set; } static NSString cellKey = new NSString ("MyEntryElement"); protected override NSString CellKey { get { return cellKey; } } protected override UITextField CreateTextField (RectangleF frame) { UITextField tf = base

Display UIWebView in custom MonoTouch.Dialog Element

走远了吗. 提交于 2019-12-04 20:42:04
Working on a way to display HTML and RTF content in a custom Element in MonoTouch.Dialog . To get started, I created a new class based on the UIViewElement implementation, with the intention of displaying a UIWebView in a cell ( see UIViewElement code here ). The custom element works, but the contents of the UIWebView is never displayed. Once the text of the UIWebView is loaded, I try to resize it using UIWebView.SizeThatFits . This function always return 0s, even though the width given to it (from the actual UITableViewCell it is displayed in) is non-zero. Is it sufficient to add the