monotouch.dialog

How can I create a custom styled EntryElement with MonoTouch.dialog?

十年热恋 提交于 2019-12-13 02:19:17
问题 I am trying to create a custom entry element using monotouch.dialog. I understand how to subclass a StringElement to style my own string elements - see example below: public class CustomStyledStringElementPlain : MonoTouch.Dialog.StyledStringElement { public CustomStyledStringElementPlain (string _caption, UIColor _backgroundcolour, UITextAlignment _alignment) : base(string.Empty,string.Empty) { TextColor = UIColor.White; Font = UIFont.FromName ("Helvetica-Bold", 14f); Caption = _caption;

Weird blocks when adding Elements to MonoTouch Dialog RootElement after it is shown

五迷三道 提交于 2019-12-12 15:17:45
问题 In an app I am building I use the following pattern: If the user clicks on a hierarchical navigation element I open the next UIViewController immediately, and it takes care about loading its data itself and shows a loading spinner if it is going over the network. Now most list views are created using MonoTouch . On one DialogViewController I have an issue with adding many element to the views RootElement after the screen has already been show. At first the StringElements appear fine on screen

Adding a Monotouch.Dialog to a standard view

风格不统一 提交于 2019-12-12 15:04:08
问题 I have a standard view with a bar at the top for navigation. I also have a Monotouch.Dialog set in it's own source file. I've looked around for a solution to this, but can't seem to find a definitive answer on how to add a MTD to a normal view. Is there a simple way to do this? 回答1: You instantiate the DialogViewController and add its View to your view. DialogViewController vc = new DialogViewController(null); // Build and set your root here. vc.View.Frame = new RectangleF(20f, 20f, 280f,

Use Mvvmcross Binding with MonoTouch.Dialog (Lists and Commands)

久未见 提交于 2019-12-12 07:22:28
问题 1. Binding Lists I wonder how I could bind a ObservableCollection to a Radiogroup: new Section(){ new RootElement("Mandanten", new RadioGroup("mandanten", 2)) { new Section(){ new RadioElement("Kupus", "mandanten"), new RadioElement("Kajmak", "mandanten") } } } as you see here I'm creating 2 Items/Elements manually but I miss something like an "ItemsSource". If its not possible, what recommendation would you give me? To use witch Control (to bind Lists)? 2. CommandBinding As I see theres no

logout not working properly in monotouch-bindings facebook sample

家住魔仙堡 提交于 2019-12-12 05:26:03
问题 i just downloaded the monotouch-bindings sample for facebook integration it's working fine but clicking on logout button for another user login, it's not asking the credentials, it tooks previous credentials and directly goes to next screen. 回答1: Try Facebook Graph API instead. It's very easy to use JSON-based API. There is useful JSON-data processing library JSON.Net for requests data serialization and response data deserialization. AS a network transport it's possible to use generic

Monotouch.Dialog: After selection in a RadioElement table, how to update a dependent table?

淺唱寂寞╮ 提交于 2019-12-12 04:32:50
问题 I am developing a Unit Converter using Monotouch.Dialog, and I have a main window that looks like this: When I tap the Quantity element, select a new Quantity and return to the main window, I want to update the Unit elements with a table of units associated with the selected quantity. My initial thought was to make an update of the units in an event handler that would be invoked after completed quantity selection. However, I have not been able to find an event in the MT.D API that is fired

How can I get an element with 2 buttons side by side?

北城余情 提交于 2019-12-11 14:21:05
问题 I need to have a Monotouch.Dialog element with 2 buttons side by side using MvvmCross Has anyone managed this? I have this so far but know it's not going to work as I have no way of knowing which button was tapped: public class DoubleButton : Element, IElementSizing{ UIImage image1; UIImage image2; public DoubleButton (UIImage image1,UIImage image2, string caption): base(caption) { this.image1 = image1; this.image2 = image2; } protected override UITableViewCell GetCellImpl (UITableView tv) {

Monotouch.Dialog - UISearchBar Tint

我怕爱的太早我们不能终老 提交于 2019-12-11 10:06:22
问题 When I enable the Search bar on a DialogViewController , how is the searchbar's tint changed? EnableSearch = true; SearchPlaceholder = "Find station"; AutoHideSearch = false; 回答1: The searchbar in MonoTouch.Dialog is private, you would need to modify your source code to change the TintColor when the searchBar is instantiated. Another option suggested in the comments is to use: ((UISearchBar) TableView.TableHeaderView).TintColor = UIColor.Black; 回答2: Taking Miguel's help, I found that the

A DialogViewController with RefreshRequested and EntryElement crash when text entered

旧时模样 提交于 2019-12-11 07:54:03
问题 A DialogViewController contains an EntryElement and RefreshRequested handler is set (see code below). Run in the simulator, debug mode, type some quick random text (containing spaces) in the EntryElement. Crash will follow. What I am doing wrong ? I guess this is a bug in DialogViewController not retaining some images that is garbage collected. Is there a switch to trace garbage collector and removed objects ? the offending code : [Register ("AppDelegate")] public partial class AppDelegate :

Back Button missing from nested Monotouch Dialog RootElement Views

↘锁芯ラ 提交于 2019-12-11 05:29:34
问题 I have two levels of nested RootElements and at neither level is there a Back Button. Two things to make clear Yes, I am overriding the DialogViewController and setting "pushing" to True I am adding the DialogViewController's View as a SubView in my MvxViewController rather than having the using the DialogViewController as my main controller I have a number of SubViews in my ViewController including a UITableView and a custom UIView. I want to use the convenient nesting of Controllers that MT