Xamarin 中的按钮Buttons in Xamarin.Android

Button 类用于表示 Android 屏幕中各种不同的按钮样式。The Button class is used to represent various different styles of button in Android screens. 本部分介绍了在 Xamarin 中使用按钮的不同选项:This section introduces the different options for working with buttons in Xamarin.Android:

  • 单选按钮允许用户从集中选择一个选项。RadioButton allows the user to select one option from a set.

  • 切换按钮使用户能够在两个状态之间切换(切换)设置。ToggleButton allow the user to flip (toggle) a setting between two states.

  • 复选框是一种特殊类型的按钮,可以选中或取消选中以指示两种可能的状态之一。CheckBox is a special type of button that can be either checked or unchecked to indicate one of two possible states.

  • 还可以创建使用图像而不是文本的自定义按钮You can also create a custom button that uses an image instead of text.