You can not do this directly because a DialogViewController's is similar to a UITableViewController and UITableView which have some traits to fill its containing space. There is a clever trick to get around this where you will need to create a "container" UIView for the width you want and add it as a subview to a UIViewController. Now make your DialogViewController and add its View as a subview of that container. The Dialog will expand to the size of the container, rather than the parent view.
You should end up with something like this:
public class MyController : UIViewController
{
UIView container;
DialogViewController dvc;
public override void ViewDidLoad()
{
base.ViewDidLoad();
container = new UIView();
dvc = new DialogViewController(UITableViewStyle.Grouped, null, true);
dvc.Root = new Root("Title") {
new Section() {
new StringElement("Hello")
}
};
View.AddSubview(container);
}
public override void ViewDidLayoutSubviews()
{
base.ViewDidLayoutSubviews();
// Whatever width you want
float newWidth = View.Bounds.Width / 2;
container.Frame = new RectangleF(0, 0, newWidth, View.Bounds.Height);
// This is a workaround so that the TableView fills the container view
// after it is sized.
container.AddSubView(dvc.View);
}
}