@@ -64,7 +64,12 @@ public class ImagePickerItem {
64
64
[ JsonConverter ( typeof ( LinkPickerItemConverter ) ) ]
65
65
public LinkPickerItem Link { get ; private set ; }
66
66
67
- /// <summary>
67
+ [ JsonProperty ( "noCrop" ) ]
68
+ public bool NoCrop { get ; private set ; }
69
+
70
+
71
+
72
+ /// <summary>
68
73
/// Gets whether a valid link has been specified for this item.
69
74
/// </summary>
70
75
[ JsonIgnore ]
@@ -104,6 +109,23 @@ public ImagePickerItem(ImagePickerImage image, string title, string description,
104
109
Link = link ?? LinkPickerItem . Parse ( new JObject ( ) ) ;
105
110
}
106
111
112
+ /// <summary>
113
+ /// Initializes a new image picker item based on the specified <paramref name="image"/>, <paramref name="title"/>,
114
+ /// <paramref name="description"/> and <paramref name="link"/>.
115
+ /// </summary>
116
+ /// <param name="image">An instance of <see cref="IPublishedContent"/> representing the selected image.</param>
117
+ /// <param name="title">The title of the item.</param>
118
+ /// <param name="description">The description of the item.</param>
119
+ /// <param name="link">An instance of <see cref="LinkPickerItem"/> representing the link of the item.</param>
120
+ /// <param name="noCrop">The NoCrop property value</param>
121
+ public ImagePickerItem ( ImagePickerImage image , string title , string description , LinkPickerItem link , bool noCrop ) {
122
+ Image = image ;
123
+ Title = title ;
124
+ Description = description ;
125
+ Link = link ?? LinkPickerItem . Parse ( new JObject ( ) ) ;
126
+ NoCrop = noCrop ;
127
+ }
128
+
107
129
/// <summary>
108
130
/// Initializes a new image picker item based on the specified <see cref="JObject"/>.
109
131
/// </summary>
@@ -114,6 +136,7 @@ protected ImagePickerItem(JObject obj) {
114
136
Title = obj . GetString ( "title" ) ?? "" ;
115
137
Description = obj . GetString ( "description" ) ?? "" ;
116
138
Link = obj . GetObject ( "link" , LinkPickerItem . Parse ) ?? LinkPickerItem . Parse ( new JObject ( ) ) ;
139
+ NoCrop = obj . GetBoolean ( "nocrop" ) ;
117
140
}
118
141
119
142
#endregion
0 commit comments