使用 Xamarin Forms Shell,我尝试更改 Shell 和菜单项后面的背景颜色,如本教程图片所示:
我可以通过模板更改单个项目后面的颜色,但下方的空白区域以及 Header 和 Items 之间的间隙仍然是白色的。有没有办法改变这种情况?
Jac*_*Hua 12
有一个叫做FlyoutBackgroundColorshell的属性可以让你设置弹出的背景。
在 TheShell.xaml 中:
<Shell x:Name="theShell"
  x:Class="TailwindTraders.Mobile.Features.Shell.TheShell"
  xmlns="http://xamarin.com/schemas/2014/forms"
  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  xmlns:home="clr-namespace:TailwindTraders.Mobile.Features.Home"
  xmlns:local="clr-namespace:TailwindTraders.Mobile.Features.Shell"
  xmlns:productcategory="clr-namespace:TailwindTraders.Mobile.Features.Product.Category"
  Title="Tailwind Traders"
  Route="tailwindtraders"
  RouteHost="www.microsoft.com"
  RouteScheme="http"
  FlyoutBackgroundColor="Red"
>
Run Code Online (Sandbox Code Playgroud)
        |   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           3996 次  |  
        
|   最近记录:  |