public QuestionModel(BitmapImage image, string questionText, OptionsModel options) { Image = image; QuestionText = questionText; Options = options; }
/// <summary> /// Serializable constructor for deserialization /// </summary> /// <param name="info"></param> /// <param name="context"></param> public QuestionModel(SerializationInfo info, StreamingContext context) { Image = SerializationTools.ByteArreyToBitmapImage(info.GetValue("Image", typeof(byte[])) as byte[]); QuestionText = info.GetString("QuestionText"); Options = (OptionsModel)info.GetValue("Options", typeof(OptionsModel)); }