Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Dialog provides "a foundation to create dialog boxes and show table-based information without having to write dozens of delegates and controllers for the user interface" (from <a href="https://github.com/migueldeicaza/MonoTouch.Dialog" rel="nofollow noreferrer">https://github.com/migueldeicaza/MonoTouch.Dialog</a>)</p> <p>The idea of AutoViews is to provide a layer of auto-generated UIs built largely on top of Dialog, especially for prototyping but also possibly for some families of apps - see <a href="https://stackoverflow.com/questions/13375499/should-i-wait-for-autoview">Should I wait for AutoView?</a> and <a href="http://slodge.blogspot.co.uk/2012/10/cross-platform-views-for-mvvmcross-ideas.html" rel="nofollow noreferrer">http://slodge.blogspot.co.uk/2012/10/cross-platform-views-for-mvvmcross-ideas.html</a></p> <p>The current state of AutoViews is that there is an initial implementation available on Android and iOS, and there is a small sample which shows the use of this implementation at: <a href="https://github.com/slodge/MvvmCross-Tutorials/tree/master/AutoViewExamples" rel="nofollow noreferrer">https://github.com/slodge/MvvmCross-Tutorials/tree/master/AutoViewExamples</a></p> <p>The main focus of the demo uses <code>Auto</code> objects to describe the UI in the ViewModel - e.g.:</p> <pre><code> private KeyedDescription GetDialogAutoView() { var auto = new RootAuto(caption: "Some Dialog Info") { new SectionAuto(header: "Strings") { new EntryAuto(caption: "Name", bindingExpression: () =&gt; Name), new EntryAuto(caption: "Password", bindingExpression: () =&gt; Password) { Password = true }, }, new SectionAuto(header: "Booleans") { new BooleanAuto(caption: "Is available", bindingExpression: () =&gt; IsAvailable), new CheckboxAuto(caption: "Is active", bindingExpression: () =&gt; IsActive), }, new SectionAuto(header: "DateTimes") { new DateAuto(caption: "Date of Birth", bindingExpression: () =&gt; DateOfBirth), new TimeAuto(caption: "When", bindingExpression: () =&gt; PreferredContactTime), }, new SectionAuto(header: "Debug Info") { new StringAuto(caption: "Name", bindingExpression: () =&gt; Name), new StringAuto(caption: "Password", bindingExpression: () =&gt; Password), new StringAuto(caption: "Is available", bindingExpression: () =&gt; IsAvailable), new StringAuto(caption: "Is active", bindingExpression: () =&gt; IsActive), new StringAuto(caption: "Date of Birth", bindingExpression: () =&gt; DateOfBirth), new StringAuto(caption: "When", bindingExpression: () =&gt; PreferredContactTime), }, }; return auto.ToElementDescription(); } </code></pre> <p>Instead of these <code>Auto</code> objects, a Json format description is available, but there's not much documentation on this today. Some example files do exist in <a href="https://github.com/slodge/MvvmCross-Tutorials/blob/master/Sample%20-%20CustomerManagement/CustomerManagement%20-%20AutoViews" rel="nofollow noreferrer">https://github.com/slodge/MvvmCross-Tutorials/blob/master/Sample%20-%20CustomerManagement/CustomerManagement%20-%20AutoViews</a> - for example <a href="https://github.com/slodge/MvvmCross-Tutorials/blob/master/Sample%20-%20CustomerManagement/CustomerManagement%20-%20AutoViews/CustomerManagement.Droid/Assets/DefaultViews/NewCustomerViewModel/Dialog.json" rel="nofollow noreferrer">https://github.com/slodge/MvvmCross-Tutorials/blob/master/Sample%20-%20CustomerManagement/CustomerManagement%20-%20AutoViews/CustomerManagement.Droid/Assets/DefaultViews/NewCustomerViewModel/Dialog.json</a></p> <p>These Json files are very Reflection-based - they are built around the names and properties of the Dialog classes.</p> <hr> <p>For your specific case, I think I'd recommend you don't use the AutoViews Json format.</p> <p>It sounds like you have a more specific requirement - where you want the ViewModels to download Models from the web and for the ViewModels to then construct UIs from these descriptions.</p> <p>Because of this I would recommend that you start by describing your own business Models in C# POCOs - these can then easily be serialised over a network connection (e.g. using Json.Net) and your ViewModels and Views can then work out how to display them.</p> <p>As you already know from <a href="https://stackoverflow.com/questions/17797124/is-it-possible-to-have-method-binding-in-mvvmcross-using-fluent-api">Is it possible to have method binding in mvvmcross using Fluent API?</a>, you can bind your UI to a Dictionary or other 'dynamic' ViewModel structure if you want to - I suspect this will be useful when displaying and binding your dynamic form data. </p> <p>It may be that you can use either the <code>Auto</code> or the Json parts of AutoViews as part of this last display step - but I don't think your network transfer should be done in terms of the Dialog elements - stick to business domain objects there.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload