【问题标题】:Xamarin.Forms: Custom Context Actions For AndroidXamarin.Forms:适用于 Android 的自定义上下文操作
【发布时间】:2018-08-04 14:36:30
【问题描述】:

您好,我有一个列表视图,我在其中添加了 ContextActions。

我需要在上下文操作中更改菜单项的文本大小、颜色和对齐方式, 我还想增加出现在哪个菜单项上的上下文操作的宽度?

提前致谢。

<ListView.ItemTemplate>
            <DataTemplate>
                <customControls:ExtendedViewCell SelectedBackgroundColor="Transparent" >
                    <ViewCell.ContextActions>
                        <MenuItem Text="Call" />
                        <MenuItem Text="Delete" IsDestructive="True" />
                    </ViewCell.ContextActions>
                    <ViewCell.View>
                        <StackLayout HorizontalOptions="FillAndExpand" 
                     VerticalOptions="FillAndExpand" Orientation="Vertical" 
                     Padding="4" Spacing="8">
                            <Label TextColor="OrangeRed" Text="{Binding Title}"     />
                            <Label TextColor="Blue" Text="{Binding Subtitle}  "/>
                        </StackLayout>
                    </ViewCell.View>
                </customControls:ExtendedViewCell>
            </DataTemplate>
        </ListView.ItemTemplate>

【问题讨论】:

    标签: xamarin xamarin.forms xamarin.android


    【解决方案1】:

    【讨论】:

    • 当我按下单元格菜单项(调用、删除按钮)出现在顶部黑条上时,我需要更改菜单项(调用、删除)的颜色、宽度和位置,并且我需要更改显示调用和删除的导航栏的颜色和宽度......
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-12
    • 2012-07-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多