/// <summary> /// Convert <see cref="PictureSizeType"/> to facebook string. /// </summary> /// <param name="pictureSizeType"> /// The picture size type. /// </param> /// <returns> /// </returns> /// <exception cref="ArgumentOutOfRangeException"> /// </exception> public static string ToString(PictureSizeType pictureSizeType) { switch (pictureSizeType) { case PictureSizeType.Square: return("square"); case PictureSizeType.Small: return("small"); case PictureSizeType.Large: return("large"); default: throw new ArgumentOutOfRangeException("pictureSizeType"); } }
void OnSizeTypeChanged(PictureSizeType old) { if (Data == null) { TryLoadData(); } if (SizeType == PictureSizeType.Thumb) { if (ThumbImage == null || Data != null) { CreateThumbImage(); } } OnPropertyChanged("SizeType", old, SizeType, ChangeTypes.All); }
public PictureWidget() { _SizeType = PictureSizeType.Thumb; Alignment = WidgetAlignment.Left; }