Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IOS上的表单:删除搜索栏和导航栏之间的空间_Ios_Xamarin_Uisearchbar_Searchbar - Fatal编程技术网

IOS上的表单:删除搜索栏和导航栏之间的空间

IOS上的表单:删除搜索栏和导航栏之间的空间,ios,xamarin,uisearchbar,searchbar,Ios,Xamarin,Uisearchbar,Searchbar,在我的页面中,我在ListView上方添加了一个搜索栏。它工作得很好,但我看到导航栏和搜索栏之间有一条很小的线。有人知道如何移除它吗? 谢谢 要删除底部阴影线,可以使用自定义渲染器。这正是你所需要的 [assembly: ExportRenderer(typeof(NavigationPage), typeof(NoLineNavigationRenderer))] namespace MyMobileProject.iOS { public class NoLineNavigati

在我的页面中,我在ListView上方添加了一个搜索栏。它工作得很好,但我看到导航栏和搜索栏之间有一条很小的线。有人知道如何移除它吗? 谢谢



要删除底部阴影线,可以使用自定义渲染器。这正是你所需要的

[assembly: ExportRenderer(typeof(NavigationPage), typeof(NoLineNavigationRenderer))] 
namespace MyMobileProject.iOS {
    public class NoLineNavigationRenderer : NavigationRenderer {

        public override void ViewDidLoad(){
            base.ViewDidLoad();
            // remove lower border and shadow of the navigation bar
            NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
            NavigationBar.ShadowImage = new UIImage ();
        }
    }
}

有关详细信息,请访问

要删除底部阴影线,可以使用自定义渲染器。这正是你所需要的

[assembly: ExportRenderer(typeof(NavigationPage), typeof(NoLineNavigationRenderer))] 
namespace MyMobileProject.iOS {
    public class NoLineNavigationRenderer : NavigationRenderer {

        public override void ViewDidLoad(){
            base.ViewDidLoad();
            // remove lower border and shadow of the navigation bar
            NavigationBar.SetBackgroundImage(new UIImage(), UIBarMetrics.Default);
            NavigationBar.ShadowImage = new UIImage ();
        }
    }
}

有关更多信息,请访问

谢谢。我找错了。我以为这和搜索栏有关。谢谢。我找错了。我以为这和搜索栏有关。