I'm trying to add dynamic controls based on model in OnInit method but i get the "The Model property is currently null, however it should have been automatically initialized by the presenter. This most likely indicates that no presenter was bound to the control. Check your presenter bindings." error. But if i add controls in OnLoad they are not working right - events are not fired.
Also from what i see presenter binding is occuring in InitComplete event
Code:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
this.OnLoadTitle();
foreach (var platform in Model.Title.Platforms)
{
var tab = CreateTabForPlatform(platform);
this.TabView.Tabs.Add(tab);
}
}
How can i get around this issue. Thank you/