删除Xamarin.forms中的导航栏阴影/线条
如何在Xamarin.forms中删除导航栏阴影和内容页线条。删除Xamarin.forms中的导航栏阴影/线条,xamarin.forms,Xamarin.forms,如何在Xamarin.forms中删除导航栏阴影和内容页线条。 是否可以在不渲染的情况下执行此操作。仅针对Xamarin表单,iOS。将此添加到AppDelegate UINavigationBar.Appearance.ShadowImage = new UIImage(); //No line under the navigation 对于Xamarin表单,iOS。将此添加到AppDelegate UINavigationBar.Appearance.ShadowImage = ne
是否可以在不渲染的情况下执行此操作。仅针对Xamarin表单,iOS。将此添加到AppDelegate
UINavigationBar.Appearance.ShadowImage = new UIImage(); //No line under the navigation
对于Xamarin表单,iOS。将此添加到AppDelegate
UINavigationBar.Appearance.ShadowImage = new UIImage(); //No line under the navigation
在xamarin ios项目中添加此渲染类
[assembly: ExportRenderer(typeof(NavigationPage), typeof(CustomNavigationRenderer))]
namespace YOUR_IOS_NAMESPACE
{
public class CustomNavigationRenderer : NavigationRenderer
{
public override void ViewDidLoad()
{
base.ViewDidLoad();
NavigationBar.ShadowImage = new UIImage();
}
}
}
在xamarin ios项目中添加此渲染类
[assembly: ExportRenderer(typeof(NavigationPage), typeof(CustomNavigationRenderer))]
namespace YOUR_IOS_NAMESPACE
{
public class CustomNavigationRenderer : NavigationRenderer
{
public override void ViewDidLoad()
{
base.ViewDidLoad();
NavigationBar.ShadowImage = new UIImage();
}
}
}