在 ViewCell xamarin 中添加填充 [英] Adding padding inside ViewCell xamarin

查看:33
本文介绍了在 ViewCell xamarin 中添加填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 xamarin 的新手,也是在 XAML 中,我只想询问如何在我的视单元中添加填充,下面是我的代码

I'm newbie when it comes to xamarin, also in XAML, I just want to ask how to add a padding inside my viewcell below is my code

<TableView>
        <TableRoot>
            <TableSection Title = "Basic information">
                <EntryCell Label = "First name: " Placeholder = "Required" />
                <EntryCell Label = "Middel name: " Placeholder = "Optional" />
                <EntryCell Label = "Last name: " Placeholder = "Required" />
                <ViewCell>
                    <Picker x:Name="genderPicker" Title = "Select gender"></Picker>
                </ViewCell>
            </TableSection>
        </TableRoot>
</TableView>

我想要的是在这段代码中添加一点填充.

what i want is to add a little bit padding inside of this code.

            ![<ViewCell>
                <Picker x:Name="genderPicker" Title = "Select gender"></Picker>
            </ViewCell>][1]

这就是它的样子,所以我只想在我的选择器视图中添加一些左右空间.

This is what it looks like, so i just want to add some left and right space on my picker view.

http://i.stack.imgur.com/89qt9.png

推荐答案

这样的事情应该可以正常工作:

Something like this should works fine:

  <Picker x:Name="genderPicker" 
  Title = "Select gender"
  Padding="left, top, right, bottom">
  </Picker>

左、上、右和下是您想要的值.更多信息此处

With left,top,right and bottom the value you would like. More information here

这篇关于在 ViewCell xamarin 中添加填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆