Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <Entry IsPassword="true" Placeholder="Password" TextColor="Green" BackgroundColor="#2c3e50" />
  2.  
  3. public override bool CanPerform(Selector action, NSObject withSender)
  4. {
  5. if(action.Name == "paste:" || action.Name == "copy:" || action.Name == "cut:")
  6. return false;
  7.  
  8. return base.CanPerform(action, withSender);
  9. }
  10.  
  11. class Callback : Java.Lang.Object, ActionMode.ICallback
  12. {
  13.  
  14. public bool OnActionItemClicked(ActionMode mode, IMenuItem item)
  15. {
  16. return false;
  17. }
  18.  
  19. public bool OnCreateActionMode(ActionMode mode, IMenu menu)
  20. {
  21. return false;
  22. }
  23.  
  24. public void OnDestroyActionMode(ActionMode mode)
  25. {
  26.  
  27. }
  28.  
  29. public bool OnPrepareActionMode(ActionMode mode, IMenu menu)
  30. {
  31. return false;
  32. }
  33. }
  34.  
  35. protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
  36. {
  37. base.OnElementChanged(e);
  38.  
  39. if (Control != null)
  40. {
  41. Control.CustomSelectionActionModeCallback = new Callback();
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement