Guest User

Untitled

a guest
Feb 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. public class ImageEntry : Entry
  2. {
  3. public ImageEntry(){
  4. this.HeightRequest = 50;
  5. }
  6. public static readonly BindableProperty ImageProperty =
  7. BindableProperty.Create(nameof(Image), typeof(string), typeof(ImageEntry), string.Empty);
  8.  
  9. public static readonly BindableProperty LineColorProperty =
  10. BindableProperty.Create(nameof(LineColor), typeof(Xamarin.Forms.Color), typeof(ImageEntry), Color.White);
  11.  
  12. public static readonly BindableProperty ImageHeightProperty =
  13. BindableProperty.Create(nameof(ImageHeight), typeof(int), typeof(ImageEntry), 40);
  14.  
  15. public static readonly BindableProperty ImageWidthProperty =
  16. BindableProperty.Create(nameof(ImageWidth), typeof(int), typeof(ImageEntry), 40);
  17.  
  18. public static readonly BindableProperty ImageAlignmentProperty =
  19. BindableProperty.Create(nameof(ImageAlignment), typeof(ImageAlignment), typeof(ImageEntry), ImageAlignment.Left);
  20.  
  21. public Color LineColor
  22. {
  23. get { return (Color)GetValue(LineColorProperty); }
  24. set { SetValue(LineColorProperty, value); }
  25. }
  26.  
  27. public int ImageWidth
  28. {
  29. get { return (int)GetValue(ImageWidthProperty); }
  30. set { SetValue(ImageWidthProperty, value); }
  31. }
  32.  
  33. public int ImageHeight
  34. {
  35. get { return (int)GetValue(ImageHeightProperty); }
  36. set { SetValue(ImageHeightProperty, value); }
  37. }
  38.  
  39. public string Image
  40. {
  41. get { return (string)GetValue(ImageProperty); }
  42. set { SetValue(ImageProperty, value); }
  43. }
  44.  
  45. public ImageAlignment ImageAlignment
  46. {
  47. get { return (ImageAlignment)GetValue(ImageAlignmentProperty); }
  48. set { SetValue(ImageAlignmentProperty, value); }
  49. }
  50. }
  51.  
  52. public enum ImageAlignment
  53. {
  54. Left,
  55. Right
  56. }
  57. }
Add Comment
Please, Sign In to add comment