Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Xamarin Forms iOS Picker done

public class MyPickerRenderer : PickerRenderer
{
    protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
    {
        base.OnElementChanged(e);

        if(e.OldElement != null)
        {
            var toolbar = (UIToolbar)Control.InputAccessoryView;
            var doneBtn = toolbar.Items[1];

            doneBtn.Clicked -= DoneBtn_Clicked;
        }

        if(e.NewElement != null)
        {
            var toolbar = (UIToolbar)Control.InputAccessoryView;
            var doneBtn = toolbar.Items[1];

            doneBtn.Clicked += DoneBtn_Clicked;
        }
    }

    void DoneBtn_Clicked(object sender, EventArgs e)
    {
        Console.WriteLine("Clicked!!!!");
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# user and password verification 
Csharp :: how to remove all controls from panel c# 
Csharp :: c# move picturebox 
Csharp :: particles are pink - creating tex and material 
Csharp :: c# ClassMap 
Csharp :: search list for words c# 
Csharp :: Unity Hollow Blender Model 
Csharp :: Adding number of day remaining to future date from now 
Csharp :: Convert C# Class to xml wth xsd.exe 
Csharp :: in clause db2 c# 
Csharp :: block wapalyzer from detecting codeigniter 
Csharp :: cluster size C: powerschell 
Csharp :: isselected uicollectionview reused 
Csharp :: unity prefab button not working 
Csharp :: set field in list linq 
Csharp :: Diplay player final score in new scene in unity 
Csharp :: class combining 
Csharp :: simplified if statement c# 
Csharp :: how to make a 2d character move in unity 2020 
Csharp :: f sharp functions calling each other 
Csharp :: textbox center align winform 
Csharp :: using mediamanager how to play mp3 files 
Csharp :: make tooltip disappear c# 
Csharp :: custom convert list object to other object c# 
Csharp :: openiddect ef core table not creating 
Csharp :: c# string size in bytes 
Csharp :: how to pass object as test case in nunit c# 
Csharp :: creating weighted graph in c# 
Csharp :: auto refresh gridview c# 
Csharp :: c# run foreach loop x times 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =