void SetShowsCancelButton(Controls.SearchBar element)
 {
     if (!element.ShowsCancelButton)
     {
         Control.ShowsCancelButton = element.ShowsCancelButton;
     }
 }
        void SetShowsClearButton(Controls.SearchBar element)
        {
            var textField = (UITextField)Control.ValueForKey(new Foundation.NSString("_searchField"));

            if (textField == null)
            {
                textField = (UITextField)Control.ValueForKey(new Foundation.NSString("searchField"));
            }

            textField.ClearButtonMode = element.ShowsClearButton ? UITextFieldViewMode.Always : UITextFieldViewMode.Never;
        }