I am using MonoTouch.Dialog within a UIPopoverController to give our iPad users a series of settings to work with. In my app, I am using this CalendarView (http://escoz.com/blog/monotouch-calendar-control-is-here/) so the user can set dates for the application (the settings are used to configure timed locations on a Googlemap).
Anyway, I am experiencing some sizing issues concerning the UIPopoverController... Regardless of how i set the content size, once i click deeper into the tree of .Dialog, the UIPopoverController resizes itself which is causing undesired sizing on said calendar view.
Enclosed is a sample of what Im seeing. You will notice, I have the content sized at 450x420. Once I click any of the options, the popover resizes itself. I want this popover to remain the same size all of the time.
Am I missing something obvious here? Any help would be much appreciated.
Declares and launches popover from myPopOverView.cs:
UIPopoverController myPopOver = new UIPopoverController(new myPopOverView());
btnSearch.TouchUpInside += (sender, e) => {
myPopOver.PopoverContentSize = new SizeF(450f, 420f);
myPopOver.PresentFromRect (btnPopOver.Frame, this.View, UIPopoverArrowDirection.Down, true);
}
from myPopOverView.cs:
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
var root = CreateRoot ();
var dv = new DialogViewController (root, true);
this.PushViewController (dv, true);
}
RootElement CreateRoot ()
{
return new RootElement ("Find Stuff") {
new Section (){
new RootElement ("States", new RadioGroup (0)){
new Section (){
new RadioElement ("New York"),
new RadioElement ("California"),
new RadioElement ("Texas"),
}
} ,
} ,
new Section (){
new RootElement ("Places", new RadioGroup (0)){
new Section (){
new RadioElement ("New York City"),
new RadioElement ("San Francisco"),
new RadioElement ("Dallas"),
}
} ,
} ,
new Section (){
new RootElement ("Products") {
from sh in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
select new Section (sh + " - Section") {
from filler in "12345"
select (Element) new CheckboxElement (sh + " - " + filler, true, "kb")
}
} ,
}
} ;
}