Bug 38480 - How to disable cut,copy, paste options for textFields in Xamarin.forms
Summary: How to disable cut,copy, paste options for textFields in Xamarin.forms
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.2
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-02-05 07:02 UTC by Nawnit Kumar
Modified: 2016-12-20 23:07 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Nawnit Kumar 2016-02-05 07:02:27 UTC
I am using date picker in my project and I don’t want the date text field should allow having copy, paste, cut options.
I tried to disable cut, copy, paste option using following code in DatePicker renderer but failed to disable 

  public override bool CanPerform (ObjCRuntime.Selector action, Foundation.NSObject withSender) 
  //     if( action.Name.Equals("paste:") || action.Name.Equals("cut:") || action.Name.Equals("copy:") 
          ||action.Name.Equals("select:") ||action.Name.Equals("selectAll:") ||action.Name.Equals("delete:")) 
           //     return false;

        return false;

Please let me know if there are any other ways to disable cut, copy, paste options  or it is known issue.
Comment 1 Axel 2016-03-14 11:25:15 UTC
Same problem with XForm 2.0.1
Comment 2 adrianknight89 2016-11-02 01:59:00 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/498
Comment 3 Rui Marinho 2016-12-20 23:07:23 UTC
We really like the ideas expressed in this PR, unfortunately we also feel it belongs in a community driven effect library which is not currently possible to make due to the need to override methods on a UIKit object. Therefor we are looking into options to make this possible so that we can avoid having every edge case PlatformSpecific end up in core and instead allow them to become independent nugets which can move and change (and break compat) much more freely.