private static DialogViewController CreateDialogViewController(object view, bool isModal, bool pushing)
{
Theme theme = null;
if (CurrentDialogViewController != null)
{
theme = CurrentDialogViewController.Theme;
theme = Theme.CreateTheme(theme);
theme.TableViewStyle = UITableViewStyle.Grouped;
}
string title = null;
var hasCaption = view as ICaption;
if (hasCaption != null)
{
title = hasCaption.Caption;
}
if (string.IsNullOrEmpty(title))
{
title = MonoMobileApplication.Title;
}
var dvc = new DialogViewController(title, view, theme, pushing)
{
Autorotate = true, IsModal = isModal
};
return(dvc);
}