2017-08-30 40 views

回答

3

是的,这是可以从CustomRenderer修改。

您将需要继承Forms项目中的TabbedPage并使用此类导出渲染。

然后在CustomRenderer中覆盖ViewWillLayoutSubviews方法。喜欢的东西:

public class MyTabbedPageRenderer : TabbedRenderer 
{ 
    // Modify this variable with the height you desire. 
    private readonly float tabBarHeight = 55f; 

    public override void ViewWillLayoutSubviews() 
    { 
     base.ViewWillLayoutSubviews(); 

     TabBar.Frame = new CGRect(TabBar.Frame.X, TabBar.Frame.Y + (TabBar.Frame.Height - tabBarHeight), TabBar.Frame.Width, tabBarHeight); 
    } 
} 

希望这helps.-

+1

它完美!谢谢你的帮助! – Josh