我有一个带有项目列表的xamarin选择器,我想在iPhone上按下"完成"按钮并在android上按下"Oke"按钮时删除选择器.
我有删除选择器的代码.但我不知道可能由哪个event_Handler.
码:
Picker picker = new Picker
{
Title = "What's in the slot?",
VerticalOptions = LayoutOptions.CenterAndExpand
//HorizontalOptions = LayoutOptions.Center
};
private void Displaypickerview(int row, int column)
{
if (status == "filling board")
{
foreach (string text in pickerText)
{
picker.Items.Add(text);
}
foreach (string ore in oreLevels)
{
picker.Items.Add(ore);
}
picker.SelectedIndexChanged += (sender, args) =>
{
if (picker.SelectedIndex == -1)
{
}
else
{
//change value of cell and button
Picker picker = (Picker)sender;
int index = picker.SelectedIndex;
if …
Run Code Online (Sandbox Code Playgroud)