sizeWithFont with MonoTouch - xamarin.ios

What's the equivalent of sizeWithFont in MonoTouch. If there's no such method, is it possible to invoke it some other way?
All I want to do is resize the label based on the text...

The next update (MonoTouch 1.1) will have the methods available as UIView.StringSize (string str, UIFont font)

To answer my own question... Use selectors to pimboke the objective-c methods:
http://monotouch.net/index.php?title=Documentation/Objective-C_Selectors

The NSString StringSize method would work for a single line label.

Related

How do equivalent of UIImage.withTintColor, in Xamarin?

In Apple docs for iOS 13.0+, UIImage class has method withTintColor.
However, the Xamarin.iOS equivalent UIImage class lacks this method.
Is there a way to do this?
(I don't think the alternative technique of setting UIImageView.TintColor helps me, because I need to programmatically draw the tinted image into another bitmap.)
Xamarin renames withTintColor method to ApplyTintColor:
var tintedImage = srcImage.ApplyTintColor(myUIColor);

Monotouch.Dialog EntryElement label above input

I'm using Monotouch.Dialog and specifically want to have the label above the input in the cell.
Is there a way to do this without needing to roll my own?
There's JVFloatLabeledTextField ported to Xamarin.iOS by gshackles which supports Monotouch.Dialog through the JVFloatLabeledEntryElement class.

Getting width of Monotouch.Dialog UIViewElement?

I'm trying to make an UIView (for a UIViewElement), but how do I get the bounds (at least width) of this UIViewElement?
Thanks
Mojo
UIViewElement just takes the view that you pass into the constructor and adds it to the ContentView of the UITableViewCell.
Since cells are dynamic and not all of them are the same size...
I would recommend you create a UIViewElement subclass with a ContentViewBounds property and set that value inside the GetCell method for your custom element.

UITableView "Bind()" methods - any tutorials or examples out there?

I have just noticed that UITableView comes with a couple of Bind() methods. Looks like that's an alternative to implementing UITableViewSource over and over again, or am I wrong?
Does anybody have samples? Also any other samples of binding would be interesting, like binding a textfield to a model using MonoTouch.
René
The method you're looking at is:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Protocols/NSKeyValueBindingCreation_Protocol/Reference/Reference.html
This has nothing to do with UITableView or UITableViewSource data binding.

use Label and Value of f:selecteItems with rich:combobox

How can i display Label from SelecteItem and use the value as a Key in rich:combobox? Jboss forums says it is not possible since the rich:combobox is designed for suggestion. Not really a replacement for h:selectOneMenu . is there any work around or alternative way?
PS: i tried using JSF converter it is modifying both value and label.
no.
use selectOneMenu.
add a4j:support as a child if you want ajax.

Resources