|
Hi mikko,
We have two similar properties for TabbedDetailPropertyEditor in Model, there are DefaultTab and CurrentTab.
Where
DefaultTab - Specifies the Tab that opens when you click on this Tab.
CurrentTab - Specifies the last selected tab.
At that the DefaultTab works when you open your application a first time, further the CurrentTab works and opens the last opened tab - it's logic the editor.
To change this behavior you can using ViewController.
As example:
public partial class CustomerViewController : ViewController
{
...
protected override void OnViewControlsCreated()
{
base.OnViewControlsCreated();
TryInitializeFirstTab();
}
public void TryInitializeFirstTab()
{
PropertyEditor propertyEditor = ((DetailView) View).FindItem("ThisObject") as PropertyEditor;
if (propertyEditor is Xafari.Editors.Win.WinTabbedDetailPropertyEditor)
{
var prop = (Xafari.Editors.Win.WinTabbedDetailPropertyEditor) propertyEditor;
var tabDetailProp = prop.Model as IModelTabbedDetailPropertyEditor;
if(tabDetailProp == null) return;
if (tabDetailProp.Tabs.DefaultTab != null)
prop.CurrentTab = tabDetailProp.Tabs.DefaultTab;
}
}
We hope you find this information helpful.
Feel free to contact us if you need further assistance or have additional questions.
Thanks, Sasha.
|