我有这个模板:
<?xml version="1.0" encoding="utf-8"?>
<StackLayout xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Japanese;assembly=Japanese"
x:Class="Japanese.Templates.FooterTemplate"
x:Name="this" BackgroundColor="#efeff4"
HorizontalOptions="FillAndExpand"
Orientation="Vertical" Spacing="0" Margin="0">
<StackLayout HeightRequest="1" Orientation="Vertical"
Spacing="0" Margin="0"
IsVisible="{Binding FooterType, Converter={StaticResource Type0BoolConverter}, Source={x:Reference this} }" >
<BoxView HeightRequest="1" HorizontalOptions="FillAndExpand" BackgroundColor="#FF0000" Margin="0" />
<BoxView HeightRequest="1" HorizontalOptions="FillAndExpand" BackgroundColor="#00FF00" Margin="0" />
<BoxView HeightRequest="1" HorizontalOptions="FillAndExpand" BackgroundColor="#0000FF" Margin="0" />
</StackLayout>
</StackLayout>
我希望使用我作为参数传入的样式确定三个BoxView的背景颜色。
有人可以告诉我这是否可行,如果可以的话,请提供一些有关我该怎么做的建议。