Prototype.Forms.Controls
1.0.0
该示例应用包含我创建的Xamarin/Xamarin.Forms控件,视图和功能片段的随机混合物。



ToggleButton是一个控件,允许在图像之间来回切换(例如“检查”和“未检查”)。 ToggleButton从Xamarin.Forms.Button继承。
< controls : ToggleButton
x : Name = " toggleButton "
CheckedImage = " checked "
UnCheckedImage = " unchecked "
Enabled = " true "
Animate = " false "
Command = " {Binding Source={x:Reference CheckboxControl}, Path=CheckedCommand } " />Checkbox控件本质上是一个包含ToggleButton和Label StackLayout 。
< controls : Checkbox Text = " {Binding CheckboxTitle} "
IsChecked = " {Binding IsChecked} "
CheckedCommand = " {Binding OnCheckedCommand} " />
即将推出:用于检查/未检查状态的SkiaSharp(默认)实现,以代替当前需要图像的位置。这将消除对任何平台添加(图像)的需求。
CheckboxList控件从Xamarin.Forms.ListView继承,并包含Checkbox控件列表。它允许您绑定ISelectableItem对象实现的集合,并维护所选项目的列表。 CheckboxList包含事件,并命令观察CheckboxList项目的更改。
< controls : CheckboxList ItemsSource = " {Binding Items} "
SelectedItems = " {Binding SelectedItems} " />
注意: CheckboxList控件还包含用于选择/DE选择列表中所有复选框的功能。 (文档和样本即将到来)。
(即将推出!)
(即将推出!)
(即将推出!)
(即将推出!)
RadioButtonList从StackLayout继承,并包含RadioButton控件的列表。 RadioButtonList中的ItemsSource属性期望IEnumerable<string> 。字符串的集合用于创建RadioButtonList中包含的RadioButton量。
< controls : RadioButtonList ItemsSource = " {Binding Items} " ItemSelectedCommand = " {Binding ItemSelectedCommand} " />
注意: RadioButton控制需要在iOS和Android项目中进行自定义渲染。
即将推出:我将扩展允许更多选项的功能(即预选的广播按钮项目,定制/未选择的格式等)
(即将推出!)