IsEnable属性在ListView项xamarin表单中不起作用

时间:2019-01-23 10:33:49

标签: xamarin xamarin.forms

这是我的列表视图:

<ListView.ItemTemplate>
    <DataTemplate>
        <ViewCell>
            <ContentView 
                BackgroundColor="White">
                <Label 
                    Text="{Binding PullSheetId}" 
                    Grid.Row="0" 
                    IsVisible="False"/>
                <controls:CheckBox 
                    Checked="{Binding IsChecked}" 
                    Grid.Row="0" 
                    Grid.Column="0" 
                    IsEnabled="{Binding IsEnableShipBtn}" 
                    Scale=".8"/>
                <!--<Label 
                    Text="{Binding KitSKU}" 
                    Grid.Row="0" 
                    Grid.Column="1" 
                    HorizontalTextAlignment="Center" 
                    VerticalOptions="Center" 
                    FontSize="Small" 
                    TextColor="Black"/>-->
                <Label 
                    Text="{Binding SKU}" 
                    Grid.Row="0" 
                    Grid.Column="1" 
                    HorizontalTextAlignment="Center" 
                    VerticalOptions="Center" 
                    FontSize="Small" 
                    TextColor="{Binding ItemColor}"/>
                <Label 
                    Text="{Binding ReqPackQty}" 
                    Grid.Row="0" 
                    Grid.Column="2" 
                    HorizontalTextAlignment="Center" 
                    VerticalOptions="Center" 
                    FontSize="Small" 
                    TextColor="Black"/>
            </ContentView>
        </ViewCell>
    </DataTemplate>
</ListView.ItemTemplate>

IsEnabled属性在IsVisible上运行时不起作用。 该如何解决?

0 个答案:

没有答案